    @Test
    public void getIframeAdminContentWrapperTemplate() throws IOException {


        String iframeTemplate = DocumentOutputUtil.getIframeAdminContentWrapperTemplate();

        Document document = Jsoup.parse(iframeTemplate, "testBase");

        // assert that there is iframeElement and that it uses the expeted context variables

        Elements wrapperElement = document.select("div");

        Assert.assertEquals(1, wrapperElement.size());
        Assert.assertEquals("${iframeId}-wrapper", wrapperElement.attr("id"));

        // assert that there are two script elements and that they use expected context variables

        Elements scriptElements = document.select("script");

        Assert.assertEquals(1, scriptElements.size());

        // script element should add the resizer-js as unescaped text to the (inline) script element
        // and contain references for contextParam and initCallback
        // don't try to check the js here, just that the velocity variables exist
        Element scriptEl = scriptElements.get(0);

        Map<String, Integer> refs = SparkTestUtils.checkVelocityFragmentReferences(scriptEl.html().trim(),
                Arrays.asList(sparkJsContextKey + "WithHtml", iframeInjContextVelocityKey, iframeIdContextKey, iframeSrcContextKey),
                true);

        Assert.assertTrue(refs.get(iframeInjContextVelocityKey) > 0);

        // should call iFrameResize on the iframe with correct id
        Assert.assertTrue(refs.get(iframeIdContextKey) > 0);

    }