@Test
public void testGetServicesNotModified()
{

    ListenableFuture<ServiceDescriptors> future = createClient(
            request -> mockResponse()
                    .status(NOT_MODIFIED)
                    .header("ETag", "newEtag")
                    .header("Cache-Control", "max-age=123")
                    .build())
            .getServices("testService", "testPool");
    try {
        future.get();
        fail("Expected ExecutionException");
    }
    catch (InterruptedException e) {
        throw new RuntimeException(e);
    }
    catch (ExecutionException e) {
        assertInstanceOf(e.getCause(), DiscoveryException.class);
        assertNull(e.getCause().getCause());
        assertEquals(e.getCause().getMessage(), "Lookup of testService failed with status code 304");
    }
}