assertEquals(api.getOrgApi().getEmailSettings(orgRef.getHref()), expected);
}
@Test
public void testEditEmailSettings() {
VCloudDirectorAdminApi api = requestsSendResponses(
loginRequest,
sessionResponse,
new VcloudHttpRequestPrimer()
.apiCommand("PUT", "/admin/org/6f312e42-cd2b-488d-a2bb-97519cd57ed0/settings/email")
.xmlFilePayload("/org/admin/editEmailSettingsSource.xml",
VCloudDirectorMediaType.ORG_EMAIL_SETTINGS)
.acceptMedia(VCloudDirectorMediaType.ORG_EMAIL_SETTINGS).httpRequestBuilder().build(),
new VcloudHttpResponsePrimer()
.xmlFilePayload("/org/admin/editEmailSettings.xml",
VCloudDirectorMediaType.ORG_EMAIL_SETTINGS).httpResponseBuilder().build());
OrgEmailSettings expected = editEmailSettings();
assertEquals(api.getOrgApi().editEmailSettings(orgRef.getHref(), expected), expected);
}