add assertion
more mock-scope and test improvements