@Test
  public void testCreateAttributesResources() throws Exception {

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

    managementController.createConfiguration(AbstractResourceProviderTest.Matcher.getConfigurationRequest(
        "Cluster100", "type", "tag", new HashMap<String, String>(){
          {
            put("a", "b");
          }
        }, new HashMap<String, Map<String,String>>(){
          {
            put("final", new HashMap<String, String>(){
              {
                put("a", "true");
              }
            });
          }
        }));
    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");
    properties.put("properties/a", "b");
    properties.put("properties_attributes/final/a", "true");

    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