AnalysisResults { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; AnalysisResults that = (AnalysisResults) o; return Objects.equals(probandSampleName, that.probandSampleName) && Objects.equals(sampleNames, that.sampleNames) && Objects.equals(variantEvaluations, that.variantEvaluations) && Objects.equals(genes, that.genes); } AnalysisResults(Builder builder); String getProbandSampleName(); List<String> getSampleNames(); List<Gene> getGenes(); List<VariantEvaluation> getVariantEvaluations(); @JsonIgnore List<GeneScore> getGeneScores(); @JsonIgnore List<GeneScore> getGeneScoresForMode(ModeOfInheritance modeOfInheritance); @JsonIgnore List<VariantEvaluation> getContributingVariants(); @JsonIgnore List<VariantEvaluation> getContributingVariantsForMode(ModeOfInheritance modeOfInheritance); @JsonIgnore List<VariantEvaluation> getUnAnnotatedVariantEvaluations(); @Override int hashCode(); @Override boolean equals(Object o); @Override String toString(); static Builder builder();  }
@Test public void testEquals() { AnalysisResults instance = AnalysisResults.builder().probandSampleName("wibble").build(); AnalysisResults other = AnalysisResults.builder().probandSampleName("wibble").build(); assertThat(instance, equalTo(other)); }