GeneIdentifier implements Comparable<GeneIdentifier> { public static Builder builder() { return new Builder(); } private  GeneIdentifier(Builder builder); String getGeneId(); String getGeneSymbol(); String getHgncId(); String getHgncSymbol(); String getEntrezId(); @JsonIgnore Integer getEntrezIdAsInteger(); boolean hasEntrezId(); String getEnsemblId(); String getUcscId(); int compareTo(GeneIdentifier otherGeneIdentifier); static int compare(GeneIdentifier g1, GeneIdentifier g2); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static Builder builder(); static final String EMPTY_FIELD; }
@Test public void testConstructorChecksForNullGeneSymbol() { assertThrows(NullPointerException.class, () -> GeneIdentifier.builder().geneSymbol(null).build()); }
@Test public void testConstructorChecksGeneIdIsNotNull() { assertThrows(NullPointerException.class, () -> new Gene(GeneIdentifier.builder().geneId(null).build())); }
@Test public void testConstructorChecksEntrezIdIsNotNull() { assertThrows(NullPointerException.class, () -> new Gene(GeneIdentifier.builder().entrezId(null).build())); }
@Test public void testConstructorChecksEntrezIdIsValidInteger() { assertThrows(IllegalArgumentException.class, () -> new Gene(GeneIdentifier.builder().entrezId("wibble").build())); }