ByteBuffer buffer = ByteBuffer.allocate(input.length);
buffer.put(input);
buffer.flip();
BinaryReader binaryReader = new BinaryReader(pureFactory);
binaryReader.deserialize(buffer);
ATerm result = binaryReader.getRoot();
if(result != expectedResult){
log("The result didn't match the expected result.");
/*log("Was: "+result+", expected: "+expectedResult);*/