@Test
  public void testReadInt() throws IOException {
    LittleEndianDataInputStream data =
        new LittleEndianDataInputStream(
            new ByteArrayInputStream(
                new byte[] {
                  (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00,
                  (byte) 0x01, (byte) 0x00, (byte) 0x00, (byte) 0x00,
                  (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff,
                  (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x80,
                  (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0x7f,
                  (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x01,
                  (byte) 0xff, (byte) 0x00, (byte) 0xff, (byte) 0x00,
                  (byte) 0x00, (byte) 0xff, (byte) 0x00, (byte) 0xff,
                  (byte) 0xbe, (byte) 0xba, (byte) 0xfe, (byte) 0xca,
                  (byte) 0xca, (byte) 0xfe, (byte) 0xd0, (byte) 0x0d,
                }));

    assertEquals(0, data.readInt());
    assertEquals(1, data.readInt());
    assertEquals(-1, data.readInt());
    assertEquals(Integer.MIN_VALUE, data.readInt());
    assertEquals(Integer.MAX_VALUE, data.readInt());
    assertEquals(16777216, data.readInt());
    assertEquals(0xff00ff, data.readInt());
    assertEquals(0xff00ff00, data.readInt());
    assertEquals(0xCafeBabe, data.readInt());
    assertEquals(0x0dd0feca, data.readInt());
  }