Code refactoring for the test delete init method and externalize instanciation of objects