@Test
  public void testCreateResources() throws Exception {

    AmbariManagementController managementController = createMock(AmbariManagementController.class);
    RequestStatusResponse response = createNiceMock(RequestStatusResponse.class);

    managementController.createConfiguration(AbstractResourceProviderTest.Matcher.getConfigurationRequest(
        "Cluster100", "type", "tag", new HashMap<>(), null));
    expectLastCall().andReturn(null);

    // replay
    replay(managementController, response);

    ConfigurationResourceProvider provider = new ConfigurationResourceProvider(
        managementController);

    Set<Map<String, Object>> propertySet = new LinkedHashSet<>();

    Map<String, Object> properties = new LinkedHashMap<>();

    properties.put(ConfigurationResourceProvider.CLUSTER_NAME, "Cluster100");
    properties.put(ConfigurationResourceProvider.TAG, "tag");
    properties.put(ConfigurationResourceProvider.TYPE, "type");

    propertySet.add(properties);

    // create the request
    Request request = PropertyHelper.getCreateRequest(propertySet, null);

    provider.createResources(request);

    // verify
    verify(managementController, response);
  }
Tests for the configuration resource provider.
ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ConfigurationResourceProviderTest.java