support.findStr(doc, "//report/package/class/@name"));
}
@Test
public void testMethod() throws Exception {
final IReportVisitor packageHandler = handler
.visitChild(new CoverageNodeImpl(ElementType.PACKAGE,
"org.jacoco.example", false));
final IReportVisitor classHandler = packageHandler
.visitChild(new CoverageNodeImpl(ElementType.CLASS, "Foo", true));
MethodCoverage node = new MethodCoverage("doit", "()V", null);
node.addBlock(5, new int[] { 15, 16, 17 }, false);
classHandler.visitChild(node).visitEnd(null);
classHandler.visitEnd(null);
packageHandler.visitEnd(null);
final Document doc = getDocument();
assertEquals("doit",
support.findStr(doc, "//report/package/class/method/@name"));
assertEquals("()V",