IntervalFilter implements VariantFilter { @Override public FilterResult runFilter(VariantEvaluation variantEvaluation) { if (intervalIndex.hasRegionContainingVariant(variantEvaluation)) { logger.trace("{} passes filter", variantEvaluation); return PASS; } logger.trace("{} fails filter", variantEvaluation); return FAIL; } IntervalFilter(ChromosomalRegion interval);  IntervalFilter(Collection<ChromosomalRegion> chromosomalRegions); List<ChromosomalRegion> getChromosomalRegions(); @Override FilterType getFilterType(); @Override FilterResult runFilter(VariantEvaluation variantEvaluation); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }
@Test public void testThatRightChromosomeRightPositionPassesFilter() { FilterResult filterResult = instance.runFilter(rightChromosomeRightPosition); FilterTestHelper.assertPassed(filterResult); }
@Test public void testThatRightChromosomeWrongPositionFailsFilter() { FilterResult filterResult = instance.runFilter(rightChromosomeWrongPosition); FilterTestHelper.assertFailed(filterResult); }
@Test public void testThatWrongChromosomeRightPositionFailsFilter() { FilterResult filterResult = instance.runFilter(wrongChromosomeRightPosition); FilterTestHelper.assertFailed(filterResult); }
@Test public void testThatWrongChromosomeWrongPositionFailsFilter() { FilterResult filterResult = instance.runFilter(wrongChromosomeWrongPosition); FilterTestHelper.assertFailed(filterResult); }