unit test for Semaphore

:+1: 

Now we know that nothing has been damaged.