@Test
    public void testSaveAndLoad() {
        FXAAFilter filter = new FXAAFilter();

        // Verify the default parameter values:
        verifyDefaults(filter);

        // Set parameters to new values:
        filter.setEnabled(false);
        filter.setReduceMul(0.22f);
        filter.setSpanMax(7f);
        filter.setSubPixelShift(0.33f);
        filter.setVxOffset(0.03f);

        // Create a duplicate filter using serialization:
        AssetManager assetManager = new DesktopAssetManager();
        FXAAFilter copy = BinaryExporter.saveAndLoad(assetManager, filter);

        // Verify the parameter values of the copy:
        Assert.assertEquals("FXAAFilter", copy.getName());
        Assert.assertEquals(0.22f, copy.getReduceMul(), 0f);
        Assert.assertEquals(7f, copy.getSpanMax(), 0f);
        Assert.assertEquals(0.33f, copy.getSubPixelShift(), 0f);
        Assert.assertEquals(0.03f, copy.getVxOffset(), 0f);
        Assert.assertFalse(copy.isEnabled());
    }
Tests serialization and de-serialization of an {@code FXAAFilter}. This
test would've detected JME issue #2168, for instance.
jme3-effects/src/test/java/com/jme3/post/filters/FXAAFilterTest.java