add test for rewrite __init__