add a unit test that uses threads to test concurrency