Add mock.getContext() helper
domains: simplify unit test