Added tests for validation, wiring of dependency to mock