@SuppressWarnings("resource")
@Test
public void testRead_WithLimit100() throws IOException {

  LimitedInputStream stream = new LimitedInputStream(new ForeverInputStream(), 100);
  Assert.assertEquals(100, stream.read(new byte[1000]));
  Assert.assertEquals(-1, stream.read());
}