@Test
public void testAnnounceZeroAnnouncementsBadStatus()
        throws Exception
{

    httpClient.setProcessor((request -> mockResponse(INTERNAL_SERVER_ERROR)));
    try {
        client.announce(ImmutableSet.of()).get();
        fail("expected ExecutionException");
    }
    catch (ExecutionException e) {
        assertInstanceOf(e.getCause(), DiscoveryException.class);
        assertContains(e.getCause().getMessage(), "Announcement failed with status code 500: ");
    }
}