TabixDataSourceLoader { public static TabixDataSource load(Path pathToTabixGzFile) { TabixReader tabixReader; try { logger.debug("Loading TabixDataSource from {}", pathToTabixGzFile); tabixReader = new TabixReader(pathToTabixGzFile.toAbsolutePath().toString()); } catch (IOException e) { throw new ExomiserAutoConfigurationException("Failed to load/find file " + pathToTabixGzFile + ". Please check exomiser properties file points to a valid tabix .gz file.", e); } return new TabixReaderAdaptor(tabixReader); } private  TabixDataSourceLoader(); static TabixDataSource load(Path pathToTabixGzFile);  }
@Test public void testUnresolvableResource() throws Exception { assertThrows(ExomiserAutoConfigurationException.class, () ->TabixDataSourceLoader.load(Paths.get("wibble"))); }
@Test public void testLoadResource() throws Exception { Path remmTabixFilePath = Paths.get("src/test/resources/data/remm/remmData.tsv.gz"); TabixDataSource tabixDataSource = TabixDataSourceLoader.load(remmTabixFilePath); assertThat(tabixDataSource.getSource(), equalTo(remmTabixFilePath.toAbsolutePath().toString())); }