added jUnit test for multithreaded