assertEquals("The left one", helper.getLeftSection(headerFooter));
assertEquals("And the right one", helper.getRightSection(headerFooter));
}
public void testSetCenterLeftRightSection() {
HeaderFooterHelper helper = new HeaderFooterHelper();
String headerFooter = "";
headerFooter = helper.setCenterSection(headerFooter, "First added center section");
assertEquals("First added center section", helper.getCenterSection(headerFooter));
headerFooter = helper.setLeftSection(headerFooter, "First left");
assertEquals("First left", helper.getLeftSection(headerFooter));
headerFooter = helper.setRightSection(headerFooter, "First right");
assertEquals("First right", helper.getRightSection(headerFooter));
assertEquals("&CFirst added center section&LFirst left&RFirst right", headerFooter);
headerFooter = helper.setRightSection(headerFooter, "First right&");
assertEquals("First right&", helper.getRightSection(headerFooter));
assertEquals("&CFirst added center section&LFirst left&RFirst right&", headerFooter);
headerFooter = helper.setRightSection(headerFooter, "First right&");
assertEquals("First right", helper.getRightSection(headerFooter));
assertEquals("&CFirst added center section&LFirst left&RFirst right&", headerFooter);
}