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

  LimitedInputStream stream = new LimitedInputStream(new ForeverInputStream(), 1);
  Assert.assertEquals(0, stream.read());
  Assert.assertEquals(-1, stream.read());
}