// Create a mock tag; the name doesn't truly matter
Element tag = doc.createElement("test");
tag.setAttribute("code", "${code}");
processor.expressionResults = ImmutableMap.of(
"${code}", "Hello <b>World</b>!");
DocumentFragment fragment = doc.createDocumentFragment();
handler.process(fragment, tag, processor);
assertEquals(3, fragment.getChildNodes().getLength());
assertEquals("b", fragment.getChildNodes().item(1).getNodeName());
}
}