@Test public void testGetContent_shouldEscapeHtmlWhenArgumentEscapeHtmlSetToTrue() throws Exception { when(build.getLog(anyInt())) .thenReturn( new LinkedList<String>() { { add("<b>bold</b>"); } }); buildLogContent.escapeHtml = true; String content = buildLogContent.evaluate(build, listener, BuildLogContent.MACRO_NAME); assertEquals("<b>bold</b>\n", content); }