'Tests when time is "stopped", values are assigned incrementally
@since 3.8.0
@jira_ticket PYTHON-676
@expected_result the returned values increase
@test_category timing'

def test_should_generate_incrementing_timestamps_for_all_threads(self):

    lock = Lock()
    def request_time():
        for _ in range(timestamp_to_generate):
            timestamp = tsg()
            with lock:
                generated_timestamps.append(timestamp)
    tsg = timestamps.MonotonicTimestampGenerator()
    fixed_time = 1
    num_threads = 5
    timestamp_to_generate = 1000
    generated_timestamps = []
    with mock.patch('time.time', new=mock.Mock(return_value=fixed_time)):
        threads = []
        for _ in range(num_threads):
            threads.append(Thread(target=request_time))
        for t in threads:
            t.start()
        for t in threads:
            t.join()
        self.assertEqual(len(generated_timestamps), (num_threads * timestamp_to_generate))
        for (i, timestamp) in enumerate(sorted(generated_timestamps)):
            self.assertEqual(int((i + 1000000.0)), timestamp)
