Added tests and fixed bug in DI container.