@Override
    public boolean edgeExists(String source, String target) {
        checkId(source);
        checkId(target);
        NodeDraftImpl sourceNode = getNode(source);
        NodeDraftImpl targetNode = getNode(target);
        if (sourceNode != null && targetNode != null) {
            boolean undirected = edgeDefault.equals(EdgeDirectionDefault.UNDIRECTED) ||
                (undirectedEdgesCount > 0 && directedEdgesCount == 0);
            long edgeId = getLongId(sourceNode, targetNode, !undirected);
            for (Long2ObjectMap l : edgeTypeSets) {
                if (l != null) {
                    if (l.containsKey(edgeId)) {
                        return true;
                    }
                }
            }
        }
        return false;
    }
@Test
    public void testEdgeExists() {
        ImportContainerImpl importContainer = new ImportContainerImpl();
        generateTinyGraph(importContainer);
        Assert.assertTrue(importContainer.edgeExists("1"));
        Assert.assertTrue(importContainer.edgeExists("1", "2"));
        Assert.assertTrue(importContainer.edgeExists("2", "1"));
    }