protected static void assertAttribute(
            final AbstractBody body,
            final BodyQName name,
            final String expected) {
        assertNotNull("Body was null", body);
        assertNotNull("BodyQName was null", name);
        String val = body.getAttribute(name);
        if (expected == null) {
            assertNull("Name (" + name + ") should have been null", val);
        } else {
            assertEquals(
                    "Name (" + name + ") was not '" + expected + "'",
                    expected, val);
        }
    }