change loading emf by spring, refactor unit tests