    @Test
    public void testGetProductWhenCatalogServiceThrowsError(TestContext context) {

        doAnswer(new Answer<Void>() {
            public Void answer(InvocationOnMock invocation){
                Handler<AsyncResult<List<Product>>> handler = invocation.getArgument(1);
                handler.handle(Future.failedFuture("error"));
                return null;
             }
         }).when(catalogService).getProduct(any(),any());

        Async async = context.async();
        vertx.createHttpClient().get(port, "localhost", "/product/111111", response -> {
                assertThat(response.statusCode(), equalTo(503));
                response.bodyHandler(body -> {
                    assertThat(body.toString(), equalTo("Service Unavailable"));
                    verify(catalogService).getProduct(eq("111111"),any());
                    async.complete();
                })
                .exceptionHandler(context.exceptionHandler());
            })
            .exceptionHandler(context.exceptionHandler())
            .end();
    }