public void edge(T from, T to) {
        if (from == null || to == null)
            throw new IllegalArgumentException("Null vertices are not allowed, edge: " + from + "->" + to);

        adjMap.computeIfAbsent(from, k -> new LinkedHashSet<>()).add(to);
        adjMap.computeIfAbsent(to, k -> new LinkedHashSet<>());
    }
@Test
    void null_vertices_are_not_allowed() {
        var graph = new Graph<Vertices>();

        try {
            graph.edge(A, null);
            fail();
        } catch (IllegalArgumentException e) {
            assertEquals("Null vertices are not allowed, edge: A->null", e.getMessage());
        }
    }