@Test
public void testGetResources() throws Exception{

  Resource.Type type = Resource.Type.StackConfigurationDependency;
  AmbariManagementController managementController = createMock(AmbariManagementController.class);
  Set<StackConfigurationDependencyResponse> allResponse = new HashSet<StackConfigurationDependencyResponse>();
  
  allResponse.add(new StackConfigurationDependencyResponse("depName", "depType"));
 
  // set expectations
  expect(managementController.getStackConfigurationDependencies(
      AbstractResourceProviderTest.Matcher.getStackConfigurationDependencyRequestSet(null, null, null, null, null))).
      andReturn(allResponse).times(1);
  // replay
  replay(managementController);
  ResourceProvider provider = AbstractControllerResourceProvider.getResourceProvider(
      type,
      PropertyHelper.getPropertyIds(type),
      PropertyHelper.getKeyPropertyIds(type),
      managementController);
  Set<String> propertyIds = new HashSet<String>();
  propertyIds.add(StackConfigurationDependencyResourceProvider.STACK_NAME_PROPERTY_ID);
  propertyIds.add(StackConfigurationDependencyResourceProvider.STACK_VERSION_PROPERTY_ID);
  propertyIds.add(StackConfigurationDependencyResourceProvider.SERVICE_NAME_PROPERTY_ID);
  propertyIds.add(StackConfigurationDependencyResourceProvider.PROPERTY_NAME_PROPERTY_ID);
  propertyIds.add(StackConfigurationDependencyResourceProvider.DEPENDENCY_NAME_PROPERTY_ID);
  propertyIds.add(StackConfigurationDependencyResourceProvider.DEPENDENCY_TYPE_PROPERTY_ID);
  // create the request
  Request request = PropertyHelper.getReadRequest(propertyIds);
  // get all ... no predicate
  Set<Resource> resources = provider.getResources(request, null);
  Assert.assertEquals(allResponse.size(), resources.size());
  
  for (Resource resource : resources) {   
    String dependencyName = (String) resource.getPropertyValue(StackConfigurationDependencyResourceProvider.DEPENDENCY_NAME_PROPERTY_ID);
    String dependencyType = (String) resource.getPropertyValue(StackConfigurationDependencyResourceProvider.DEPENDENCY_TYPE_PROPERTY_ID);
    Assert.assertEquals("depName", dependencyName);
    Assert.assertEquals("depType", dependencyType);
  }
  // verify
  verify(managementController);
}