ValidateInterpretation implements Callable<Integer> { AlleleList asAlleleList(final Interpretation interpretation) throws IOException { checkNotNull(interpretation); try { return glclient.createAlleleList(interpretation.glstring()); } catch (GlClientException e) { throw new IOException("could not convert interpretation to allele list, caught " + e.getMessage(), e); } } 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 testAsAlleleListNullInterpretation() throws Exception { validateInterpretation.asAlleleList(null); }
@Test public void testAsAlleleList() throws Exception { Interpretation interpretation = Interpretation.builder().withGlstring("HLA-A*01:01:01:01/HLA-A*01:01:01:02N").build(); AlleleList alleleList = validateInterpretation.asAlleleList(interpretation); assertNotNull(alleleList); assertEquals("HLA-A*01:01:01:01/HLA-A*01:01:01:02N", alleleList.getGlstring()); }
@Test(expected=IOException.class) public void testAsAlleleListInvalidSyntax() throws Exception { Interpretation interpretation = Interpretation.builder().withGlstring("invalid syntax").build(); validateInterpretation.asAlleleList(interpretation); }