FilterFilePairByReleaseOcurrence { public boolean fits(FilePairReleasesOccurenceCounter counter) { final int releasesOcurrences = counter.getVersionsOcurrencesSize(); if (minQuantity != null && minQuantity.equals(maxQuantity)) { if (minQuantity.equals(releasesOcurrences)) { return true; } } else { if (minQuantity != null && maxQuantity != null) { if (minQuantity <= releasesOcurrences && maxQuantity >= releasesOcurrences) { return true; } } else if (minQuantity != null) { if (minQuantity <= releasesOcurrences) { return true; } } else if (maxQuantity != null) { if (maxQuantity >= releasesOcurrences) { return true; } } } return false; } FilterFilePairByReleaseOcurrence(int minQuantity);  FilterFilePairByReleaseOcurrence(int minQuantity, int maxQuantity); Integer getMinQuantity(); Integer getMaxQuantity(); boolean fits(FilePairReleasesOccurenceCounter counter); boolean fitsVersionSequenceOccurrences(final FilePairReleasesOccurenceCounter counter, final int minOccurrencesInOneVersion); static List<FilterFilePairByReleaseOcurrence> getSuggestedFilters(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }
@Test public void testFitsRangeFalse() { final FilterFilePairByReleaseOcurrence filter = new FilterFilePairByReleaseOcurrence(1, 2); FilePairReleasesOccurenceCounter ab = getSampleValues(); Assert.assertFalse(filter.fits(ab)); }
@Test public void testFitsTrue() { final FilterFilePairByReleaseOcurrence filter = new FilterFilePairByReleaseOcurrence(3, 3); FilePairReleasesOccurenceCounter ab = getSampleValues(); Assert.assertTrue(filter.fits(ab)); }
@Test public void testFitsFalse() { final FilterFilePairByReleaseOcurrence filter = new FilterFilePairByReleaseOcurrence(2, 2); FilePairReleasesOccurenceCounter ab = getSampleValues(); Assert.assertFalse(filter.fits(ab)); }
@Test public void testFitsRangeTrue() { final FilterFilePairByReleaseOcurrence filter = new FilterFilePairByReleaseOcurrence(2, 3); FilePairReleasesOccurenceCounter ab = getSampleValues(); Assert.assertTrue(filter.fits(ab)); }