add DI for functions/methods/closures; add unit-test for DI features