private void validateRequest(
            final int idx,
            final Node first,
            final Node previous,
            final Node request) {
        try {
            assertValidXML(request);
            assertSingleBodyElement(request);
            assertNoComments(request);
            assertNoProcessingInstructions(request);
            assertRequestIDSequential(request, previous);
            if (previous == null) {
                validateRequestHeaders(idx, request, previous);
                assertSessionCreationRequestID(request);
                assertSessionCreationRequestIDRange(request);
                validateSessionCreationAck(idx, request);
                validateSessionCreationSID(idx, request);
            } else {
                validateRequestHeaders(idx, request, previous);
                validateSubsequentRequestSID(idx, request);
                validateSubsequestRequestAck(idx, first, request);
                validateSubsequentPause(idx, request, previous);
            }
        } catch (AssertionError err) {
            LOG.info("Assertion failed for request #" + idx + ": "
                    + err.getMessage() + "\n" + request.getBody().toXML());
            throw(err);
        }
    }