### Question:
SymmetricRelationship extends Relationship { public Relationship reverse() throws CloneNotSupportedException { PointerTargetNodeList list = getNodeList().deepClone().reverse(); for (Object aList : list) { ((PointerTargetNode) aList).setType(getType().getSymmetricType()); } return new SymmetricRelationship(getType(), list, getSourceSynset(), getTargetSynset()); } SymmetricRelationship(
            PointerType type, PointerTargetNodeList nodes, Synset sourceSynset, Synset targetSynset); Relationship reverse();  }### Answer:
@Test public void testReverse() throws JWNLException, CloneNotSupportedException { dictionary.edit(); Synset s1 = dictionary.createSynset(POS.NOUN); Synset s2 = dictionary.createSynset(POS.NOUN); SymmetricRelationship r = new SymmetricRelationship(PointerType.HYPERNYM, new PointerTargetNodeList(Arrays.asList( new PointerTargetNode(s1), new PointerTargetNode(s2) )), s1, s2); Relationship rev = r.reverse(); Assert.assertEquals(2, rev.getSize()); Assert.assertEquals(2, rev.getNodeList().size()); Assert.assertEquals(PointerType.HYPONYM, rev.getNodeList().get(0).getType()); Assert.assertEquals(PointerType.HYPONYM, rev.getNodeList().get(1).getType()); Assert.assertEquals(s2, rev.getNodeList().get(0).getSynset()); Assert.assertEquals(s1, rev.getNodeList().get(1).getSynset()); }