@Test
public void testNegativeSingleByteRead()
{

    byte[] expected = new byte[1];
    expected[0] = -100;
    try (GatheringByteArrayInputStream in = new GatheringByteArrayInputStream(ImmutableList.of(expected), expected.length)) {
        assertEquals(in.read(), expected[0] & 0x000000ff);
        assertEquals(in.read(), -1);
    }
}