### Question:
LineageMetadataResource extends AbstractMetadataResource { @GET @Path("/edges/all") @Produces({MediaType.APPLICATION_JSON}) public Response getEdges() { LOG.info("Get All Edges."); try { JSONObject response = buildJSONResponse(getGraph().getEdges()); return Response.ok(response).build(); } catch (JSONException e) { throw FalconWebException.newAPIException(e, Response.Status.INTERNAL_SERVER_ERROR); } }  @GET @Path("/serialize") @Produces({MediaType.APPLICATION_JSON}) Response serializeGraph(); @GET @Path("/entities") @Produces({MediaType.APPLICATION_JSON}) @Monitored(event = "entity-lineage") Response getEntityLineageGraph(@Dimension("pipeline") @QueryParam("pipeline") final String pipeline); @GET @Path("/vertices/all") @Produces({MediaType.APPLICATION_JSON}) Response getVertices(); @GET @Path("/vertices/{id}") @Produces({MediaType.APPLICATION_JSON}) Response getVertex(@PathParam("id") final String vertexId); @GET @Path("/vertices/properties/{id}") @Produces({MediaType.APPLICATION_JSON}) Response getVertexProperties(@PathParam("id") final String vertexId,
                                        @DefaultValue("false") @QueryParam("relationships")
                                        final String relationships); @GET @Path("/vertices") @Produces({MediaType.APPLICATION_JSON}) Response getVertices(@QueryParam("key") final String key,
                                @QueryParam("value") final String value); @GET @Path("vertices/{id}/{direction}") @Produces({MediaType.APPLICATION_JSON}) Response getVertexEdges(@PathParam("id") String vertexId,
                                   @PathParam("direction") String direction); @GET @Path("/edges/all") @Produces({MediaType.APPLICATION_JSON}) Response getEdges(); @GET @Path("/edges/{id}") @Produces({MediaType.APPLICATION_JSON}) Response getEdge(@PathParam("id") final String edgeId); static final String OUT_E; static final String IN_E; static final String BOTH_E; static final String OUT; static final String IN; static final String BOTH; static final String OUT_COUNT; static final String IN_COUNT; static final String BOTH_COUNT; static final String OUT_IDS; static final String IN_IDS; static final String BOTH_IDS; }### Answer:
@Test public void testGetAllEdges() throws Exception { LineageMetadataResource resource = new LineageMetadataResource(); Response response = resource.getEdges(); Assert.assertEquals(response.getStatus(), Response.Status.OK.getStatusCode()); Map results = (Map) JSONValue.parse(response.getEntity().toString()); long totalSize = Long.valueOf(results.get(LineageMetadataResource.TOTAL_SIZE).toString()); Assert.assertEquals(totalSize, getEdgesCount(resource.getGraph())); }