PageRange { @Override public boolean equals(Object obj) { if (!(obj instanceof PageRange)) { return false; } PageRange other = (PageRange) obj; return sequences.equals(other.sequences); } PageRange();  PageRange(String pageRange); PageRange addPageRangePart(IPageRangePart part); PageRange addPageSequence(int startPageNumber, int endPageNumber); PageRange addSinglePage(int pageNumber); List<Integer> getQualifyingPageNums(int nbPages); boolean isPageInRange(int pageNumber); @Override boolean equals(Object obj); @Override int hashCode();  }
@Test public void pageRangeEqualsNullTest() { PageRange range1 = new PageRange("3-8"); Assert.assertFalse(range1.equals(null)); }
@Test public void rangePartSingleEqualsNullTest() { PageRange.PageRangePartSingle pageRangePartSingle = new PageRange.PageRangePartSingle(10); Assert.assertFalse(pageRangePartSingle.equals(null)); }
@Test public void rangePartSequenceEqualsNullTest() { PageRange.PageRangePartSequence pageRangePartSequence = new PageRange.PageRangePartSequence(1, 2); Assert.assertFalse(pageRangePartSequence.equals(null)); }
@Test public void rangePartAfterEqualsNullTest() { PageRange.PageRangePartAfter pageRangePartAfter = new PageRange.PageRangePartAfter(10); Assert.assertFalse(pageRangePartAfter.equals(null)); }
@Test public void rangePartOddEvenEqualsNullTest() { Assert.assertFalse(PageRange.PageRangePartOddEven.EVEN.equals(null)); Assert.assertFalse(PageRange.PageRangePartOddEven.ODD.equals(null)); }
@Test public void rangePartAndEqualsNullTest() { PageRange.IPageRangePart odd = PageRange.PageRangePartOddEven.ODD; PageRange.IPageRangePart seq = new PageRange.PageRangePartSequence(2, 14); PageRange.PageRangePartAnd pageRangePartAnd = new PageRange.PageRangePartAnd(odd, seq); Assert.assertFalse(pageRangePartAnd.equals(null)); }