### Question:
StreamUnsubscriber implements Unsubscriber { @Override public void unsubscribe(SubscriptionContext context) { WPSRequest request = new WPSRequest(); request.setIdentifier(StreamingConstants.UNSUBSCRIBE_PROCESS); request.setRawDataOutput(StreamingConstants.UNSUBSCRIBE_OUTPUT); List<HashMapEntryType> dataInputs = New.list(); HashMapEntryType filterId = new HashMapEntryType(); filterId.setKey(context.getFilterIdParameterName()); filterId.setValue(context.getStreamId().toString()); dataInputs.add(filterId); request.setDataInput(dataInputs); myRequestExecuter.execute(request); } StreamUnsubscriber(WPSRequestExecuter envoy); WPSRequestExecuter getEnvoy(); @Override void unsubscribe(SubscriptionContext context);  }### Answer:
@Test public void testUnsubscribe() { EasyMockSupport support = new EasyMockSupport(); support.replayAll(); MockWPSEnvoy envoy = new MockWPSEnvoy(ourExpectedHostUrl, ourExpectedUrl, ourXmlResponse); SubscriptionContext context = new SubscriptionContext(); context.setFilterIdParameterName("filterId"); context.setStreamId(UUID.fromString("8ff3a736-21fa-44a2-90f9-a47cb4f80f2c")); StreamUnsubscriber unsubscriber = new StreamUnsubscriber(envoy); unsubscriber.unsubscribe(context); assertTrue(envoy.wasRequestedCalled()); support.verifyAll(); }