DataTypeParser implements DdlConstants { protected long parseBracketedLong( DdlTokenStream tokens, DataType dataType ) { consume(tokens, dataType, false, L_PAREN); String value = consume(tokens, dataType, false); consume(tokens, dataType, false, R_PAREN); return parseLong(value); } DataTypeParser(); final boolean isDatatype( DdlTokenStream tokens ); DataType parse( DdlTokenStream tokens ); int getDefaultLength(); void setDefaultLength( int defaultLength ); int getDefaultPrecision(); void setDefaultPrecision( int defaultPrecision ); int getDefaultScale(); void setDefaultScale( int defaultScale ); String getStatementTypeName( String[] stmtPhrase ); void setPropertiesOnNode( AstNode columnNode,
                                     DataType datatype );  }
@Test public void shouldParseBracketedInteger() { printTest("shouldParseBracketedInteger()"); String content = "(255)"; DdlTokenStream tokens = getTokens(content); long value = parser.parseBracketedLong(tokens, new DataType()); Assert.assertEquals("DataType length is not correct", 255, value); }