try {
FindRelatedBusinesses body = (FindRelatedBusinesses)EntityCreator.buildFromDoc(FIND_RELATED_BUSINESS_SORT_BY_NAME_XML, "org.uddi.api_v3");
RelatedBusinessesList result = inquiry.findRelatedBusinesses(body);
if (result == null)
Assert.fail("Null result from find related business operation");
RelatedBusinessInfos bInfos = result.getRelatedBusinessInfos();
//both parties need to register the assertion for it to be live.
if (isOneSided) {
Assert.assertNull(bInfos);
} else {
if (bInfos == null)
Assert.fail("No result from find related business operation");
List<RelatedBusinessInfo> biList = bInfos.getRelatedBusinessInfo();
if (biList == null || biList.size() == 0)
Assert.fail("No result from find related business operation");
Set<String> keys = new HashSet<String>();
for (RelatedBusinessInfo relatedBusinessInfo : biList) {
keys.add(relatedBusinessInfo.getBusinessKey());