@Override
        public void write(JmeExporter je) throws IOException {
            OutputCapsule capsule = je.getCapsule(this);

            capsule.write(testByteBuffer, "testByteBuffer", null);
            capsule.write(testShortBuffer, "testShortBuffer", null);
            capsule.write(testIntBuffer, "testIntBuffer", null);
            capsule.write(testFloatBuffer, "testFloatBuffer", null);

            capsule.write(BufferUtils.createByteBuffer(0), "emptyByteBuffer", null);
            capsule.write(BufferUtils.createShortBuffer(0), "emptyShortBuffer", null);
            capsule.write(BufferUtils.createIntBuffer(0), "emptyIntBuffer", null);
            capsule.write(BufferUtils.createFloatBuffer(0), "emptyFloatBuffer", null);
        }
Test suite for implementations of the JmeExporter and JmeImporter interfaces.
There are tests here for all write* and read* methods of the OutputCapsule and InputCapsule interfaces respectively.
jme3-plugins/src/test/java/com/jme3/export/InputOutputCapsuleTest.java