@Override
  public void flush() throws IOException {
    if (finished) {
      return;
    }
    outputBuffer();
    os.flush();
  }
@Test
  public void testFlushingWhenFinishedIsNoOp() throws Exception {
    BufferedElementCountingOutputStream os = testValues(toBytes("a"));
    os.flush();
    os.flush();
    os.flush();
  }