PhenotypeTerm implements Comparable<PhenotypeTerm> { public static PhenotypeTerm notOf(String id, String label) { return new PhenotypeTerm(id, label, Status.NOT_PRESENT); } private  PhenotypeTerm(String id, String label, Status status); @JsonProperty String getId(); @JsonProperty String getLabel(); @JsonIgnore boolean isPresent(); @JsonIgnore boolean notPresent(); @Override boolean equals(Object o); @Override int hashCode(); @Override int compareTo(PhenotypeTerm o); @Override String toString(); @JsonCreator static PhenotypeTerm of(String id, String label); static PhenotypeTerm notOf(String id, String label);  }
@Test public void testNotOf() { assertThat(PhenotypeTerm.notOf("id", "label"), equalTo(PhenotypeTerm.notOf("id", "label"))); assertThat(PhenotypeTerm.notOf("id", "label"), not(equalTo(PhenotypeTerm.of("id", "label")))); assertThat(PhenotypeTerm.notOf("id", "label").isPresent(), is(false)); assertThat(PhenotypeTerm.notOf("id", "label").notPresent(), is(true)); }