public void saveDeleteOrganizations()
{
login();
Collection<Key> orgKeys = new ArrayList<Key>();
try {
RegistryService rs = connection.getRegistryService();
blm = rs.getBusinessLifeCycleManager();
Creator creator = new Creator(blm);
Collection<Organization> orgs = new ArrayList<Organization>();
Organization organization = creator.createOrganization(this.getClass().getName());
orgs.add(organization);
//save the Organization
BulkResponse br = blm.saveOrganizations(orgs);
assertEquals(JAXRResponse.STATUS_SUCCESS, br.getStatus());
orgKeys = (Collection<Key>) br.getCollection();
} catch (Exception e) {
e.printStackTrace();
fail(e.getMessage());
}
try {
RegistryService rs = connection.getRegistryService();
blm = rs.getBusinessLifeCycleManager();
BulkResponse br = blm.deleteOrganizations(orgKeys);
assertEquals(JAXRResponse.STATUS_SUCCESS, br.getStatus());
} catch (Exception e) {
e.printStackTrace();
fail(e.getMessage());