ErrorThrowingTabixDataSource implements TabixDataSource { @Override public TabixReader.Iterator query(String query) { throw new IllegalArgumentException(message); } ErrorThrowingTabixDataSource(String message); @Override TabixReader.Iterator query(String query); @Override TabixReader.Iterator query(String chromosome, int start, int end); @Override void close(); @Override String getSource();  }
@Test public void testQueryString() { TabixDataSource instance = new ErrorThrowingTabixDataSource("LOCAL"); assertThrows(IllegalArgumentException.class, () -> instance.query("X:12345-12345")); }
@Test public void testEmptyQueryString() { TabixDataSource instance = new ErrorThrowingTabixDataSource("LOCAL"); assertThrows(IllegalArgumentException.class, () -> instance.query("")); }
@Test public void testEmptyQuery() { TabixDataSource instance = new ErrorThrowingTabixDataSource("LOCAL"); assertThrows(IllegalArgumentException.class, () -> instance.query("X", 12345, 12345)); }