class DefaultEdgeTraversal extends AbstractEdgeTraversal implements EdgeTraversal {

    @Override
    public Optional<EdgeEntity> getSingleResult() {
        List<EdgeEntity> result = getResultList();

        if(result.isEmpty()) {
            return Optional.empty();
        }else if(result.size() == 1) {
            return Optional.of(result.get(0));
        }
        throw new NonUniqueResultException("The Edge traversal query returns more than one result");
    }

      DefaultEdgeTraversal(Supplier<GraphTraversal<?, ?>> supplier,
                         Function<GraphTraversal<?, ?>, GraphTraversal<Vertex, Edge>> flow,
                         GraphConverter converter);

}