unit test for Semaphore

I would do the last part like this:
```
boolean result = semaphore.tryAcquire(1);
...line
assertFalse(result);
assertEquals(0, semaphore.permitCount())
```