### Question:
SimpleELPathSyntax implements PathSyntax { @Override public boolean isEqual(String path1, String path2) { boolean hasParent1 = isHasParent(path1); boolean hasParent2 = isHasParent(path2); if (hasParent1) { if (!hasParent2) { return false; } String leaf1 = getPropertyName(path1); String leaf2 = getPropertyName(path2); if (leaf1.equals(leaf2)) { String parent1 = parentOf(path1); String parent2 = parentOf(path2); return isEqual(parent1, parent2); } return false; } else { if (hasParent2) { return false; } return path1.equals(path2); } } protected  SimpleELPathSyntax(); static SimpleELPathSyntax getInstance(); @Override String parentOf(String path); @Override String rootOf(String path); @Override boolean isHasParent(String path); @Override String concat(String path, String subPath); @Override String addArrayIdx(String path, int index); @Override String addLiteralMapKey(String path, String literalKey); @Override String addPathMapKey(String path, String mapKey); @Override boolean isParentChild(String parent, String child); @Override boolean isDescendant(String descendant, String ancestor); @Override String getPropertyName(String path); @Override boolean isArrayIdx(String path); @Override boolean isLiteralMapKey(String path); @Override boolean isPathMapKey(String path); @Override boolean isEqual(String path1, String path2);  }### Answer:
@Test public void testIsEqual() throws Exception { Assert.assertTrue(pathSyntax.isEqual("root", "root")); Assert.assertTrue(pathSyntax.isEqual("root.a", "root.a")); Assert.assertTrue(pathSyntax.isEqual("root.a.b", "root.a.b")); Assert.assertTrue(pathSyntax.isEqual("root['a']", "root.a")); Assert.assertTrue(pathSyntax.isEqual("root.a", "root['a']")); Assert.assertTrue(pathSyntax.isEqual("root['a'].b", "root.a.b")); Assert.assertTrue(pathSyntax.isEqual("root['a']['b']", "root.a.b")); Assert.assertFalse(pathSyntax.isEqual("root", "ruth")); Assert.assertFalse(pathSyntax.isEqual("root.a", "root.b")); Assert.assertFalse(pathSyntax.isEqual("root.a.b", "root.b.a")); Assert.assertFalse(pathSyntax.isEqual("root['a']", "root.b")); Assert.assertFalse(pathSyntax.isEqual("root.b", "root['a']")); Assert.assertFalse(pathSyntax.isEqual("root['1'].b", "root.a.b")); Assert.assertFalse(pathSyntax.isEqual("root['a']['b']", "root.a.c")); }