TESTS: added object tests running inside a function context.