HFCAAffiliation { public HFCAAffiliationResp create(User registrar) throws AffiliationException, InvalidArgumentException { return create(registrar, false); } HFCAAffiliation(String name, HFCAClient client);   HFCAAffiliation(JsonObject result); String getName(); String getUpdateName(); void setUpdateName(String updateName); Collection<HFCAAffiliation> getChildren(); Collection<HFCAIdentity> getIdentities(); HFCAAffiliation createDecendent(String name); HFCAAffiliation getChild(String name); boolean isDeleted(); int read(User registrar); HFCAAffiliationResp create(User registrar); HFCAAffiliationResp create(User registrar, boolean force); HFCAAffiliationResp update(User registrar); HFCAAffiliationResp update(User registrar, boolean force); HFCAAffiliationResp delete(User registrar); HFCAAffiliationResp delete(User registrar, boolean force);  }
@Test public void createAffiliationNoServerResponse() throws Exception { thrown.expect(AffiliationException.class); thrown.expectMessage("Error while creating affiliation"); HFCAClient client = HFCAClient.createNewInstance("http: client.setCryptoSuite(crypto); HFCAAffiliation aff = client.newHFCAAffiliation("neworg1"); aff.create(admin); }