write(input, expectedResult);
}
public void write(ATerm input, byte[] expectedResult) throws Exception{
ByteBuffer buffer = ByteBuffer.allocate(expectedResult.length + 10);
BinaryWriter bw = new BinaryWriter(input);
bw.serialize(buffer);
byte[] result = new byte[buffer.limit()];
buffer.get(result);
int expectedResultLength = expectedResult.length;
int resultLength = result.length;