@Test
public void serializeEdge() throws Exception {
final Graph g = TinkerGraph.open();
final Vertex v1 = g.addVertex();
final Vertex v2 = g.addVertex();
final Edge e = v1.addEdge("test", v2);
e.property("abc", 123);
final Iterable<Edge> iterable = g.E().toList();
final ResponseMessage response = convert(iterable);
assertCommon(response);
final List<Map<String, Object>> edgeList = (List<Map<String, Object>>) response.getResult().getData();
assertEquals(1, edgeList.size());
final Map<String, Object> deserializedEdge = edgeList.get(0);
assertEquals(e.id(), deserializedEdge.get(GraphSONTokens.ID));
assertEquals(v1.id(), deserializedEdge.get(GraphSONTokens.OUT));
assertEquals(v2.id(), deserializedEdge.get(GraphSONTokens.IN));
assertEquals(v1.label(), deserializedEdge.get(GraphSONTokens.OUT_LABEL));
assertEquals(v2.label(), deserializedEdge.get(GraphSONTokens.IN_LABEL));
assertEquals(e.label(), deserializedEdge.get(GraphSONTokens.LABEL));
assertEquals(GraphSONTokens.EDGE, deserializedEdge.get(GraphSONTokens.TYPE));
final Map<String, Object> properties = (Map<String, Object>) deserializedEdge.get(GraphSONTokens.PROPERTIES);
assertNotNull(properties);
assertEquals(123, properties.get("abc"));