@Test
public void testConvertShouldCallCustomConvertAndNotReturnValueIfObjectNoConversion() {

    // Given:
    String data = "2016-03-11";
    Class<?>[] parameterTypes = new Class<?>[] { Date.class };
    StringConverter underTest = new StringConverter() {
        @Override
        protected Object customConvertValue(String str, Class<?> targetType, ConverterContext dataProvider) {
            try {
                return new SimpleDateFormat("yyyy-MM-dd").parse(str);
            } catch (ParseException e) {
                throw new UndeclaredThrowableException(e);
            }
        }
    };
    // When:
    Object[] result = underTest.convert(data, false, parameterTypes, context, 75);
    // Then:
    assertThat(result).hasSize(1);
    assertThat(result[0]).isInstanceOf(Date.class).isEqualTo(date(2016, Calendar.MARCH, 11));
}