BoundedBitChannel implements BitChannel { public void close() throws IOException { channel.close(); } BoundedBitChannel(@Nonnull BitChannel channel, @Nonnegative long maxBits); void write(boolean value); void write(int nrbits, byte value); void write(int nrbits, int value, ByteOrder byteOrder); void write(int nrbits, long value, ByteOrder byteOrder); void write(int nrbits, short value, ByteOrder byteOrder); void write(byte[] src, int offset, int length); long write(ByteBuffer buffer); int getRelativeBitPos(); void close();  }
@Test public void shouldCloseCorrectly() throws IOException { boundedChannel.close(); verify(channel).close(); }