@Test
public void testComplete() throws Exception {

    URIElement n0 = new URIElement(), n1 = new URIElement(), n2 = new URIElement(), n3 = new URIElement(), n4 = new URIElement(), n5 = new URIElement(), n6 = new URIElement(), n7 =
            new URIElement(), n8 = new URIElement(true);
    n0.add(SKIP, n1);
    n0.add(SKIP, n5);
    // (
    n1.add(SKIP, n2);
    // [
    // a-z
    for (int i = 0; i < 26; i++) {
        int cost = 'a' + i;
        URIElement URIElement = new URIElement();
        n2.add(cost, URIElement);
        URIElement.add(SKIP, n3);
    }
    // ]+
    n3.add(SKIP, n2);
    // .
    n3.add('.', n4);
    // )*
    n4.add(SKIP, n1);
    n4.add(SKIP, n5);
    // concat ( minimize epsilon transfers for this branch )
    n1.add(SKIP, n5);
    // [
    // A-Z
    for (int i = 0; i < 26; i++) {
        int cost = 'A' + i;
        URIElement URIElement = new URIElement();
        n5.add(cost, URIElement);
        URIElement.add(SKIP, n6);
    }
    // ]
    // [
    for (int i = 0; i < 26; i++) {
        int cost;
        URIElement URIElement;
        // A-Z
        cost = 'A' + i;
        URIElement = new URIElement();
        n6.add(cost, URIElement);
        URIElement.add(SKIP, n7);
        // a-z
        cost = 'a' + i;
        URIElement = new URIElement();
        n6.add(cost, URIElement);
        URIElement.add(SKIP, n7);
    }
    // ]
    // *
    n7.add(SKIP, n6);
    n7.add(SKIP, n8);
    n6.add(SKIP, n8);
    assertFalse(new URIVerifier(n0).verify("a"));
    assertFalse(new URIVerifier(n0).verify("aA"));
    assertTrue(new URIVerifier(n0).verify("A"));
    assertTrue(new URIVerifier(n0).verify("Aa"));
    assertTrue(new URIVerifier(n0).verify("AA"));
    assertTrue(new URIVerifier(n0).verify("aa.A"));
    assertTrue(new URIVerifier(n0).verify("aaa.A"));
    assertTrue(new URIVerifier(n0).verify("aaaa.A"));
    assertTrue(new URIVerifier(n0).verify("aaaaa.A"));
    assertTrue(new URIVerifier(n0).verify("aaaaa.AA"));
    assertTrue(new URIVerifier(n0).verify("aaaaa.AAA"));
    assertTrue(new URIVerifier(n0).verify("aaaaa.AAAA"));
    assertTrue(new URIVerifier(n0).verify("aaaaa.AAAAA"));
    assertFalse(new URIVerifier(n0).verify("stac.d.bbn.Com."));
    assertTrue(new URIVerifier(n0).verify("stac.D"));
    assertTrue(new URIVerifier(n0).verify("stac.dd.D"));
    assertTrue(new URIVerifier(n0).verify("stac.d.bbn.C"));
}