Refactor all tests with Spring framework