public static FullHttpResponse decodeFullHttpResponse(final EmbeddedChannel channel) {
final EmbeddedChannel ch = new EmbeddedChannel(new HttpResponseDecoder());
ch.writeInbound(channel.outboundMessages().toArray());
final HttpResponse response = ch.readInbound();
final HttpContent content = ch.readInbound();
final DefaultFullHttpResponse fullResponse;
if (content != null) {
fullResponse = new DefaultFullHttpResponse(response.getProtocolVersion(), response.getStatus(), content.content());
} else {
fullResponse = new DefaultFullHttpResponse(response.getProtocolVersion(), response.getStatus());