Fixed unit-tests, the getRepository() is now called more often