Fix junit failure: set exception or response first before latch count down so that Future.get() will return correct object.