}
private void encodeDecodeWithAssert(int value) throws Exception {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
BitOutput bitOutput = new BitOutputImpl(bos);
MonotoneCodeOutputStream output = new MonotoneCodeOutputStream(encoder, bitOutput);
output.write(value);
output.close();
ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray());
BitInput bitIn = new BitInputImpl(bis);
MonotoneCodeInputStream input = new MonotoneCodeInputStream(decoder, bitIn);