Avoid testing non-static method in a static way