### Question:
HeaderParser { protected static int readToGap(byte[] header, int off, int len) { return KMPMatch.indexOf(header, new byte[len], off); }  static CustomHeader parse(File map); static CustomHeader parse(byte[] map); static CustomHeader parse(ByteSource source); static int findEndOfHeader(ByteSource source);  }### Answer:
@Test public void testReadToGap() throws Exception { int expected = 2; int actual = HeaderParser.readToGap(inputGap, 0, 2); assertEquals(expected, actual); }
@Test public void testReadToGap2() throws Exception { int expected = 6; int actual = HeaderParser.readToGap(inputGap, 0, 3); assertEquals(expected, actual); }
@Test public void testReadToGap3() throws Exception { int expected = 6; int actual = HeaderParser.readToGap(inputGap, 3, 2); assertEquals(expected, actual); }
@Test public void testReadToGap4() throws Exception { int expected = -1; int actual = HeaderParser.readToGap(inputGap, 0, 4); assertEquals(expected, actual); }