@Test
public void testReadFourByteIntByteArrayInt () {

    byte[] bytes = new byte[4];
    // test number 0
    if (ReadWrite.readFourByteInt(bytes, 0) != 0) Assert.fail("wrong number read");
    // test remaining numbers
    bytes[3] = 1;
    int i = 1;
    int fourByte;
    while (i != 0) {
        fourByte = ReadWrite.readFourByteInt(bytes, 0);
        if (i != fourByte) {
            System.out.println(i + " " + java.util.Arrays.toString(bytes) + ReadWrite.readFourByteInt(bytes, 0));
            Assert.fail("wrong number read");
        } else
            increment(bytes);
        ++i;
    }
}