Add test for returning context on wait()