AbstractGraphConverter implements GraphConverter { @Override public EdgeEntity toEdgeEntity(Edge edge) { requireNonNull(edge, "vertex is required"); Object out = toEntity(edge.outVertex()); Object in = toEntity(edge.inVertex()); return EdgeEntity.of(out, edge, in); }  @Override Vertex toVertex(T entity); @Override List<Property<?>> getProperties(T entity); @Override T toEntity(Vertex vertex); @Override T toEntity(Class<T> entityClass, Vertex vertex); @Override T toEntity(T entityInstance, Vertex vertex); @Override EdgeEntity toEdgeEntity(Edge edge); @Override Edge toEdge(EdgeEntity edge);  }
@Test public void shouldReturnErrorWhenToEdgeEntityIsNull() { assertThrows(NullPointerException.class, () -> getConverter().toEdgeEntity(null)); }