CompressedByteBuffer { public void addRaw(int value) { values.add((byte) value); } CompressedByteBuffer();  CompressedByteBuffer(int resetSize); void addRaw(int value); void add(long i); void addFloat(float value); void addDouble(double value); void add(CompressedByteBuffer other); void clear(); byte[] getBytes(); long length(); void write(OutputStream stream); public TByteArrayList values; }
@Test public void testAddRaw() throws Exception { CompressedByteBuffer instance = new CompressedByteBuffer(); instance.addRaw(5); instance.addRaw(6); assertEquals( 2, instance.length() ); assertTrue( instance.getBytes().length >= 2 ); assertEquals( 5, instance.getBytes()[0] ); assertEquals( 6, instance.getBytes()[1] ); }