test_class.declarator: tableMetadataManager
test_class.modifier: private
test_class.original_string: private TableMetadataManager tableMetadataManager;
test_class.type: TableMetadataManager
test_class.var_name: tableMetadataManager
test_class.declarator: elasticsearchServer
test_class.modifier: private
test_class.original_string: private MockElasticsearchServer elasticsearchServer;
test_class.type: MockElasticsearchServer
test_class.var_name: elasticsearchServer
test_class.declarator: hazelcastInstance
test_class.modifier: private
test_class.original_string: private HazelcastInstance hazelcastInstance;
test_class.type: HazelcastInstance
test_class.var_name: hazelcastInstance
test_class.file: real-time/foxtrot/foxtrot-server/src/test/java/com/flipkart/foxtrot/server/resources/TableMetadataResourceTest.java
test_class.identifier: TableMetadataResourceTest
test_class.superclass: extends ResourceTest
test_case.body: @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());
          }
      }
test_case.class_method_signature: TableMetadataResourceTest.testSaveBackendError()
test_case.full_signature: @Test public void testSaveBackendError()
test_case.identifier: testSaveBackendError
test_case.invocations: toString randomUUID save when doThrow any post type resource client assertEquals getStatusCode getStatus getResponse
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testSaveBackendError()
focal_class.declarator: logger = LoggerFactory.getLogger(TableMetadataResource.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = LoggerFactory.getLogger(TableMetadataResource.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: tableMetadataManager
focal_class.modifier: private final
focal_class.original_string: private final TableMetadataManager tableMetadataManager;
focal_class.type: TableMetadataManager
focal_class.var_name: tableMetadataManager
focal_class.file: real-time/foxtrot/foxtrot-server/src/main/java/com/flipkart/foxtrot/server/resources/TableMetadataResource.java
focal_class.identifier: TableMetadataResource
focal_class.class_method_signature: TableMetadataResource.TableMetadataResource(TableMetadataManager tableMetadataManager)
focal_class.full_signature: public  TableMetadataResource(TableMetadataManager tableMetadataManager)
focal_class.identifier: TableMetadataResource
focal_class.modifiers: public
focal_class.parameters: (TableMetadataManager tableMetadataManager)
focal_class.signature:  TableMetadataResource(TableMetadataManager tableMetadataManager)
focal_class.class_method_signature: TableMetadataResource.save(@Valid final Table table)
focal_class.full_signature: @POST public Table save(@Valid final Table table)
focal_class.identifier: save
focal_class.modifiers: @POST public
focal_class.parameters: (@Valid final Table table)
focal_class.return: Table
focal_class.signature: Table save(@Valid final Table table)
focal_class.class_method_signature: TableMetadataResource.get(@PathParam("name") final String name)
focal_class.full_signature: @GET @Path("/{name}") public Table get(@PathParam("name") final String name)
focal_class.identifier: get
focal_class.modifiers: @GET @Path("/{name}") public
focal_class.parameters: (@PathParam("name") final String name)
focal_class.return: Table
focal_class.signature: Table get(@PathParam("name") final String name)
focal_class.class_method_signature: TableMetadataResource.delete(@PathParam("name") final String name)
focal_class.full_signature: @DELETE @Path("/{name}/delete") public void delete(@PathParam("name") final String name)
focal_class.identifier: delete
focal_class.modifiers: @DELETE @Path("/{name}/delete") public
focal_class.parameters: (@PathParam("name") final String name)
focal_class.return: void
focal_class.signature: void delete(@PathParam("name") final String name)
focal_class.class_method_signature: TableMetadataResource.get()
focal_class.full_signature: @GET public List<Table> get()
focal_class.identifier: get
focal_class.modifiers: @GET public
focal_class.parameters: ()
focal_class.return: List<Table>
focal_class.signature: List<Table> get()
focal_method.body: @POST
      public Table save(@Valid final Table table) {
          try {
              tableMetadataManager.save(table);
          } catch (Exception e) {
              logger.error(String.format("Unable to save table %s", table), e);
              throw new WebApplicationException(Response.serverError().entity(Collections.singletonMap("error", e.getMessage())).build());
          }
          return table;
      }
focal_method.class_method_signature: TableMetadataResource.save(@Valid final Table table)
focal_method.full_signature: @POST public Table save(@Valid final Table table)
focal_method.identifier: save
focal_method.invocations: save error format build entity serverError singletonMap getMessage
focal_method.modifiers: @POST public
focal_method.parameters: (@Valid final Table table)
focal_method.return: Table
focal_method.signature: Table save(@Valid final Table table)