redo constructor injection add test cases