Adds a basic thread-safety test case.