@Test
public void testUpdateResources() throws Exception {

  IvoryService service = createMock(IvoryService.class);
  Set<Map<String, Object>> propertySet = new HashSet<Map<String, Object>>();
  Map<String, Object> properties = new HashMap<String, Object>();
  properties.put(InstanceResourceProvider.INSTANCE_FEED_NAME_PROPERTY_ID, "Feed1");
  properties.put(InstanceResourceProvider.INSTANCE_ID_PROPERTY_ID, "Instance1");
  properties.put(InstanceResourceProvider.INSTANCE_STATUS_PROPERTY_ID, "SUSPEND");
  properties.put(InstanceResourceProvider.INSTANCE_START_TIME_PROPERTY_ID, "ST");
  properties.put(InstanceResourceProvider.INSTANCE_END_TIME_PROPERTY_ID, "ET");
  properties.put(InstanceResourceProvider.INSTANCE_DETAILS_PROPERTY_ID, "DETAILS");
  properties.put(InstanceResourceProvider.INSTANCE_LOG_PROPERTY_ID, "log");
  List<Instance> instances = new LinkedList<Instance>();
  // set expectations
  expect(service.getFeedNames()).andReturn(Collections.singletonList("Feed1"));
  expect(service.getInstances("Feed1")).andReturn(instances);
  // replay
  replay(service);
  propertySet.add(properties);
  Request request = PropertyHelper.getCreateRequest(propertySet, Collections.<String,String>emptyMap());
  InstanceResourceProvider provider = new InstanceResourceProvider(service,
      PropertyHelper.getPropertyIds(Resource.Type.DRInstance),
      PropertyHelper.getKeyPropertyIds(Resource.Type.DRInstance));
  provider.updateResources(request, null);
  // verify
  verify(service);
}