### Question:
CosmicVariantContextToRecordConverter implements VariantContextToRecordConverter<CosmicRecord> { @Override public CosmicRecord convert(VariantContext vc) { CosmicRecordBuilder builder = new CosmicRecordBuilder(); 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.setSnp(vc.getAttributeAsBoolean("SNP", false)); builder.setCnt(vc.getAttributeAsInt("CNT", 0)); return builder.build(); }  @Override CosmicRecord convert(VariantContext vc);  }### Answer:
@Test public void test() { CosmicVariantContextToRecordConverter converter = new CosmicVariantContextToRecordConverter(); VariantContext vc = vcfReader.iterator().next(); CosmicRecord record = converter.convert(vc); Assert.assertEquals("CosmicRecord [chrom=1, pos=1230, id=COSM1231, ref=A, alt=[C], cnt=1, snp=false]", record.toString()); }