LocalTimeConverter implements Converter<String, LocalTime> { @Override public LocalTime convert(String source) { return new LocalTime(source); }  @Override LocalTime convert(String source);  }
@Test public void testConvert() { String source = "14:00"; LocalTimeConverter localTimeConverter = new LocalTimeConverter(); LocalTime expResult = new LocalTime(14, 0, 0); LocalTime result = localTimeConverter.convert(source); assertEquals(expResult, result); }
@Test public void testConvertNull() { LocalTimeConverter localTimeConverter = new LocalTimeConverter(); LocalTime convert = localTimeConverter.convert(null); assertNotNull(convert); }
@Test(expected = IllegalArgumentException.class) public void testConvertInvaild() { LocalTimeConverter localTimeConverter = new LocalTimeConverter(); localTimeConverter.convert("invalid"); }