@Test
public void testPeekFullyAcrossEndOfInputWithAllowEndOfInputFails() throws Exception {

  DefaultExtractorInput input = createDefaultExtractorInput();
  byte[] target = new byte[TEST_DATA.length];
  // Check peeking before the end of input with allowEndOfInput succeeds.
  assertThat(input.peekFully(target, 0, TEST_DATA.length - 1, true)).isTrue();
  // Check peeking across the end of input with allowEndOfInput throws.
  try {
    input.peekFully(target, 0, 2, true);
    fail();
  } catch (EOFException e) {
    // Expected.
  }
}