/**
* Test the equals method for reflexive, symmetric, transitive and null
* comparisons (amongst others).
*/
public void testExternalFormsEqual() throws Exception {
ODOMXPath xpath1 = new ODOMXPath(".");
ODOMXPath xpath2 = new ODOMXPath(".");
ODOMXPath xpath3 = new ODOMXPath(".");
ODOMXPath xpath4 = new ODOMXPath("catalog");
// Reflexive.
assertTrue(xpath1.externalFormsEqual(xpath1));
// Symmetric
assertTrue(xpath1.externalFormsEqual(xpath2));
assertTrue(xpath2.externalFormsEqual(xpath1));
// Transitive
assertTrue(xpath1.externalFormsEqual(xpath2));
assertTrue(xpath2.externalFormsEqual(xpath3));
assertTrue(xpath1.externalFormsEqual(xpath3));
// Null value.
assertFalse(xpath1.externalFormsEqual(null));
// Not equals
assertFalse(xpath1.externalFormsEqual(xpath4));
assertFalse(xpath4.externalFormsEqual(xpath1));
assertFalse(xpath2.externalFormsEqual(xpath4));
}