PdfPageTransition { public static PdfPageTransition newInstance(PdfPageTransitionStyle style, int transitionDuration, int displayDuration) { if (transitionDuration < 1) { throw new InvalidParameterException("Input transition duration must be positive."); } if (displayDuration < 1) { throw new InvalidParameterException("Input display duration must be positive."); } if (style == null) { throw new InvalidParameterException("Input style cannot be null."); } return new PdfPageTransition(style, transitionDuration, displayDuration); } private  PdfPageTransition(PdfPageTransitionStyle style, int transitionDuration, int displayDuration); PdfPageTransitionStyle getStyle(); int getTransitionDuration(); int getDisplayDuration(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object other); static PdfPageTransition newInstance(PdfPageTransitionStyle style, int transitionDuration,
            int displayDuration);  }
@Test(expected = InvalidParameterException.class) public void testNullStyle() { PdfPageTransition.newInstance(null, 1, 1); }
@Test(expected = InvalidParameterException.class) public void testNoTransitionDuration() { PdfPageTransition.newInstance(PdfPageTransitionStyle.BLINDS_HORIZONTAL, 0, 1); }
@Test(expected = InvalidParameterException.class) public void testNoDisplayDuration() { PdfPageTransition.newInstance(PdfPageTransitionStyle.BLINDS_HORIZONTAL, 1, 0); }
@Test public void testEqualsAndHashCodes() { PdfPageTransition victim1 = PdfPageTransition.newInstance(PdfPageTransitionStyle.BLINDS_HORIZONTAL, 1, 1); PdfPageTransition victim2 = PdfPageTransition.newInstance(PdfPageTransitionStyle.BLINDS_HORIZONTAL, 1, 1); PdfPageTransition victim3 = PdfPageTransition.newInstance(PdfPageTransitionStyle.BLINDS_HORIZONTAL, 1, 1); PdfPageTransition victim4 = PdfPageTransition.newInstance(PdfPageTransitionStyle.BLINDS_HORIZONTAL, 1, 2); TestUtils.testEqualsAndHashCodes(victim1, victim2, victim3, victim4); }