Adding backend unit tests with dependency injection