private static void assertListEquals(List<?> a1, List<?> a2) {
        if (a1 == null || a2 == null) {
            // If either list is null, verify that both are null:
            Assert.assertNull(a1);
            Assert.assertNull(a2);

        } else {
            // Verify that the lists are distinct and and of equal length:
            Assert.assertTrue(a1 != a2);
            Assert.assertEquals(a1.size(), a2.size());

            for (int i = 0; i < a1.size(); ++i) {
                Assert.assertEquals(a1.get(i), a2.get(i));
            }
        }
    }
Verifies that the specified lists are equivalent but distinct.

@param s1 the first list to compare (may be null, unaffected)
@param s2 the 2nd list to compare (may be null, unaffected)
jme3-core/src/test/java/com/jme3/math/SplineTest.java