RequestFilter extends AbstractIoFilter { @SuppressWarnings("rawtypes") @Override public void sessionOpened(IoSession session) { session.setAttribute(IN_FLIGHT_REQUESTS, new ConcurrentHashMap()); }  @SuppressWarnings({ "rawtypes", "unchecked" }) IoFuture<RESPONSE> request(IoSession session, REQUEST request, long timeoutInMs); @SuppressWarnings("rawtypes") @Override void sessionOpened(IoSession session); @SuppressWarnings("unchecked") @Override void messageReceived(IoSession session, Object message, ReadFilterChainController controller); @Override void sessionClosed(IoSession session);  }
@Test public void session_open_initialize_in_flight_container() { IoSession session = mock(IoSession.class); rq.sessionOpened(session); verify(session).setAttribute(same(RequestFilter.IN_FLIGHT_REQUESTS), any(Map.class)); verifyNoMoreInteractions(session); }