SampleGenotype { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; SampleGenotype that = (SampleGenotype) o; return phased == that.phased && Arrays.equals(alleleCalls, that.alleleCalls); } private  SampleGenotype(boolean phased, AlleleCall... alleleCalls); static SampleGenotype empty(); static SampleGenotype noCall(); static SampleGenotype het(); static SampleGenotype homRef(); static SampleGenotype homAlt(); static SampleGenotype of(AlleleCall... alleleCalls); static SampleGenotype phased(AlleleCall... alleleCalls); List<AlleleCall> getCalls(); @JsonIgnore boolean isHet(); @JsonIgnore boolean isHomRef(); @JsonIgnore boolean isHomAlt(); @JsonIgnore boolean isPhased(); @JsonIgnore boolean isEmpty(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }
@Test public void testEquals(){ assertThat(SampleGenotype.of(AlleleCall.REF, AlleleCall.ALT), equalTo(SampleGenotype.of(AlleleCall.REF, AlleleCall.ALT))); assertThat(SampleGenotype.of(AlleleCall.ALT, AlleleCall.REF), equalTo(SampleGenotype.of(AlleleCall.REF, AlleleCall.ALT))); assertThat(SampleGenotype.phased(AlleleCall.REF, AlleleCall.ALT), equalTo(SampleGenotype.phased(AlleleCall.REF, AlleleCall.ALT))); assertThat(SampleGenotype.phased(AlleleCall.ALT, AlleleCall.REF), not(SampleGenotype.phased(AlleleCall.REF, AlleleCall.ALT))); assertThat(SampleGenotype.of(AlleleCall.ALT, AlleleCall.REF), not(SampleGenotype.phased(AlleleCall.REF, AlleleCall.ALT))); }