### Question:
Extractors { public Extractor<String[]> stringArray() { return stringArray; } Extractors( char arrayDelimiter );  Extractors( char arrayDelimiter, boolean emptyStringsAsNull );  Extractors( char arrayDelimiter, boolean emptyStringsAsNull, boolean trimStrings );  Extractors( char arrayDelimiter, boolean emptyStringsAsNull, boolean trimStrings, Supplier<ZoneId> defaultTimeZone ); void add( Extractor<?> extractor ); Extractor<?> valueOf( String name ); Extractor<String> string(); LongExtractor long_(); IntExtractor int_(); CharExtractor char_(); ShortExtractor short_(); ByteExtractor byte_(); BooleanExtractor boolean_(); FloatExtractor float_(); DoubleExtractor double_(); Extractor<String[]> stringArray(); Extractor<boolean[]> booleanArray(); Extractor<byte[]> byteArray(); Extractor<short[]> shortArray(); Extractor<int[]> intArray(); Extractor<long[]> longArray(); Extractor<float[]> floatArray(); Extractor<double[]> doubleArray(); PointExtractor point(); DateExtractor date(); TimeExtractor time(); DateTimeExtractor dateTime(); LocalTimeExtractor localTime(); LocalDateTimeExtractor localDateTime(); DurationExtractor duration();  }### Answer:
@Test void shouldExtractEmptyStringForEmptyArrayString() { Extractors extractors = new Extractors( ',' ); String value = ""; Extractor<String[]> extractor = extractors.stringArray(); extractor.extract( value.toCharArray(), 0, value.length(), false ); assertEquals( 0, extractor.value().length ); }
@Test void shouldExtractTwoEmptyStringsForSingleDelimiterInArrayString() { Extractors extractors = new Extractors( ',' ); String value = ","; Extractor<String[]> extractor = extractors.stringArray(); extractor.extract( value.toCharArray(), 0, value.length(), false ); assertArrayEquals( new String[] { "", "" }, extractor.value() ); }
@Test void shouldTrimStringArrayIfConfiguredTo() { Extractors extractors = new Extractors( ';', true, true ); String value = "ab;cd ; ef; gh "; char[] asChars = value.toCharArray(); Extractor<String[]> extractor = extractors.stringArray(); extractor.extract( asChars, 0, asChars.length, true ); assertArrayEquals( new String[] {"ab", "cd", "ef", "gh"}, extractor.value() ); }
@Test void shouldNotTrimStringIfNotConfiguredTo() { Extractors extractors = new Extractors( ';', true, false ); String value = "ab;cd ; ef; gh "; char[] asChars = value.toCharArray(); Extractor<String[]> extractor = extractors.stringArray(); extractor.extract( asChars, 0, asChars.length, true ); assertArrayEquals( new String[] {"ab", "cd ", " ef", " gh "}, extractor.value() ); }