Adding tests for context passing

To show issue #548