AlleleProtoAdaptor { public static FrequencyData toFrequencyData(AlleleProperties alleleProperties) { if (alleleProperties.equals(AlleleProperties.getDefaultInstance())) { return FrequencyData.empty(); } RsId rsId = RsId.of(alleleProperties.getRsId()); List<Frequency> frequencies = parseFrequencyData(alleleProperties.getPropertiesMap()); return FrequencyData.of(rsId, frequencies); } private  AlleleProtoAdaptor(); static AlleleKey toAlleleKey(Variant variant); static FrequencyData toFrequencyData(AlleleProperties alleleProperties); static PathogenicityData toPathogenicityData(AlleleProperties alleleProperties);  }
@Test public void testToFreqData() { AlleleProperties alleleProperties = AlleleProperties.newBuilder() .putProperties("KG", 0.7f) .putProperties("TOPMED", 0.05f) .build(); assertThat(AlleleProtoAdaptor.toFrequencyData(alleleProperties), equalTo(FrequencyData.of( Frequency.of(FrequencySource.THOUSAND_GENOMES, 0.7f), Frequency.of(FrequencySource.TOPMED, 0.05f)) ) ); }