btIn.getAccessPoint().setValue(value);
logger.info("service " + bsIn.getServiceKey() + " access point " + btIn.getAccessPoint().getValue() + " key:" + btIn.getBindingKey());
}
//}
ss.getBusinessService().add(bsIn);
ServiceDetail bsOut = publication.saveService(ss);
Assert.assertNotNull(bsOut);
Assert.assertEquals(bsOut.getBusinessService().get(0).getBusinessKey(), bsIn.getBusinessKey());
if (bsIn.getBindingTemplates() != null) {
Assert.assertNotNull(bsOut.getBusinessService().get(0).getBindingTemplates());
Assert.assertEquals(bsOut.getBusinessService().get(0).getBindingTemplates().getBindingTemplate().size(), bsIn.getBindingTemplates().getBindingTemplate().size());
for (int i=0; i < bsIn.getBindingTemplates().getBindingTemplate().size(); i++) {
Assert.assertEquals(bsIn.getBindingTemplates().getBindingTemplate().get(i).getAccessPoint().getValue(),
bsOut.getBusinessService().get(0).getBindingTemplates().getBindingTemplate().get(i).getAccessPoint().getValue());
}
}
Assert.assertEquals(bsOut.getBusinessService().get(0).getServiceKey(), bsIn.getServiceKey());
logger.info("service " + bsIn.getServiceKey() + " saved");
} catch (Exception e) {
logger.error(e.getMessage(), e);
Assert.fail("No exception should be thrown.");