Add tests on context and sub context, synchronous and asynchronous