unit test for Semaphore