### Question:
UK10KVariantContextToRecordConverter implements VariantContextToRecordConverter<UK10KRecord> { @Override public UK10KRecord convert(VariantContext vc) { UK10KRecordBuilder builder = new UK10KRecordBuilder(); builder.setContig(vc.getContig()); builder.setPos(vc.getStart() - 1); builder.setID(vc.getID()); builder.setRef(vc.getReference().getBaseString()); for (Allele all : vc.getAlternateAlleles()) builder.getAlt().add(all.getBaseString()); builder.getFilter().addAll(vc.getFilters()); int an = vc.getAttributeAsInt("AN", 0); builder.setChromCount(an); ArrayList<Integer> counts = Lists.newArrayList(vc.getAttributeAsList("AC").stream() .map(x -> Integer.parseInt((String) x)).collect(Collectors.toList())); builder.setAlleleCounts(counts); builder.setAlleleFrequencies( Lists.newArrayList(counts.stream().map(x -> (1.0 * x) / an).collect(Collectors.toList()))); return builder.build(); }  @Override UK10KRecord convert(VariantContext vc);  }### Answer:
@Test public void test() { UK10KVariantContextToRecordConverter converter = new UK10KVariantContextToRecordConverter(); VariantContext vc = vcfReader.iterator().next(); UK10KRecord record = converter.convert(vc); Assert.assertEquals( "UK10KRecord [chrom=1, pos=28589, id=., ref=T, alt=[TTGG], filter=[], " + "altAlleleCounts=[7226], chromCount=7562, altAlleleFrequencies=[0.9555673102353874]]", record.toString()); }