@Test
    public void testBasic() {
        AnnotationType begTagType = new AnnotationType("begin_tag");
        Annotation a = new Annotation(begTagType);
        Annotation b = new Annotation(begTagType);

        assertEquals(a, b);
        assertEquals(a.hashCode(), b.hashCode());
        assertNotSame(a, b);

        Annotation c = new Annotation(new AnnotationType("determiner"));

        assertFalse(a.equals(c));
        assertFalse(c.equals(a));
        assertFalse(b.equals(c));
        assertFalse(c.equals(b));

        assertFalse(a.hashCode() == c.hashCode());
        assertFalse(c.hashCode() == a.hashCode());
        assertFalse(b.hashCode() == c.hashCode());
        assertFalse(c.hashCode() == b.hashCode());
    }
@author <a href="mailto:einarmr@yahoo-inc.com">Einar M R Rosenvinge</a>
document/src/test/java/com/yahoo/document/annotation/AnnotationTestCase.java