### Question:
MinimumCountFilter implements Filter<T> { @Override public Set<T> apply( Set<T> data ) { return data.size() >= minCount ? data : emptySet(); } MinimumCountFilter( int minCount ); @Override Set<T> apply( Set<T> data ); @Override boolean equals( Object o ); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void shouldFilterBelowCount() { MinimumCountFilter<Integer> minFilter = new MinimumCountFilter<>( 3 ); Set<Integer> input = asSet( 1, 2 ); Set<Integer> output = minFilter.apply( input ); assertEquals( emptySet(), output ); }
@Test public void shouldPassAtCount() { MinimumCountFilter<Integer> minFilter = new MinimumCountFilter<>( 3 ); Set<Integer> input = asSet( 1, 2, 3 ); Set<Integer> output = minFilter.apply( input ); assertEquals( input, output ); }
@Test public void shouldPassAboveCount() { MinimumCountFilter<Integer> minFilter = new MinimumCountFilter<>( 3 ); Set<Integer> input = asSet( 1, 2, 3, 4 ); Set<Integer> output = minFilter.apply( input ); assertEquals( input, output ); }