AlleleProtoAdaptor { public static AlleleKey toAlleleKey(Variant variant) { return AlleleKey.newBuilder() .setChr(variant.getChromosome()) .setPosition(variant.getPosition()) .setRef(variant.getRef()) .setAlt(variant.getAlt()) .build(); } private  AlleleProtoAdaptor(); static AlleleKey toAlleleKey(Variant variant); static FrequencyData toFrequencyData(AlleleProperties alleleProperties); static PathogenicityData toPathogenicityData(AlleleProperties alleleProperties);  }
@Test public void generateAlleleKey() { Variant variant = VariantAnnotation.builder() .genomeAssembly(GenomeAssembly.HG19) .chromosome(1) .position(12345) .ref("A") .alt("T") .build(); AlleleProto.AlleleKey expected = AlleleProto.AlleleKey.newBuilder() .setChr(1) .setPosition(12345) .setRef("A") .setAlt("T") .build(); assertThat(AlleleProtoAdaptor.toAlleleKey(variant), equalTo(expected)); }