### Question:
DefaultExtractorInput implements ExtractorInput { @Override public int read(byte[] target, int offset, int length) throws IOException, InterruptedException { int bytesRead = readFromPeekBuffer(target, offset, length); if (bytesRead == 0) { bytesRead = readFromDataSource(target, offset, length, 0, true); } commitBytesRead(bytesRead); return bytesRead; } DefaultExtractorInput(DataSource dataSource, long position, long length); @Override int read(byte[] target, int offset, int length); @Override boolean readFully(byte[] target, int offset, int length, boolean allowEndOfInput); @Override void readFully(byte[] target, int offset, int length); @Override int skip(int length); @Override boolean skipFully(int length, boolean allowEndOfInput); @Override void skipFully(int length); @Override boolean peekFully(byte[] target, int offset, int length, boolean allowEndOfInput); @Override void peekFully(byte[] target, int offset, int length); @Override boolean advancePeekPosition(int length, boolean allowEndOfInput); @Override void advancePeekPosition(int length); @Override void resetPeekPosition(); @Override long getPeekPosition(); @Override long getPosition(); @Override long getLength(); @Override void setRetryPosition(long position, E e);  }### Answer:
@Test public void testRead() throws Exception { DefaultExtractorInput input = createDefaultExtractorInput(); byte[] target = new byte[TEST_DATA.length]; int bytesRead = 0; bytesRead += input.read(target, 0, TEST_DATA.length); assertThat(bytesRead).isEqualTo(3); bytesRead += input.read(target, 3, TEST_DATA.length); assertThat(bytesRead).isEqualTo(6); bytesRead += input.read(target, 6, TEST_DATA.length); assertThat(bytesRead).isEqualTo(9); assertThat(Arrays.equals(TEST_DATA, target)).isTrue(); int expectedEndOfInput = input.read(target, 0, TEST_DATA.length); assertThat(expectedEndOfInput).isEqualTo(RESULT_END_OF_INPUT); }