@Test public void executeWithoutPageHeader() throws IOException, ServletException { final KeywordsGroup keywordsGroup = TestUtil.createKeywordsGroup(); keywordsGroup.setName("g"); keywordsGroup.setValue("a,a1"); pageVersion.addKeywordsGroup(keywordsGroup); render.execute(null, stringBuilder); Assert.assertEquals("", stringBuilder.toString()); }
@Test public void executeWithSite() throws IOException, ServletException { final KeywordsGroup keywordsGroup = TestUtil.createKeywordsGroup(); keywordsGroup.setName("g"); keywordsGroup.setValue("a,a1"); pageVersion.addKeywordsGroup(keywordsGroup); stringBuilder.append("<!-- PAGE_HEADER -->"); render.execute(null, stringBuilder); Assert.assertEquals( "<meta name=\"keywords\" content=\"a,a1\">\n" + "<!-- PAGE_HEADER -->", stringBuilder.toString()); }