output.write(value);
output.close();
ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray());
BitInput bitIn = new BitInputImpl(bis);
MonotoneCodeInputStream input = new MonotoneCodeInputStream(decoder, bitIn);
Assert.assertEquals(value, input.read());
input.close();
}