@Test
public void testIsFullyConnected() {

    GraphPattern<String, String> pattern;
    pattern = graphPattern(
            tuplePattern("?x", "knows", "?y"));
    assertTrue(pattern.isFullyConnected());
    pattern = graphPattern(
            tuplePattern("?x", "knows", "?y"),
            tuplePattern("?y", "knows", "Arthur"));
    assertTrue(pattern.isFullyConnected());
    pattern = graphPattern(
            tuplePattern("Ford", "knows", "Arthur"));
    assertTrue(pattern.isFullyConnected());
    pattern = graphPattern(
            tuplePattern("Ford", "knows", "Arthur"),
            tuplePattern("Arthur", "knows", "Trillian"));
    assertFalse(pattern.isFullyConnected());
    pattern = graphPattern(
            tuplePattern("Ford", "knows", "Arthur"),
            tuplePattern("?x", "knows", "Arthur"));
    assertFalse(pattern.isFullyConnected());
    pattern = graphPattern(
            tuplePattern("?x", "knows", "?y"),
            tuplePattern("?y", "knows", "Arthur"),
            tuplePattern("?z", "likes", "Beer"));
    assertFalse(pattern.isFullyConnected());
}