Replaced semaphore with CountDownLatch and await the countdown so the example works
properly when run. Previously the semaphore would be acquired and the program would exit
before the callback fired and thus nothing printed. Doh.