void castRay(Ray ray, int expectedNumResults) {
        CollisionResults results = new CollisionResults();
        rootNode.collideWith(ray, results);
        int numResults = results.size();
        if (numResults != expectedNumResults) {
            String msg = String.format("Expected %d, got %d.",
                    expectedNumResults, numResults);
            throw new RuntimeException(msg);
        }
    }
Cast a ray at the geometry and check the number of collisions.
jme3-core/src/test/java/com/jme3/collision/CollideIgnoreTransformTest.java