@Test
public void testFetch() throws Exception {

  final CountDownLatch latch = new CountDownLatch(10);
  final EventSource source = client.fetch();
  final EventListener listener =
      new EventListener() {
        @Override
        public void onEvent(InboundEvent inboundEvent) {
          latch.countDown();
        }
      };
  source.register(listener, "message-to-client");
  source.open();
  latch.await(10, TimeUnit.SECONDS);
  source.close();
}