@Test
public void testSaveBackendError() throws Exception {

    Table table = Table.builder()
            .name(UUID.randomUUID()
                          .toString())
            .ttl(30)
            .build();
    Entity<Table> tableEntity = Entity.json(table);
    doThrow(FoxtrotExceptions.createExecutionException("dummy", new IOException())).when(tableManager)
            .save(Matchers.<Table>any());
    Response response = resources.client()
            .target("/v1/tables")
            .request()
            .post(tableEntity);
    assertEquals(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), response.getStatus());
    reset(tableManager);
}