### Question:
SqlQueryParser implements QueryParser { protected String parseName( TokenStream tokens, TypeSystem typeSystem ) { return removeBracketsAndQuotes(tokens.consume()); }  String getLanguage(); @Override String toString(); @Override boolean equals( Object obj ); QueryCommand parseQuery( String query,
                                    TypeSystem typeSystem ); static final String LANGUAGE; }### Answer:
@Test public void shouldParseNameFromSingleQuotedString() { assertThat(parser.parseName(tokens("'jcr:name'"), typeSystem), is("jcr:name")); }
@Test public void shouldParseNameFromDoubleQuotedString() { assertThat(parser.parseName(tokens("\"jcr:name\""), typeSystem), is("jcr:name")); }
@Test public void shouldParseNameFromBracketedString() { assertThat(parser.parseName(tokens("[jcr:name]"), typeSystem), is("jcr:name")); }
@Test public void shouldParseNameFromUnquotedStringWithoutPrefix() { assertThat(parser.parseName(tokens("name"), typeSystem), is("name")); }
@Test public void shouldParseNameFromSingleQuotedStringWithoutPrefix() { assertThat(parser.parseName(tokens("'name'"), typeSystem), is("name")); }
@Test public void shouldParseNameFromDoubleQuotedStringWithoutPrefix() { assertThat(parser.parseName(tokens("\"name\""), typeSystem), is("name")); }
@Test public void shouldParseNameFromBracketedStringWithoutPrefix() { assertThat(parser.parseName(tokens("[name]"), typeSystem), is("name")); }
@Test public void shouldParseNameFromBracketedAndQuotedStringWithoutPrefix() { assertThat(parser.parseName(tokens("['name']"), typeSystem), is("name")); assertThat(parser.parseName(tokens("[\"name\"]"), typeSystem), is("name")); }
@Test( expected = ParsingException.class ) public void shouldFailToParseNameIfNoMoreTokens() { parser.parseName(tokens(" "), typeSystem); }