### Question:
TimeDataConverter implements DataConverter<Time> { @Override public Time stringToValue(String rawData) throws ParseException { if (!StringUtils.isNotEmpty(rawData)) return null; Time parsedTime = new Time(getFormatter().parse(rawData).getTime()); return (Time) timeZoneTransformer.toServerTimeZone(parsedTime); }  @Override Time stringToValue(String rawData); @Override String valueToString(Time value);  }### Answer:
@Test public void stringToValue_rawDataIsNull_returnNull() throws ParseException { assertNull(timeDataConverter.stringToValue(null)); }
@Test public void stringToValue_rawDataIsEmptyString_returnEmptyString() throws ParseException { assertEquals(timeDataConverter.stringToValue(""), null); }
@Test public void stringToValue_rawDataIs11hours_returnTimeObject() throws ParseException { when(timeZoneTransformer.toServerTimeZone(any())).thenReturn(Time.valueOf("11:00:00")); assertEquals(timeDataConverter.stringToValue("11:00:00"), Time.valueOf("11:00:00")); }