@Test
  public void testWriting() {
    assertEquals(0, stream.getMaxProgress());

    stream.write(0);
    assertEquals(1, stream.getMaxProgress());

    final byte[] buf = new byte[8];

    stream.write(buf);
    assertEquals(9, stream.getMaxProgress());

    stream.write(buf, 2, 2);
    assertEquals(11, stream.getMaxProgress());

    stream.addProgress(16);
    assertEquals(27, stream.getMaxProgress());
  }
 @Test
 public void testSetup() {
   assertEquals(0, stream.getMaxProgress());
   assertTrue(stream.getProgressMap().isEmpty());
 }