Refactored default implementation of the instrumentation context and added test case.