unit tests for CountDownLatch

You also should do a check what the count is after the trySetCount failed. You don't want that anything bad has happened to the latch.