private static AppServerStatsPublishing prepareStatsPublishingConfigs() {
    AppServerStatsPublishing configuration = new AppServerStatsPublishing();

    configuration.setUsername(Constants.USERNAME);
    configuration.setPassword(Constants.PASSWORD);
    configuration.setDataAgentType(Constants.DATA_AGENT_TYPE);
    configuration.setAuthenticationURL(Constants.AUTHN_URL);
    configuration.setPublisherURL(Constants.PUBLISHER_URL);
    configuration.setStreamId(Constants.STREAM_ID);

    return configuration;
  }
 private static boolean compareStatsPublishingConfigurations(
     AppServerStatsPublishing actual, AppServerStatsPublishing expected) {
   if ((actual != null) && (expected != null)) {
     boolean username = actual.getUsername().trim().equals(expected.getUsername());
     boolean password = actual.getPassword().trim().equals(expected.getPassword());
     boolean dataAgent = actual.getDataAgentType().trim().equals(expected.getDataAgentType());
     boolean authnURL =
         actual.getAuthenticationURL().trim().equals(expected.getAuthenticationURL());
     boolean publisherURL = actual.getPublisherURL().trim().equals(expected.getPublisherURL());
     boolean streamID = actual.getStreamId().trim().equals(expected.getStreamId());
     return (username && password && dataAgent && authnURL && publisherURL && streamID);
   } else {
     return (actual == null) && (expected == null);
   }
 }