@Test
public void happyCase() throws Exception {
BS3MenuBars menuBars = new BS3MenuBars();
BS3Menu menu = new BS3Menu();
menu.setNamed("Parties");
BS3MenuSection organisationMenu = new BS3MenuSection();
organisationMenu.getServiceActions().add(new ServiceActionLayoutData("parties.OrganisationMenu", "findByReference"));
organisationMenu.getServiceActions().add(new ServiceActionLayoutData("parties.OrganisationMenu", "findByName"));
organisationMenu.getServiceActions().add(new ServiceActionLayoutData("parties.OrganisationMenu", "create"));
menu.getSections().add(organisationMenu);
BS3MenuSection personMenu = new BS3MenuSection();
personMenu.getServiceActions().add(new ServiceActionLayoutData("parties.PersonMenu", "findByUsername"));
personMenu.getServiceActions().add(new ServiceActionLayoutData("parties.PersonMenu", "create"));
menu.getSections().add(personMenu);
menuBars.getPrimary().getMenus().add(menu);
String xml = jaxbService.toXml(menuBars);
System.out.println(xml);
BS3MenuBars menuBars2 =
jaxbService.fromXml(BS3MenuBars.class, xml);
String xml2 = jaxbService.toXml(menuBars2);
assertThat(xml, is(equalTo(xml2)));
}