added unit tests and a DI setup for them