@Test
    public void testMaskAll() {
        ArmatureMask[] maskArray = new ArmatureMask[5];
        maskArray[0] = new ArmatureMask(arm);
        maskArray[1] = ArmatureMask.createMask(arm,
                "j0", "j1", "j2", "j3", "j4", "j5", "j6");

        maskArray[2] = ArmatureMask.createMask(arm, "j3");
        maskArray[2].addFromJoint(arm, "j5");
        maskArray[2].addFromJoint(arm, "j6");

        maskArray[3] = ArmatureMask.createMask(arm, "j3")
                .addAncestors(j4)
                .addAncestors(j6);

        maskArray[4] = ArmatureMask.createMask(arm, "j3");
        maskArray[4].addBones(arm, "j4", "j5", "j6");

        for (ArmatureMask testMask : maskArray) {
            for (Joint testJoint : jointList) {
                Assert.assertTrue(testMask.contains(testJoint));
            }
        }
    }
Test various ways to instantiate a mask that affects all joints.
jme3-core/src/test/java/com/jme3/anim/ArmatureMaskTest.java