public void testChunkification() throws VisitFailure{
ATerm in = makeBigDummyTerm(2500);
ByteBuffer buffer = ByteBuffer.allocate(1000);
BinaryWriter bw = new BinaryWriter(in);
BinaryReader binaryReader = new BinaryReader(pureFactory);
while(!binaryReader.isDone()){
buffer.clear();
bw.serialize(buffer);
binaryReader.deserialize(buffer);
}
ATerm result = binaryReader.getRoot();
if(result == in) log("Chunkification OK");
else log("Chunkification FAILED");
}