@Test public void unbind() { ServiceBindingsBuilder builder = new ServiceBindingsBuilder(); builder.bind("one", "two"); builder.bind("three", "four"); builder.unbind("one"); checkOnlyBinding(builder, "three", "four", false, false); }
public void unbind(String interfaceName) { ServiceBinding binding = bindings.remove(interfaceName); if (binding != null) { if (binding.isLocked()) { throw new ServiceConfigurationException("interface " + interfaceName + " is locked and cannot be unbound"); } } }
ServiceBindingsBuilder { public void unbind(String interfaceName) { ServiceBinding binding = bindings.remove(interfaceName); if (binding != null) { if (binding.isLocked()) { throw new ServiceConfigurationException("interface " + interfaceName + " is locked and cannot be unbound"); } } } }
ServiceBindingsBuilder { public void unbind(String interfaceName) { ServiceBinding binding = bindings.remove(interfaceName); if (binding != null) { if (binding.isLocked()) { throw new ServiceConfigurationException("interface " + interfaceName + " is locked and cannot be unbound"); } } }  }
ServiceBindingsBuilder { public void unbind(String interfaceName) { ServiceBinding binding = bindings.remove(interfaceName); if (binding != null) { if (binding.isLocked()) { throw new ServiceConfigurationException("interface " + interfaceName + " is locked and cannot be unbound"); } } }  void bind(String interfaceName, String className, ClassLoader classLoader); Collection<ServiceBinding> getAllBindings(boolean strict); List<String> getPriorities(); void lock(String interfaceName); void markDirectlyRequired(String interfaceName); void mustBeBound(String interfaceName); void mustBeLocked(String interfaceName); void prioritize(String interfaceName); void markSectionEnd(); void unbind(String interfaceName); }
ServiceBindingsBuilder { public void unbind(String interfaceName) { ServiceBinding binding = bindings.remove(interfaceName); if (binding != null) { if (binding.isLocked()) { throw new ServiceConfigurationException("interface " + interfaceName + " is locked and cannot be unbound"); } } }  void bind(String interfaceName, String className, ClassLoader classLoader); Collection<ServiceBinding> getAllBindings(boolean strict); List<String> getPriorities(); void lock(String interfaceName); void markDirectlyRequired(String interfaceName); void mustBeBound(String interfaceName); void mustBeLocked(String interfaceName); void prioritize(String interfaceName); void markSectionEnd(); void unbind(String interfaceName);  }