ValidateInterpretation implements Callable<Integer> { boolean shouldValidate(final Interpretation interpretation, final AlleleList alleleList) { checkNotNull(interpretation); checkNotNull(alleleList); return loci.contains(interpretation.locus()) && interpretation.locus().equals(alleleList.getAlleles().get(0).getLocus().getGlstring()); } ValidateInterpretation(final File expectedFile,
                                  final File observedFile,
                                  final File outputFile,
                                  final int resolution,
                                  final List<String> loci,
                                  final boolean printSummary,
                                  final GlClient glclient); @Override Integer call(); static void main(final String[] args);  }
@Test(expected=NullPointerException.class) public void testShouldValidateNullInterpretation() { validateInterpretation.shouldValidate(null, alleleList0); }
@Test(expected=NullPointerException.class) public void testShouldValidateNullAlleleList() { Interpretation interpretation = Interpretation.builder().withLocus("HLA-A").build(); validateInterpretation.shouldValidate(interpretation, null); }
@Test public void testShouldValidate() { Interpretation interpretation = Interpretation.builder().withLocus("HLA-A").build(); assertTrue(validateInterpretation.shouldValidate(interpretation, alleleList0)); }
@Test public void testShouldValidateLocusNotInLoci() { Interpretation interpretation = Interpretation.builder().withLocus("HLA-G").build(); assertFalse(validateInterpretation.shouldValidate(interpretation, alleleList0)); }
@Test public void testShouldValidateNonMatchingLoci() { Interpretation interpretation = Interpretation.builder().withLocus("HLA-A").build(); assertFalse(validateInterpretation.shouldValidate(interpretation, alleleList2)); }