### Question:
BufferedCharSeeker implements CharSeeker { @Override public String toString() { return format( "%s[source:%s, position:%d, line:%d]", getClass().getSimpleName(), sourceDescription(), position(), lineNumber() ); } BufferedCharSeeker( Source source, Configuration config ); @Override boolean seek( Mark mark, int untilChar ); @Override EXTRACTOR extract( Mark mark, EXTRACTOR extractor ); @Override EXTRACTOR extract( Mark mark, EXTRACTOR extractor, CSVHeaderInformation optionalData ); @Override boolean tryExtract( Mark mark, Extractor<?> extractor, CSVHeaderInformation optionalData ); @Override boolean tryExtract( Mark mark, Extractor<?> extractor ); @Override void close(); @Override long position(); @Override String sourceDescription(); long lineNumber(); @Override String toString(); static boolean isEolChar( char c );  }### Answer:
@Test public void shouldParseAndTrimRandomStrings() throws IOException { StringBuilder builder = new StringBuilder(); int columns = random.nextInt( 10 ) + 5; int lines = 100; List<String> expected = new ArrayList<>(); char delimiter = randomDelimiter(); for ( int i = 0; i < lines; i++ ) { for ( int j = 0; j < columns; j++ ) { if ( j > 0 ) { if ( random.nextBoolean() ) { builder.append( randomWhitespace( delimiter ) ); } builder.append( delimiter ); if ( random.nextBoolean() ) { builder.append( randomWhitespace( delimiter ) ); } } boolean quote = random.nextBoolean(); if ( random.nextBoolean() ) { String value = ""; if ( quote ) { if ( random.nextBoolean() ) { value += randomWhitespace( delimiter ); } } value += String.valueOf( random.nextInt() ); if ( quote ) { if ( random.nextBoolean() ) { value += randomWhitespace( delimiter ); } } expected.add( value ); builder.append( quote ? "\"" + value + "\"" : value ); } else { expected.add( null ); } } builder.append( format( "%n" ) ); } String data = builder.toString(); seeker = seeker( data, withTrimStrings( config(), true ) ); Iterator<String> next = expected.iterator(); for ( int i = 0; i < lines; i++ ) { for ( int j = 0; j < columns; j++ ) { String nextExpected = next.next(); if ( nextExpected == null ) { assertNextValueNotExtracted( seeker, mark, delimiter ); } else { assertNextValue( seeker, mark, delimiter, nextExpected ); } } } assertEnd( seeker, mark, delimiter ); }