@Test
public void testStreamToBytesExcessiveLength() throws IOException {

    byte[] data = new byte[1];
    CountingInputStream cis =
            new CountingInputStream(new ByteArrayInputStream(data), data.length);
    exception.expect(IOException.class);
    DiskBasedCache.streamToBytes(cis, 2);
}