@Test
public void testMimicMethods_with_same_methods_with_before_super() throws Exception {

    // GIVEN
    src.addField(new CtField(CtClass.intType, "foo", src));
    src.addMethod(CtNewMethod.make("public boolean foo() { foo = 2; return false ; }", 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 boolean foo() { foo *= 2; return true; }", dstAncestor));
    dstAncestor.addConstructor(CtNewConstructor.make("public " + dstAncestor.getName() + "() {}", dstAncestor));
    dst.setSuperclass(dstAncestor);
    dst.addMethod(CtNewMethod.make("public boolean foo() { foo = 1; return super.foo();}", dst));
    dstAncestor.toClass();
    // WHEN
    mimicCreator.mimicMethods(src, dst, MimicMode.BEFORE_SUPER, new MimicMethod[0]);
    // THEN
    Class<?> dstClass = dst.toClass();
    assertHasFooField(dst);
    Object dstInstance = dstClass.newInstance();
    invokeFoo(dstInstance);
    assertHasFooField(dstInstance, 4);
    assertHasFooMethod(dst, dstClass);
}