@Test
public void shouldParseElementTest() {

    ElementTest result = parser.parseElementTest(tokenize("element(foo)"));
    assertThat(result, is(notNullValue()));
    assertThat(result.getElementName(), is(nameTest("foo")));
    assertThat(result.getTypeName(), is(wildcard()));
    result = parser.parseElementTest(tokenize("element(foo:bar)"));
    assertThat(result, is(notNullValue()));
    assertThat(result.getElementName(), is(nameTest("foo", "bar")));
    assertThat(result.getTypeName(), is(wildcard()));
    result = parser.parseElementTest(tokenize("element(foo:bar,baz)"));
    assertThat(result, is(notNullValue()));
    assertThat(result.getElementName(), is(nameTest("foo", "bar")));
    assertThat(result.getTypeName(), is(nameTest("baz")));
    result = parser.parseElementTest(tokenize("element(foo:bar,baz:bam)"));
    assertThat(result, is(notNullValue()));
    assertThat(result.getElementName(), is(nameTest("foo", "bar")));
    assertThat(result.getTypeName(), is(nameTest("baz", "bam")));
    result = parser.parseElementTest(tokenize("element(foo:bar,*)"));
    assertThat(result, is(notNullValue()));
    assertThat(result.getElementName(), is(nameTest("foo", "bar")));
    assertThat(result.getTypeName(), is(wildcard()));
    result = parser.parseElementTest(tokenize("element(*,foo:bar)"));
    assertThat(result, is(notNullValue()));
    assertThat(result.getElementName(), is(wildcard()));
    assertThat(result.getTypeName(), is(nameTest("foo", "bar")));
    result = parser.parseElementTest(tokenize("element(*,*)"));
    assertThat(result, is(notNullValue()));
    assertThat(result.getElementName(), is(wildcard()));
    assertThat(result.getTypeName(), is(wildcard()));
}