Refactoring synchronized/notify constructs to CountdownLatch

In my case, test never finishes with original synchronize/notify approach for flow.waitForCompletion() (see SynchronizationTest.java). I have refactored it to CountdownLatch - think it's a bit cleaner this way as well.