private static ByteBuffer readFile(String fileName) throws IOException {
        fileName = PATH + fileName;

        //read tree from disk
        ReadableByteChannel channel = new FileInputStream(fileName).getChannel();
        ByteBuffer readBuf = ByteBuffer.allocate(4096);
        channel.read(readBuf);
        readBuf.flip();
        channel.close();

        return readBuf;
    }
Tests that serialization of annotations from Java generates the
output expected by the C++ deserialization system.

If the format changes and this test starts failing, you should
generate new golden files to check against. This will cause the C++
test to fail, so you will need to update the
AnnotationDeserialization component to handle the format changes.
document/src/test/java/com/yahoo/document/serialization/SerializeAnnotationsTestCase.java