### Question:
AdapterWorkerManagement { public void stopSetAdapter (AdapterSetDescription adapterSetDescription) throws AdapterException { stopAdapter(adapterSetDescription); }  Collection<Protocol> getAllProtocols(); Protocol getProtocol(String id); Collection<Adapter> getAllAdapters(); Adapter getAdapter(String id); void invokeStreamAdapter(AdapterStreamDescription adapterStreamDescription); void stopStreamAdapter(AdapterStreamDescription adapterStreamDescription); void invokeSetAdapter(AdapterSetDescription adapterSetDescription); void stopSetAdapter(AdapterSetDescription adapterSetDescription);  }### Answer:
@Test public void stopSetAdapterFail() { String expected = "Adapter with id http: AdapterSetDescription asd = new GenericAdapterSetDescription(); asd.setUri("http: AdapterWorkerManagement adapterManagement = new AdapterWorkerManagement(); try { adapterManagement.stopSetAdapter(asd); fail(); } catch (AdapterException e) { assertEquals(expected, e.getMessage()); } }
@Test public void stopSetAdapterSuccess() throws AdapterException { TestAdapter testAdapter = getTestAdapterInstance(); RunningAdapterInstances.INSTANCE.addAdapter("http: AdapterWorkerManagement adapterWorkerManagement = new AdapterWorkerManagement(); adapterWorkerManagement.stopSetAdapter(Utils.getMinimalSetAdapter()); assertTrue(testAdapter.calledStop); }