DelimitedRecordMapper extends AbstractRecordMapper<P> implements RecordMapper<String, P> { public void setTrimWhitespaces(final boolean trimWhitespaces) { this.trimWhitespaces = trimWhitespaces; } DelimitedRecordMapper(final Class<P> recordClass);  DelimitedRecordMapper(final Class<P> recordClass, String... fieldNames);  DelimitedRecordMapper(final Class<P> recordClass, final String[] fieldNames, final int recordExpectedLength);  DelimitedRecordMapper(final Class<P> recordClass, final Integer... fieldsPositions);  DelimitedRecordMapper(final Class<P> recordClass, final Integer[] fieldsPositions, final String[] fieldNames);  DelimitedRecordMapper(final Class<P> recordClass, final Integer[] fieldsPositions, final String[] fieldNames, final int recordExpectedLength); @Override Record<P> processRecord(final Record<String> record); void setDelimiter(final String delimiter); void setTrimWhitespaces(final boolean trimWhitespaces); void setQualifier(final String qualifier); static final String DEFAULT_DELIMITER; static final String DEFAULT_QUALIFIER; static final boolean DEFAULT_WHITESPACE_TRIMMING; }
@Test public void testRecordParsingWithTrimmedWhitespaces() throws Exception { delimitedRecordMapper.setTrimWhitespaces(true); when(record.getPayload()).thenReturn(" foo , bar , 30 , 1990-12-12 , true "); validateRecord(record); }