private void testSerialization() {
        AnimComposer aComposer = model.getControl(AnimComposer.class);
        for (String layerName : aComposer.getLayerNames()) {

            System.out.println("layerName: " + layerName);
            AnimLayer layer = aComposer.getLayer(layerName);

            if (layer.getMask() instanceof SingleLayerInfluenceMask) {
                SingleLayerInfluenceMask mask = (SingleLayerInfluenceMask) layer.getMask();
                // Serialize and deserialize the mask
                mask = BinaryExporter.saveAndLoad(assetManager, mask);
                // Reassign the AnimComposer to the mask and remake the layer
                mask.setAnimComposer(aComposer);
                aComposer.makeLayer(layerName, mask);
            }
        }
    }
Tests the serialization of animation masks.
jme3-examples/src/main/java/jme3test/model/anim/TestSingleLayerInfluenceMask.java