Fix the broken test because the 'getRepository' method is not called anymore in the constructor.