private void edgeMethodFailure(Method method, Graph<?, ?> graph, String validVertex, String invalidVertex)
            throws IllegalAccessException {
        try {
            method.invoke(graph, validVertex, null);
            fail();
        } catch (InvocationTargetException e) {
            checkCause(e, NullPointerException.class);
        }
        try {
            method.invoke(graph, null, validVertex);
            fail();
        } catch (InvocationTargetException e) {
            checkCause(e, NullPointerException.class);
        }
        try {
            method.invoke(graph, null, null);
            fail();
        } catch (InvocationTargetException e) {
            checkCause(e, NullPointerException.class);
        }
        try {
            method.invoke(graph, null, invalidVertex);
            fail();
        } catch (InvocationTargetException e) {
            checkCause(e, NullPointerException.class);
        }
        try {
            method.invoke(graph, invalidVertex, null);
            fail();
        } catch (InvocationTargetException e) {
            checkCause(e, IllegalArgumentException.class);
        }
        try {
            method.invoke(graph, invalidVertex, validVertex);
            fail();
        } catch (InvocationTargetException e) {
            checkCause(e, IllegalArgumentException.class);
        }
    }