@Override
    public int hashCode() {
        // Note: DisjointPathPair with primary and secondary swapped
        // must result in same hashCode
        return hasBackup() ? primary.hashCode() + secondary.hashCode() :
                Objects.hash(primary);
    }
@Test
    public void testSwappingPrimarySecondaryDoesntImpactHashCode() {
        assertEquals(new DisjointPathPair<>(ABC, ADC).hashCode(),
                     new DisjointPathPair<>(ADC, ABC).hashCode());
    }