@Test
public void testStreamToBytesOverflow() throws IOException {

    byte[] data = new byte[0];
    CountingInputStream cis =
            new CountingInputStream(new ByteArrayInputStream(data), 0x100000000L);
    exception.expect(IOException.class);
    DiskBasedCache.streamToBytes(cis, 0x100000000L); // int value is 0
}