@Test
public void shouldTimeoutGetIfNoResponseIsFound() throws Exception {

  final Client client = ClientBuilder.newClient();
  //Start the rest interface
  rest = new OrdersService(
      new HostInfo("localhost", port)
  );
  rest.start(CLUSTER.bootstrapServers());
  //Then GET order should timeout
  try {
    client.target(paths.urlGet(1))
        .queryParam("timeout", 100) //Lower the request timeout
        .request(APPLICATION_JSON_TYPE)
        .get(new GenericType<OrderBean>() {
        });
    fail("Request should have failed as materialized view has not been updated");
  } catch (ServerErrorException e) {
    assertThat(e.getMessage()).isEqualTo("HTTP 504 Gateway Timeout");
  }
}