public void testGetBundle() {
final IClassStructureVisitor classStructure1 = coverageBuilder
.visitClassStructure(1);
classStructure1.visit("org/jacoco/examples/Sample1", null,
"java/lang/Object", new String[0]);
final IMethodStructureVisitor methodStructure1 = classStructure1
.visitMethodStructure("doit", "()V", null);
methodStructure1.block(0, 3, new int[] { 3, 4, 5 });
methodStructure1.visitEnd();
classStructure1.visitEnd();
final IClassStructureVisitor classStructure2 = coverageBuilder
.visitClassStructure(2);
classStructure2.visit("org/jacoco/examples/Sample2", null,
"java/lang/Object", new String[0]);
final IMethodStructureVisitor methodStructure2 = classStructure2
.visitMethodStructure("doit", "()V", null);
methodStructure2.block(0, 3, new int[] { 6, 7, 8 });
methodStructure2.visitEnd();
classStructure2.visitEnd();
final IClassStructureVisitor classStructure3 = coverageBuilder
.visitClassStructure(3);
classStructure3.visit("Sample3", null, "java/lang/Object",
new String[0]);
final IMethodStructureVisitor methodStructure3 = classStructure3
.visitMethodStructure("doit", "()V", null);
methodStructure3.block(0, 2, new int[] { 1, 2 });
methodStructure3.visitEnd();
classStructure3.visitEnd();
BundleCoverage bundle = coverageBuilder.getBundle("testbundle");
assertEquals("testbundle", bundle.getName());