### Question:
UUIDConverter implements Converter<String, UUID> { @Override public UUID convert(String s) { if (s == null || s.isEmpty()) { return null; } return UUID.fromString(s); }  @Override UUID convert(String s);  }### Answer:
@Test public void shouldSucceedConvert() { String expectedUuid = "197ac149-798d-4e79-b3d6-d427bc39664f"; UUID result = uuidConverter.convert(expectedUuid); assertEquals(expectedUuid, result.toString()); }
@Test(expected = IllegalArgumentException.class) public void shouldFailConvert() { String errorString = "this is not an uuid"; UUID result = uuidConverter.convert(errorString); }