private void validateRequestHeaders(
            final int idx,
            final Node request,
            final Node previous) {
        AbstractBody body = request.getBody();
        if (previous == null) {
            // session creation request
            assertNotNull("to attribute not present in request #" + idx,
                    body.getAttribute(Attributes.TO));
            assertNotNull("xml:lang attribute not present in request #" + idx,
                    body.getAttribute(Attributes.XML_LANG));
            assertNotNull("ver attribute not present in request #" + idx,
                    body.getAttribute(Attributes.VER));
            assertNotNull("wait attribute not present in request #" + idx,
                    body.getAttribute(Attributes.WAIT));
            assertNotNull("hold attribute not present in request #" + idx,
                    body.getAttribute(Attributes.HOLD));
        } else {
            // subsequent request
            assertNull("to attribute was present in request #" + idx,
                    body.getAttribute(Attributes.TO));
            assertNull("xml:lang attribute was present in request #" + idx,
                    body.getAttribute(Attributes.XML_LANG));
            assertNull("ver attribute was present in request #" + idx,
                    body.getAttribute(Attributes.VER));
            assertNull("wait attribute was present in request #" + idx,
                    body.getAttribute(Attributes.WAIT));
            assertNull("hold attribute was present in request #" + idx,
                    body.getAttribute(Attributes.HOLD));
        }
    }