@Test
public void testAnnounceConnectException()
        throws Exception
{

    httpClient.setProcessor((request -> {
        throw new ConnectException("test exception");
    }));
    try {
        client.announce(announcements).get();
        fail("expected ExecutionException");
    }
    catch (ExecutionException e) {
        assertInstanceOf(e.getCause(), DiscoveryException.class);
        assertEquals(e.getCause().getMessage(), "Announcement failed");
    }
}