@Test
public void testMimicMethods_with_same_methods_in_super_class_with_before() throws Exception {

    // GIVEN
    src.addField(new CtField(CtClass.intType, "foo", src));
    src.addMethod(CtNewMethod.make("public void foo() { foo = 4; }", src));
    CtClass dstAncestor = ClassPool.getDefault().makeClass("DstAncestor" + TestCounter.testCounter);
    CtField field = new CtField(CtClass.intType, "foo", dstAncestor);
    field.setModifiers(Modifier.PUBLIC);
    dstAncestor.addField(field);
    dstAncestor.addMethod(CtNewMethod.make("public void bar() {}", dstAncestor));
    dstAncestor.addConstructor(CtNewConstructor.make("public " + dstAncestor.getName() + "() {}", dstAncestor));
    dst.setSuperclass(dstAncestor);
    dst.addField(new CtField(CtClass.intType, "foo", dst));
    dst.addMethod(CtNewMethod.make("public void foo() { foo = 2; bar(); }", dst));
    // WHEN
    MimicMethod mimicMethod = createMimicMethod(MimicMode.BEFORE, "foo", "bar");
    mimicCreator.mimicMethods(src, dst, MimicMode.BEFORE, new MimicMethod[] { mimicMethod });
    dstAncestor.toClass();
    // THEN
    Class<?> dstClass = dst.toClass();
    assertHasFooField(dst);
    Object dstInstance = dstClass.newInstance();
    invokeFoo(dstInstance);
    assertHasFooField(dstInstance, 4);
}