@Test
public void testSaveBackendError() throws Exception {

    Table table = new Table(UUID.randomUUID().toString(), 30);
    doThrow(new Exception()).when(tableMetadataManager).save(Matchers.<Table>any());
    try {
        client().resource("/v1/tables").type(MediaType.APPLICATION_JSON_TYPE).post(table);
    } catch (UniformInterfaceException ex) {
        assertEquals(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), ex.getResponse().getStatus());
    }
}