### Question:
ServiceResourceProvider extends AbstractControllerResourceProvider { @Override public Set<String> checkPropertyIds(Set<String> propertyIds) { propertyIds = super.checkPropertyIds(propertyIds); if (propertyIds.isEmpty()) { return propertyIds; } Set<String> unsupportedProperties = new HashSet<>(); for (String propertyId : propertyIds) { if (!propertyId.equals("config")) { String propertyCategory = PropertyHelper.getPropertyCategory(propertyId); if (propertyCategory == null || !propertyCategory.equals("config")) { unsupportedProperties.add(propertyId); } } } return unsupportedProperties; } @AssistedInject  ServiceResourceProvider(
      @Assisted AmbariManagementController managementController,
      MaintenanceStateHelper maintenanceStateHelper, RepositoryVersionDAO repositoryVersionDAO); @Override Set<String> checkPropertyIds(Set<String> propertyIds); void createServices(Set<ServiceRequest> requests); static final String SERVICE_CLUSTER_NAME_PROPERTY_ID; static final String SERVICE_SERVICE_NAME_PROPERTY_ID; static final String SERVICE_SERVICE_STATE_PROPERTY_ID; static final String SERVICE_MAINTENANCE_STATE_PROPERTY_ID; static final String SERVICE_CREDENTIAL_STORE_SUPPORTED_PROPERTY_ID; static final String SERVICE_CREDENTIAL_STORE_ENABLED_PROPERTY_ID; static final String SERVICE_ATTRIBUTES_PROPERTY_ID; static final String SERVICE_DESIRED_STACK_PROPERTY_ID; static final String SERVICE_DESIRED_REPO_VERSION_ID_PROPERTY_ID; }### Answer:
@Test public void testCheckPropertyIds() throws Exception { AmbariManagementController managementController = createMock(AmbariManagementController.class); MaintenanceStateHelper maintenanceStateHelperMock = createNiceMock(MaintenanceStateHelper.class); RepositoryVersionDAO repositoryVersionDAO = createNiceMock(RepositoryVersionDAO.class); replay(maintenanceStateHelperMock, repositoryVersionDAO); AbstractResourceProvider provider = new ServiceResourceProvider(managementController, maintenanceStateHelperMock, repositoryVersionDAO); Set<String> unsupported = provider.checkPropertyIds( Collections.singleton(ServiceResourceProvider.SERVICE_CLUSTER_NAME_PROPERTY_ID)); Assert.assertTrue(unsupported.isEmpty()); String subKey = PropertyHelper.getPropertyId(ServiceResourceProvider.SERVICE_CLUSTER_NAME_PROPERTY_ID, "key"); unsupported = provider.checkPropertyIds(Collections.singleton(subKey)); Assert.assertTrue(unsupported.isEmpty()); unsupported = provider.checkPropertyIds(Collections.singleton("bar")); Assert.assertEquals(1, unsupported.size()); Assert.assertTrue(unsupported.contains("bar")); for (String propertyId : provider.getPKPropertyIds()) { unsupported = provider.checkPropertyIds(Collections.singleton(propertyId)); Assert.assertTrue(unsupported.isEmpty()); } }