@Test
public void addAccountCreationListener() throws Exception {

    enqueueCreateAccountResponses();
    final CountDownLatch latch = new CountDownLatch(1);
    final boolean[] eventFired = {false};
    blockchainEvents.addAccountCreationListener(new EventListener<Void>() {
        @Override
        public void onEvent(Void data) {
            eventFired[0] = true;
            latch.countDown();
        }
    });
    assertTrue(latch.await(1, TimeUnit.SECONDS));
    assertThat(eventFired[0], equalTo(true));
}