### Question:
Pointer implements Serializable { public void setTarget(PointerTarget target) { this.target = target; targetIndex = null; } Pointer(PointerTarget source, PointerType pointerType, POS targetPOS, long targetOffset, int targetIndex);  Pointer(PointerType pointerType, PointerTarget source, PointerTarget target); String toString(); int getSourceIndex(); PointerType getType(); boolean isLexical(); boolean isSemantic(); boolean isSymmetricTo(Pointer that); PointerTarget getSource(); PointerTarget getTarget(); void setTarget(PointerTarget target); Synset getTargetSynset(); long getTargetOffset(); int getTargetIndex(); POS getTargetPOS(); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test public void testSetTarget() throws JWNLException { dictionary.edit(); Synset s = new Synset(dictionary, POS.NOUN, 1); Word sw = new Word(dictionary, s, "test"); s.getWords().add(sw); Synset t = new Synset(dictionary, POS.ADJECTIVE, 2); Word tw = new Word(dictionary, t, "rest"); t.getWords().add(tw); Pointer p = new Pointer(PointerType.ANTONYM, sw, tw); p.setTarget(t); Assert.assertEquals(t, p.getTarget()); Assert.assertEquals(t, p.getTargetSynset()); Assert.assertFalse(p.isLexical()); Assert.assertFalse(p.isSemantic()); }