private static ComposableBody toComposableBody(final AbstractBody body) {
        if (body instanceof ComposableBody) {
            return (ComposableBody) body;
        }
        try {
            StaticBody sBody = StaticBody.fromString(body.toXML());
            return ComposableBody.fromStaticBody(sBody);
        } catch (BOSHException boshx) {
            fail("Could not convert body to static body: " + body);
        }
        throw(new IllegalStateException("Shouldn't get here"));
    }