DocumentOutputUtil { public static String getIframeAdminContentWrapperTemplate() throws IOException { try (InputStream templateStream = DocumentOutputUtil.class.getClassLoader().getResourceAsStream(IFRAME_CONTENT_WRAPPER_TEMPLATE_PATH)) { return IOUtils.toString(templateStream, "UTF-8"); } }  static void applyCacheKeysToResourceUrls(Document document, long pluginModifiedTimestamp, Locale locale); static String getIframeContentWindowJs(); static String getIframeAdminContentWrapperTemplate(); static Map<String, Object> generateAdminIframeTemplateContext(
            String appBaseUrl, String iframeIdToUse,
            String iframeContextInfo, String queryString);  }
@Test public void getIframeAdminContentWrapperTemplate() throws IOException { String iframeTemplate = DocumentOutputUtil.getIframeAdminContentWrapperTemplate(); Document document = Jsoup.parse(iframeTemplate, "testBase"); Elements wrapperElement = document.select("div"); Assert.assertEquals(1, wrapperElement.size()); Assert.assertEquals("${iframeId}-wrapper", wrapperElement.attr("id")); Elements scriptElements = document.select("script"); Assert.assertEquals(1, scriptElements.size()); 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); Assert.assertTrue(refs.get(iframeIdContextKey) > 0); }