}
private StreamingServerConnector createStreamingServerConnector(OutputStream anOutputStream, SerializationPolicy aSerializationPolicy, EventServiceConfiguration aConfiguration) throws EventServiceException, IOException {
HttpServletResponse theResponseMock = mock(HttpServletResponse.class);
when(theResponseMock.getOutputStream()).thenReturn(new DummyServletOutputStream(anOutputStream));
final StreamingServerConnector theStreamingServerConnector;
if(aSerializationPolicy != null) {
theStreamingServerConnector = new StreamingServerConnector(aConfiguration, aSerializationPolicy);
} else {