@@ -0,0 +1,3169 @@
+/*%0A * Copyright (c) 2018. Real Time Genomics Limited.%0A *%0A * All rights reserved.%0A *%0A * Redistribution and use in source and binary forms, with or without%0A * modification, are permitted provided that the following conditions are%0A * met:%0A *%0A * 1. Redistributions of source code must retain the above copyright%0A *    notice, this list of conditions and the following disclaimer.%0A *%0A * 2. Redistributions in binary form must reproduce the above copyright%0A *    notice, this list of conditions and the following disclaimer in the%0A *    documentation and/or other materials provided with the%0A *    distribution.%0A *%0A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS%0A * %22AS IS%22 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT%0A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR%0A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT%0A * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,%0A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT%0A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,%0A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY%0A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT%0A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE%0A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.%0A */%0A%0Apackage com.rtg.vcf.annotation;%0A%0Aimport com.rtg.vcf.VcfRecord;%0Aimport com.rtg.vcf.header.MetaType;%0Aimport com.rtg.vcf.header.VcfHeader;%0A%0Aimport junit.framework.TestCase;%0A%0A/**%0A */%0Apublic class VariantMinorAllelicFractionAnnotationTest extends TestCase %7B%0A%0A  public void testName() %7B%0A    final VariantMinorAllelicFractionAnnotation annotation = new VariantMinorAllelicFractionAnnotation();%0A    assertEquals(%22VAF1%22, annotation.getName());%0A    assertEquals(%22Allelic fraction of the most frequent ALT allele%22, annotation.getDescription());%0A    assertEquals(MetaType.FLOAT, annotation.getField().getType());%0A  %7D%0A%0A  public void test() %7B%0A    final VariantMinorAllelicFractionAnnotation annotation = new VariantMinorAllelicFractionAnnotation();%0A    VcfRecord rec = new VcfRecord(%22seq%22, 0, %22AAA%22);%0A    rec.addAltCall(%22A%22);%0A    rec.addAltCall(%22C%22);%0A    rec.addFormatAndSample(%22ADE%22, %220.0,6.0,2.0%22);%0A    assertEquals(0.75, (Double) annotation.getValue(rec, 0), 0.0001);%0A%0A    rec = new VcfRecord(%22seq%22, 0, %22AAA%22);%0A    rec.addAltCall(%22A%22);%0A    rec.addAltCall(%22C%22);%0A    rec.addFormatAndSample(%22AD%22, %220,2,6%22);%0A    assertEquals(0.75, (Double) annotation.getValue(rec, 0), 0.0001);%0A  %7D%0A%0A  public void testMissingPrerequisites() %7B%0A    final VariantMinorAllelicFractionAnnotation annotation = new VariantMinorAllelicFractionAnnotation();%0A    final VcfRecord rec = new VcfRecord(%22seq%22, 0, %22AAA%22);%0A    rec.addAltCall(%22A%22);%0A    assertNull(annotation.getValue(rec, 0));%0A  %7D%0A%0A  public void testHeader() %7B%0A    final VariantMinorAllelicFractionAnnotation annotation = new VariantMinorAllelicFractionAnnotation();%0A    final String s = annotation.checkHeader(new VcfHeader());%0A    assertEquals(%22Derived annotation VAF1 missing required fields in VCF header (FORMAT fields: AD or ADE)%22, s);%0A  %7D%0A%7D%0A

Add simple test case.