@Test
public void testUpdateResources() throws Exception {

  Resource.Type type = Resource.Type.Repository;
  AmbariManagementController managementController = EasyMock.createMock(AmbariManagementController.class);
  RepositoryResponse rr = new RepositoryResponse(VAL_BASE_URL, VAL_OS,
      VAL_REPO_ID, VAL_REPO_NAME, null, null ,null);
  Set<RepositoryResponse> allResponse = new HashSet<RepositoryResponse>();
  allResponse.add(rr);
  // set expectations
  expect(managementController.getRepositories(EasyMock.<Set<RepositoryRequest>>anyObject())).andReturn(allResponse).times(1);
  managementController.updateRepositories(EasyMock.<Set<RepositoryRequest>>anyObject());
  // replay
  replay(managementController);
  ResourceProvider provider = new RepositoryResourceProvider(managementController);
  // add the property map to a set for the request.
  Map<String, Object> properties = new LinkedHashMap<String, Object>();
  properties.put(RepositoryResourceProvider.REPOSITORY_BASE_URL_PROPERTY_ID, "http://garbage.eu.co");
  // create the request
  Request request = PropertyHelper.getUpdateRequest(properties, null);
  Predicate predicate =
      new PredicateBuilder().property(RepositoryResourceProvider.REPOSITORY_STACK_NAME_PROPERTY_ID).equals(VAL_STACK_NAME)
        .and().property(RepositoryResourceProvider.REPOSITORY_STACK_VERSION_PROPERTY_ID).equals(VAL_STACK_VERSION)
        .toPredicate();
  provider.updateResources(request, predicate);
  // verify
  verify(managementController);
}