add test for with_context