be.setBusinessKey(TckBusiness.JOE_BUSINESS_KEY);
Name n = new Name();
n.setValue("JUDDI_716_SaveBusinessAllOptions");
be.getName().add(n);
DigSigUtil ds = GetDigSig();
ds.put(DigSigUtil.SIGNATURE_OPTION_CERT_INCLUSION_SERIAL, "true");
ds.put(DigSigUtil.SIGNATURE_OPTION_CERT_INCLUSION_SUBJECTDN, "true");
be = ds.signUddiEntity(be);
sb.getBusinessEntity().add(be);
BusinessDetail saveBusiness = null;
try {
saveBusiness = publicationJoe.saveBusiness(sb);
GetBusinessDetail gsb = new GetBusinessDetail();
gsb.setAuthInfo(authInfoJoe);
gsb.getBusinessKey().add(saveBusiness.getBusinessEntity().get(0).getBusinessKey());
BusinessDetail businessDetail = inquiryJoe.getBusinessDetail(gsb);
PrintUDDI<BusinessEntity> printer = new PrintUDDI<BusinessEntity>();
System.out.println(printer.print(businessDetail.getBusinessEntity().get(0)));
AtomicReference<String> msg = new AtomicReference<String>();
boolean b = ds.verifySignedUddiEntity(businessDetail.getBusinessEntity().get(0), msg);
Assert.assertTrue(msg.get(), b);
Assert.assertTrue(msg.get() == null || msg.get().length() == 0);
} catch (Exception ex) {
logger.error("unExpected failure: ", ex);