@Test
public void testGetServicesWrongEnvironment()
        throws Exception
{

    ListenableFuture<ServiceDescriptors> future = createClient(createProcessor(null, null, "wrongenvironment"))
            .getServices("testService", "testPool");
    try {
        future.get();
        fail("Expected ExecutionException");
    }
    catch (ExecutionException e) {
        assertInstanceOf(e.getCause(), DiscoveryException.class);
        assertNull(e.getCause().getCause());
        assertEquals(e.getCause().getMessage(), "Expected environment to be testingenvironment, but was wrongenvironment");
    }
}