protected static int findSequence(byte[] sequence, byte[] buffer) {
        int pos = -1;
        for (int i = 0; i < buffer.length - sequence.length + 1; i++) {
            if (buffer[i] == sequence[0] && testRemaining(sequence, buffer, i)) {
                pos = i;
                break;
            }
        }
        return pos;
    }
@Test
    public void testFindSequence() throws IOException {

        byte[] sequence = "project".getBytes(StandardCharsets.UTF_8);
        byte[] buffer = "my big project".getBytes(StandardCharsets.UTF_8);

        int expResult = 7;
        int result = PomProjectInputStream.findSequence(sequence, buffer);
        assertEquals(expResult, result);

        sequence = "<project".getBytes(StandardCharsets.UTF_8);
        buffer = "my big project".getBytes(StandardCharsets.UTF_8);

        expResult = -1;
        result = PomProjectInputStream.findSequence(sequence, buffer);
        assertEquals(expResult, result);

        sequence = "bigger sequence".getBytes(StandardCharsets.UTF_8);
        buffer = "buffer".getBytes(StandardCharsets.UTF_8);

        expResult = -1;
        result = PomProjectInputStream.findSequence(sequence, buffer);
        assertEquals(expResult, result);

        sequence = "fff".getBytes(StandardCharsets.UTF_8);
        buffer = "buffer".getBytes(StandardCharsets.UTF_8);

        expResult = -1;
        result = PomProjectInputStream.findSequence(sequence, buffer);
        assertEquals(expResult, result);
    }