Extract InitializeTestSynchronizationContext() method.