add tests for adding and resolving context