public void testGetCenterLeftRightSection() {
    HeaderFooterHelper helper = new HeaderFooterHelper();

    String headerFooter = "&CTest the center section";
    assertEquals("Test the center section", helper.getCenterSection(headerFooter));

    headerFooter = "&CTest the center section&LThe left one&RAnd the right one";
    assertEquals("Test the center section", helper.getCenterSection(headerFooter));
    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&F");
    assertEquals("First right&F", helper.getRightSection(headerFooter));
    assertEquals("&CFirst added center section&LFirst left&RFirst right&F", headerFooter);

    headerFooter = helper.setRightSection(headerFooter, "First right&");
    assertEquals("First right&", helper.getRightSection(headerFooter));
    assertEquals("&CFirst added center section&LFirst left&RFirst right&", headerFooter);
  }