try {
// First save the entity
SaveBinding sb = new SaveBinding();
sb.setAuthInfo(authInfo);
BindingTemplate btIn = (BindingTemplate)EntityCreator.buildFromDoc(bindingXML, "org.uddi.api_v3");
sb.getBindingTemplate().add(btIn);
publication.saveBinding(sb);
// Now get the entity and check the values
GetBindingDetail gb = new GetBindingDetail();
gb.getBindingKey().add(bindingKey);
BindingDetail bd = inquiry.getBindingDetail(gb);
List<BindingTemplate> btOutList = bd.getBindingTemplate();
BindingTemplate btOut = btOutList.get(0);
assertEquals(btIn.getServiceKey(), btOut.getServiceKey());
assertEquals(btIn.getBindingKey(), btOut.getBindingKey());
TckValidator.checkDescriptions(btIn.getDescription(), btOut.getDescription());
TckValidator.checkCategories(btIn.getCategoryBag(), btOut.getCategoryBag());
}
catch(Exception e) {
logger.error(e.getMessage(), e);
Assert.fail("No exception should be thrown: " + e.getMessage());
}