LightAdminConfigurationMonitoringServiceMBean { @ManagedOperation(description = "List all registered Domain Types") public Set<String> getDomainTypes() { final Set<String> result = newLinkedHashSet(); for (DomainTypeAdministrationConfiguration configuration : globalConfigurationManagementService.getRegisteredDomainTypeConfigurations()) { result.add(configuration.getDomainTypeName()); } 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 domainTypesInfoRetrieval() throws Exception { final Set<String> actualDomainTypes = testee.getDomainTypes(); final Set<String> expectedDomainTypeNames = newHashSet("address"); assertTrue(Sets.difference(expectedDomainTypeNames, actualDomainTypes).isEmpty()); }