@Test
public void testDeleteResources() throws Exception {

  IvoryService service = createMock(IvoryService.class);
  Instance instance1 = new Instance("Feed1", "Instance1", "SUBMITTED", "start", "end", "details", "log");
  // set expectations
  expect(service.getFeedNames()).andReturn(Collections.singletonList("Feed1"));
  expect(service.getInstances("Feed1")).andReturn(Collections.singletonList(instance1));
  service.killInstance("Feed1", "Instance1");
  // replay
  replay(service);
  InstanceResourceProvider provider = new InstanceResourceProvider(service,
      PropertyHelper.getPropertyIds(Resource.Type.DRInstance),
      PropertyHelper.getKeyPropertyIds(Resource.Type.DRInstance));
  Predicate predicate = new PredicateBuilder().property(InstanceResourceProvider.INSTANCE_ID_PROPERTY_ID).equals("Instance1").toPredicate();
  provider.deleteResources(new RequestImpl(null, null, null, null), predicate);
  // verify
  verify(service);
}