public boolean doMessageReceived(ChannelHandlerContext context, MessageEvent event, Channel channel) throws Exception {
Object msg = event.getMessage();
if(msg instanceof IcapResponse) {
IcapResponse response = (IcapResponse)msg;
DataMockery.assertCreateREQMODWithPostRequestAndDataIcapResponse(response);
if(response.containsHeader("TEST")) {
end = true;
} else {
channel.write(DataMockery.createREQMODWithPostRequestAndDataIcapMessage());
}
}