@Test
public void testConvertShouldCorrectlyHandleTrailingEmptyString() {

    // Given:
    String data = "1 ";
    Class<?>[] parameterTypes = new Class<?>[] { int.class, String.class };
    when(context.getSplitBy()).thenReturn(" ");
    when(context.isTrimValues()).thenReturn(true);
    // When:
    Object[] result = underTest.convert(data, false, parameterTypes, context, 31);
    // Then:
    assertThat(result).containsExactly(1, "");
}