@Override
    public void simpleInitApp() {
        inputManager.setCursorVisible(true);

        createBox(-3, ColorRGBA.Red);
        createBox(0, ColorRGBA.Green);
        createBox(3, ColorRGBA.Blue);

        System.out.println("Press G, W, Y, or space bar ...");
        inputManager.addMapping("overrideClear", new KeyTrigger(KeyInput.KEY_SPACE));
        inputManager.addMapping("overrideGray", new KeyTrigger(KeyInput.KEY_G));
        inputManager.addMapping("overrideWhite", new KeyTrigger(KeyInput.KEY_W));
        inputManager.addMapping("overrideYellow", new KeyTrigger(KeyInput.KEY_Y));
        inputManager.addListener(new ActionListener() {
            @Override
            public void onAction(String name, boolean isPressed, float tpf) {
                if (isPressed) {
                    if (name.equals("overrideClear")) {
                        rootNode.clearMatParamOverrides();
                    } else if (name.equals("overrideGray")) {
                        rootNode.clearMatParamOverrides();
                        rootNode.addMatParamOverride(overrideGray);
                    } else if (name.equals("overrideWhite")) {
                        rootNode.clearMatParamOverrides();
                        rootNode.addMatParamOverride(overrideWhite);
                    } else if (name.equals("overrideYellow")) {
                        rootNode.clearMatParamOverrides();
                        rootNode.addMatParamOverride(overrideYellow);
                    }
                    System.out.println(rootNode.getLocalMatParamOverrides());
                }
            }
        }, "overrideClear", "overrideGray", "overrideWhite", "overrideYellow");
    }
Test if {@link MatParamOverride}s are working correctly.

@author Kirill Vainer
jme3-examples/src/main/java/jme3test/material/TestMatParamOverride.java