this.validateXmlHasNoPackageNames(resourceResponse);
}
@Test
public void testGlobalConfigurationResourceResponse() {
GlobalConfigurationResourceResponse resourceResponse = new GlobalConfigurationResourceResponse();
GlobalConfigurationResource resource = new GlobalConfigurationResource();
resource.setSecurityAnonymousAccessEnabled(true);
resource.setSecurityAnonymousPassword("anonPass");
resource.setSecurityAnonymousUsername("anonUser");
// TODO: Figure out why this is causing test to fail...
// resource.setSecurityRealms( Arrays.asList( "realm1", "realm2" ) );
RestApiSettings restSet = new RestApiSettings();
restSet.setBaseUrl("baseUrl");
restSet.setForceBaseUrl(false);
resource.setGlobalRestApiSettings(restSet);
RemoteConnectionSettings connSet = new RemoteConnectionSettings();
connSet.setConnectionTimeout(2);
connSet.setQueryString("queryString");
connSet.setRetrievalRetryCount(6);
connSet.setUserAgentString("userAgentString");
resource.setGlobalConnectionSettings(connSet);
RemoteHttpProxySettingsDTO proxyHttpSet = new RemoteHttpProxySettingsDTO();
proxyHttpSet.setProxyHostname("proxyHostname1");
proxyHttpSet.setProxyPort(78);
AuthenticationSettings authSet = new AuthenticationSettings();
authSet.setNtlmDomain("ntlmDomain1");
authSet.setNtlmHost("ntlmHost1");
authSet.setPassword("password1");
authSet.setUsername("username1");
proxyHttpSet.setAuthentication(authSet);
RemoteHttpProxySettingsDTO proxyHttpsSet = new RemoteHttpProxySettingsDTO();
proxyHttpsSet.setProxyHostname("proxyHostname2");
proxyHttpsSet.setProxyPort(87);
AuthenticationSettings httpsAuthSet = new AuthenticationSettings();
httpsAuthSet.setNtlmDomain("ntlmDomain2");
httpsAuthSet.setNtlmHost("ntlmHost2");
httpsAuthSet.setPassword("password2");
httpsAuthSet.setUsername("username2");
proxyHttpsSet.setAuthentication(httpsAuthSet);
RemoteProxySettingsDTO proxySet = new RemoteProxySettingsDTO();
proxySet.setHttpProxySettings(proxyHttpSet);
proxySet.setHttpsProxySettings(proxyHttpsSet);
resource.setRemoteProxySettings(proxySet);
SmtpSettings smtpSet = new SmtpSettings();
smtpSet.setHost("host");
smtpSet.setPassword("password");
smtpSet.setPort(42);
smtpSet.setSslEnabled(true);
smtpSet.setSystemEmailAddress("foo@bar.com");
smtpSet.setTlsEnabled(true);
smtpSet.setUsername("username");
resource.setSmtpSettings(smtpSet);
resourceResponse.setData(resource);
this.marshalUnmarchalThenCompare(resourceResponse);
this.validateXmlHasNoPackageNames(resourceResponse);
}