AnchorText anchor1 = new AnchorText(AnchorTextConstants.Type.EXTERNAL_OUT_LINK.val, "text", 1);
AnchorText anchor2 = anchor1.clone();
anchor2.setText("some text");
assertTrue(anchor2.equals(anchor1));
anchor2.addDocument(2);
assertNull(anchor2.getText());
assertEquals(anchor2.getSize(), 2);
assertTrue(anchor2.equalsIgnoreSources(anchor1));
AnchorText anchor3 = new AnchorText(AnchorTextConstants.Type.DOCNO_FIELD.val, "text");