Add threading unit test