@Test public void testRemoveService() throws Exception { ServiceHolder tested = new ServiceHolder(); final Object service = new Object(); Set<Object> servicesSet = (Set<Object>) getInternalState(tested, "services"); servicesSet.add(service); tested.removeService(service); assertTrue("Set should be empty after removeal.", servicesSet.isEmpty()); }
public void removeService(Object service) { services.remove(service); }
ServiceHolder { public void removeService(Object service) { services.remove(service); } }
ServiceHolder { public void removeService(Object service) { services.remove(service); }  }
ServiceHolder { public void removeService(Object service) { services.remove(service); }  void addService(Object service); void removeService(Object service); }
ServiceHolder { public void removeService(Object service) { services.remove(service); }  void addService(Object service); void removeService(Object service);  }