@Test
public void testDoIt_calls_afterburner_with_after_override() throws CannotCompileException, AfterBurnerImpossibleException, NotFoundException {

    //GIVEN
    afterBurnerMock = EasyMock.createMock(AfterBurner.class);
    afterBurnerMock.addOrInsertMethod((InsertableMethod) EasyMock.anyObject());
    EasyMock.replay(afterBurnerMock);
    signatureExtractorMock = EasyMock.createMock(CtMethodJavaWriter.class);
    EasyMock.expect(signatureExtractorMock.invokeSuper((CtMethod) EasyMock.anyObject())).andReturn("super.foo()");
    EasyMock.expect(signatureExtractorMock.createJavaSignature((CtMethod) EasyMock.anyObject())).andReturn("public void foo()");
    EasyMock.replay(signatureExtractorMock);
    CtClass targetClassAncestor = ClassPool.getDefault().makeClass(
            "TargetAncestor" + TestCounter.testCounter++);
    targetClassAncestor.addMethod(CtNewMethod.make("public void foo() { }", targetClassAncestor));
    CtClass targetClass = ClassPool.getDefault().makeClass(
            "Target" + TestCounter.testCounter++);
    targetClass.setSuperclass(targetClassAncestor);
    targetClass.addMethod(CtNewMethod.make("public void foo() { super.foo(); }", targetClass));
    //WHEN
    builder = new InsertableMethodBuilder(afterBurnerMock, signatureExtractorMock);
    CtClass classToInsertInto = targetClass;
    String targetMethod = "foo";
    String body = "";
    builder
        .insertIntoClass(classToInsertInto)
        .afterOverrideMethod(targetMethod)
        .withBody(body)
        .doIt();
    //THEN
    EasyMock.verify(afterBurnerMock);
}