### Question:
StandardDdlParser implements DdlParser, DdlConstants, DdlConstants.StatementStartPhrases { protected String parseName( DdlTokenStream tokens ) { StringBuffer sb = new StringBuffer(); if (tokens.matches('[')) { while (true) { tokens.consume('['); sb.append(consumeIdentifier(tokens)); tokens.consume(']'); if (tokens.matches('.')) { sb.append(tokens.consume()); } else { break; } } } else { while (true) { sb.append(consumeIdentifier(tokens)); if (tokens.matches('.')) { sb.append(tokens.consume()); } else { break; } } } return sb.toString(); } StandardDdlParser(); DataTypeParser getDatatypeParser(); void setDatatypeParser( DataTypeParser datatypeParser ); AstNodeFactory nodeFactory(); AstNode getRootNode(); void setRootNode( AstNode rootNode ); Object score( String ddl,
                         String fileName,
                         DdlParserScorer scorer ); String[] getIdentifyingKeywords(); void parse( String ddl,
                       AstNode rootNode,
                       Object scoreReturnObject ); final void addProblem( DdlParserProblem problem,
                                  AstNode node ); final void addProblem( DdlParserProblem problem ); final List<DdlParserProblem> getProblems(); final void attachNewProblem( DdlParserProblem problem,
                                        AstNode parentNode ); void mergeNodes( DdlTokenStream tokens,
                            AstNode firstNode,
                            AstNode secondNode ); AstNode handleUnknownToken( DdlTokenStream tokens,
                                       String tokenValue ); final AstNode unknownTerminatedNode( AstNode parentNode ); final AstNode missingTerminatorNode( AstNode parentNode ); final boolean isMissingTerminatorNode( AstNode node ); final boolean isValidSchemaChild( AstNode node ); final boolean setAsSchemaChildNode( AstNode statementNode,
                                               boolean stmtIsMissingTerminator ); boolean doUseTerminator(); void setDoUseTerminator( boolean useTerminator ); String getStatementTypeName( String[] stmtPhrase ); final Position getCurrentMarkedPosition(); final void markStartOfStatement( DdlTokenStream tokens ); final void markEndOfStatement( DdlTokenStream tokens,
                                          AstNode statementNode ); boolean isTestMode(); void setTestMode( boolean testMode ); String getId(); @Override int hashCode(); @Override boolean equals( Object obj );  }### Answer:
@Test public void shouldParseName() { printTest("shouldParseName()"); String content = "simpleName"; String targetName = "simpleName"; DdlTokenStream tokens = getTokens(content); String result = parser.parseName(tokens); assertEquals(targetName, result); content = "schema_name.table_name"; targetName = "schema_name.table_name"; tokens = getTokens(content); result = parser.parseName(tokens); assertEquals(targetName, result); content = "[schema_name].[table_name]"; targetName = "schema_name.table_name"; tokens = getTokens(content); result = parser.parseName(tokens); assertEquals(targetName, result); content = "[schema_name].[\"COLUMN\"]"; targetName = "schema_name.COLUMN"; tokens = getTokens(content); result = parser.parseName(tokens); assertEquals(targetName, result); content = "\"_RETURN\""; targetName = "_RETURN"; tokens = getTokens(content); result = parser.parseName(tokens); assertEquals(targetName, result); }