@Test
public void writeShouldCallSendMethod() throws
        ResponseSendingException, ResolutionException, CookieSettingException, HeadersSetterException {

    HttpResponseSender sender = new HttpResponseSender("123");
    IObject environment = IOC.resolve(Keys.getOrAdd("info.smart_tools.smartactors.iobject.iobject.IObject"), "{\"foo\":\"bar\"}");
    when(responseStatusExtractor.extract(any(IObject.class))).thenReturn(200);
    when(response.getContent()).thenReturn("{\"foo\":\"bar\"}".getBytes());
    sender.send(response, environment, ctx);
    verify(cookiesExtractor, times(1)).set(any(FullHttpResponse.class), any(IObject.class));
    verify(headersExtractor, times(1)).set(any(FullHttpResponse.class), any(IObject.class));
    verify(ctx, times(1)).send(any(FullHttpResponse.class));
}