private void validateOveractivePolling(
            final int index,
            final StubConnection conn,
            final StubConnection previous) {
        BOSHClient session = client.get();
        if (session == null || previous == null) {
            // No established session
            return;
        }

        ComposableBody prevReq =
                toComposableBody(previous.getRequest().getBody());
        ComposableBody req =
                toComposableBody(conn.getRequest().getBody());
        String prevIDStr = prevReq.getAttribute(Attributes.RID);
        String idStr = req.getAttribute(Attributes.RID);
        long prevID = Long.parseLong(prevIDStr);
        long id = Long.parseLong(idStr);
        if (!(prevReq.getPayloadXML().isEmpty()
                && req.getPayloadXML().isEmpty())
                && (id - prevID != 1)) {
            // Not two consecutive empty requests
            return;
        }

        ComposableBody prevResp =
                toComposableBody(previous.getResponse().getBody());
        if (!prevResp.getPayloadXML().isEmpty()) {
            // Previous response was not empty
            return;
        }

        CMSessionParams params = session.getCMSessionParams();
        if (params == null) {
            // Nothing to validate against
            return;
        }

        AttrPolling polling = params.getPollingInterval();
        if (polling == null) {
            // Nothing to check against
            return;
        }

        long prevTime = previous.getRequest().getRequestTime();
        long connTime = conn.getRequest().getRequestTime();
        long delta = connTime - prevTime;
        if (delta < polling.getInMilliseconds() ) {
            fail("Polling session overactivity policy violation in "
                    + "connection #" + index + " (" + delta + " < "
                    + polling.getInMilliseconds() + ")");
        }
    }