### Question:
UuidGeneratorService { public String uuidVariableParts(int maxLength) { return uuidVariableParts(maxLength, randomUuid()); }  String randomUuid(); String uuidVariableParts(int maxLength);  }### Answer:
@Test public void testGenerateUuidVariablePart() { String password = underTest.uuidVariableParts(30, UUID_STRING); assertEquals("abcdefghijkl234678mnopqrstuxyv", password); }
@Test public void testGenerateUuidVariablePartWhenLengthShorter() { String password = underTest.uuidVariableParts(15, UUID_STRING); assertEquals("abcdefghijkl234", password); }
@Test public void testGenerateUuidVariablePartWhenLengthBelow1() { String password = underTest.uuidVariableParts(0, UUID_STRING); assertEquals("", password); }
@Test public void testGenerateUuidVariableWhenUuidPatternNotMatching() { String password = underTest.uuidVariableParts(30, NOT_MATCHING_UUID_STRING); assertEquals("abc", password); }