Add mockclass to thread test.