add tests for dependency injection feature
out-source the dependency resolving into a separate class
finally implements and test the injection mechanism
Merge pull request #23 from rainu/issue-22-DI

Issue 22 di