AbstractFilterResult implements FilterResult { @Override public boolean passed() { return status == Status.PASS; } AbstractFilterResult(FilterType filterType, Status status); @Override FilterType getFilterType(); @Override boolean passed(); @Override boolean failed(); @Override boolean wasRun(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }
@Test public void testPassedFilterIsTrueWhenFilterResultStatusIsPass() { FilterResult instance = new PassFilterResult(FilterType.FREQUENCY_FILTER); assertThat(instance.passed(), is(true)); }
@Test public void testPassedFilterIsFalseWhenFilterResultStatusIsFail() { FilterResult instance = new FailFilterResult(FilterType.FREQUENCY_FILTER); assertThat(instance.passed(), is(false)); }
@Test public void testGetResultStatus() { FilterResult instance = new PassFilterResult(FilterType.INTERVAL_FILTER); assertThat(instance.passed(), equalTo(true)); }