SetPagesLabelParameters extends SinglePdfSourceSingleOutputParameters { public PdfPageLabel putLabel(Integer page, PdfPageLabel label) { return labels.put(page, label); }  PdfPageLabel putLabel(Integer page, PdfPageLabel label); Map<Integer, PdfPageLabel> getLabels(); @Override int hashCode(); @Override boolean equals(Object other);  }
@Test public void testPutLabel() { SetPagesLabelParameters victim = new SetPagesLabelParameters(); PdfPageLabel firstLabel = PdfPageLabel.newInstanceWithLabel("label1", PdfLabelNumberingStyle.ARABIC, 2); victim.putLabel(3, firstLabel); Assert.assertEquals(1, victim.getLabels().size()); PdfPageLabel secondLabel = PdfPageLabel.newInstanceWithoutLabel(PdfLabelNumberingStyle.LOWERCASE_ROMANS, 2); PdfPageLabel result = victim.putLabel(3, secondLabel); Assert.assertEquals(firstLabel, result); Assert.assertEquals(1, victim.getLabels().size()); }