public static void assertEquals(final Genotype actual, final Genotype expected) {
    Assert.assertEquals(actual.getSampleName(), expected.getSampleName(), "Genotype names");
    Assert.assertEquals(actual.getAlleles(), expected.getAlleles(), "Genotype alleles");
    Assert.assertEquals(
        actual.getGenotypeString(), expected.getGenotypeString(), "Genotype string");
    Assert.assertEquals(actual.getType(), expected.getType(), "Genotype type");

    // filters are the same
    Assert.assertEquals(actual.getFilters(), expected.getFilters(), "Genotype fields");
    Assert.assertEquals(actual.isFiltered(), expected.isFiltered(), "Genotype isFiltered");

    // inline attributes
    Assert.assertEquals(actual.getDP(), expected.getDP(), "Genotype dp");
    Assert.assertTrue(Arrays.equals(actual.getAD(), expected.getAD()));
    Assert.assertEquals(actual.getGQ(), expected.getGQ(), "Genotype gq");
    Assert.assertEquals(actual.hasPL(), expected.hasPL(), "Genotype hasPL");
    Assert.assertEquals(actual.hasAD(), expected.hasAD(), "Genotype hasAD");
    Assert.assertEquals(actual.hasGQ(), expected.hasGQ(), "Genotype hasGQ");
    Assert.assertEquals(actual.hasDP(), expected.hasDP(), "Genotype hasDP");

    Assert.assertEquals(
        actual.hasLikelihoods(), expected.hasLikelihoods(), "Genotype haslikelihoods");
    Assert.assertEquals(
        actual.getLikelihoodsString(),
        expected.getLikelihoodsString(),
        "Genotype getlikelihoodsString");
    Assert.assertEquals(
        actual.getLikelihoods(), expected.getLikelihoods(), "Genotype getLikelihoods");
    Assert.assertTrue(Arrays.equals(actual.getPL(), expected.getPL()));

    Assert.assertEquals(
        actual.getPhredScaledQual(), expected.getPhredScaledQual(), "Genotype phredScaledQual");
    assertAttributesEquals(actual.getExtendedAttributes(), expected.getExtendedAttributes());
    Assert.assertEquals(actual.isPhased(), expected.isPhased(), "Genotype isPhased");
    Assert.assertEquals(actual.getPloidy(), expected.getPloidy(), "Genotype getPloidy");
  }