LightAdminConfigurationMonitoringServiceMBean { @ManagedOperation(description = "List all registered Domain Type Configurations") public Set<String> getDomainTypeAdministrationConfigurations() { final Set<String> result = newLinkedHashSet(); for (DomainTypeAdministrationConfiguration configuration : globalConfigurationManagementService.getRegisteredDomainTypeConfigurations()) { result.add(configuration.getConfigurationName()); } return result; } LightAdminConfigurationMonitoringServiceMBean(final GlobalConfigurationManagementService globalConfigurationManagementService); @ManagedOperation(description = "List all registered Domain Type Configurations") Set<String> getDomainTypeAdministrationConfigurations(); @ManagedOperation(description = "List all registered Domain Types") Set<String> getDomainTypes(); static final String MBEAN_NAME; }
@Test public void domainConfigurationNamesRetrieval() throws Exception { final Set<String> actualConfigurationNames = testee.getDomainTypeAdministrationConfigurations(); final Set<String> expectedConfigurationNames = newHashSet("AddressConfiguration"); assertTrue(Sets.difference(expectedConfigurationNames, actualConfigurationNames).isEmpty()); }