Buggy code:
public class CliTest extends CleanupHelper { private String [ ] statements = new String [ ] { "use<seq2seq4repair_space>TestKeySpace" , "create<seq2seq4repair_space>column<seq2seq4repair_space>family<seq2seq4repair_space>CF1<seq2seq4repair_space>with<seq2seq4repair_space>comparator=UTF8Type<seq2seq4repair_space>and<seq2seq4repair_space>column_metadata=[{<seq2seq4repair_space>column_name:world,<seq2seq4repair_space>validation_class:IntegerType,<seq2seq4repair_space>index_type:0,<seq2seq4repair_space>index_name:IdxName<seq2seq4repair_space>},<seq2seq4repair_space>{<seq2seq4repair_space>column_name:world2,<seq2seq4repair_space>validation_class:LongType,<seq2seq4repair_space>index_type:0,<seq2seq4repair_space>index_name:LongIdxName}]" , "set<seq2seq4repair_space>CF1[hello][world]<seq2seq4repair_space>=<seq2seq4repair_space>123848374878933948398384" , "get<seq2seq4repair_space>CF1[hello][world]" , "set<seq2seq4repair_space>CF1[hello][world2]<seq2seq4repair_space>=<seq2seq4repair_space>15" , "get<seq2seq4repair_space>CF1<seq2seq4repair_space>where<seq2seq4repair_space>world2<seq2seq4repair_space>=<seq2seq4repair_space>long(15)" , "set<seq2seq4repair_space>CF1['hello'][time_spent_uuid]<seq2seq4repair_space>=<seq2seq4repair_space>timeuuid(a8098c1a-f86e-11da-bd1a-00112444be1e)" , "create<seq2seq4repair_space>column<seq2seq4repair_space>family<seq2seq4repair_space>CF2<seq2seq4repair_space>with<seq2seq4repair_space>comparator=IntegerType" , "set<seq2seq4repair_space>CF2['key'][98349387493847748398334]<seq2seq4repair_space>=<seq2seq4repair_space>'some<seq2seq4repair_space>text'" , "get<seq2seq4repair_space>CF2['key'][98349387493847748398334]" , "set<seq2seq4repair_space>CF2['key'][98349387493]<seq2seq4repair_space>=<seq2seq4repair_space>'some<seq2seq4repair_space>text<seq2seq4repair_space>other'" , "get<seq2seq4repair_space>CF2['key'][98349387493]" , "create<seq2seq4repair_space>column<seq2seq4repair_space>family<seq2seq4repair_space>CF3<seq2seq4repair_space>with<seq2seq4repair_space>comparator=UTF8Type<seq2seq4repair_space>and<seq2seq4repair_space>column_metadata=[{column_name:'big<seq2seq4repair_space>world',<seq2seq4repair_space>validation_class:LongType}]" , "set<seq2seq4repair_space>CF3['hello']['big<seq2seq4repair_space>world']<seq2seq4repair_space>=<seq2seq4repair_space>3748" , "get<seq2seq4repair_space>CF3['hello']['big<seq2seq4repair_space>world']" , "list<seq2seq4repair_space>CF3" , "list<seq2seq4repair_space>CF3[:]" , "list<seq2seq4repair_space>CF3[h:]" , "list<seq2seq4repair_space>CF3<seq2seq4repair_space>limit<seq2seq4repair_space>10" , "list<seq2seq4repair_space>CF3[h:]<seq2seq4repair_space>limit<seq2seq4repair_space>10" , "create<seq2seq4repair_space>column<seq2seq4repair_space>family<seq2seq4repair_space>CF4<seq2seq4repair_space>with<seq2seq4repair_space>comparator=IntegerType<seq2seq4repair_space>and<seq2seq4repair_space>column_metadata=[{column_name:9999,<seq2seq4repair_space>validation_class:LongType}]" , "set<seq2seq4repair_space>CF4['hello'][9999]<seq2seq4repair_space>=<seq2seq4repair_space>1234" , "get<seq2seq4repair_space>CF4['hello'][9999]" , "get<seq2seq4repair_space>CF4['hello'][9999]<seq2seq4repair_space>as<seq2seq4repair_space>Long" , "get<seq2seq4repair_space>CF4['hello'][9999]<seq2seq4repair_space>as<seq2seq4repair_space>Bytes" , "set<seq2seq4repair_space>CF4['hello'][9999]<seq2seq4repair_space>=<seq2seq4repair_space>Long(1234)" , "get<seq2seq4repair_space>CF4['hello'][9999]" , "get<seq2seq4repair_space>CF4['hello'][9999]<seq2seq4repair_space>as<seq2seq4repair_space>Long" , "del<seq2seq4repair_space>CF4['hello'][9999]" , "get<seq2seq4repair_space>CF4['hello'][9999]" , "create<seq2seq4repair_space>column<seq2seq4repair_space>family<seq2seq4repair_space>SCF1<seq2seq4repair_space>with<seq2seq4repair_space>column_type=Super<seq2seq4repair_space>and<seq2seq4repair_space>comparator=IntegerType<seq2seq4repair_space>and<seq2seq4repair_space>subcomparator=LongType<seq2seq4repair_space>and<seq2seq4repair_space>column_metadata=[{column_name:9999,<seq2seq4repair_space>validation_class:LongType}]" , "set<seq2seq4repair_space>SCF1['hello'][1][9999]<seq2seq4repair_space>=<seq2seq4repair_space>1234" , "get<seq2seq4repair_space>SCF1['hello'][1][9999]" , "get<seq2seq4repair_space>SCF1['hello'][1][9999]<seq2seq4repair_space>as<seq2seq4repair_space>Long" , "get<seq2seq4repair_space>SCF1['hello'][1][9999]<seq2seq4repair_space>as<seq2seq4repair_space>Bytes" , "set<seq2seq4repair_space>SCF1['hello'][1][9999]<seq2seq4repair_space>=<seq2seq4repair_space>Long(1234)" , "get<seq2seq4repair_space>SCF1['hello'][1][9999]" , "get<seq2seq4repair_space>SCF1['hello'][1][9999]<seq2seq4repair_space>as<seq2seq4repair_space>Long" , "del<seq2seq4repair_space>SCF1['hello'][1][9999]" , "get<seq2seq4repair_space>SCF1['hello'][1][9999]" , "set<seq2seq4repair_space>SCF1['hello'][1][9999]<seq2seq4repair_space>=<seq2seq4repair_space>Long(1234)" , "del<seq2seq4repair_space>SCF1['hello'][9999]" , "get<seq2seq4repair_space>SCF1['hello'][1][9999]" , "truncate<seq2seq4repair_space>CF1" , "update<seq2seq4repair_space>keyspace<seq2seq4repair_space>TestKeySpace<seq2seq4repair_space>with<seq2seq4repair_space>placement_strategy='org.apache.cassandra.locator.LocalStrategy'" , "update<seq2seq4repair_space>keyspace<seq2seq4repair_space>TestKeySpace<seq2seq4repair_space>with<seq2seq4repair_space>replication_factor=1<seq2seq4repair_space>and<seq2seq4repair_space>strategy_options=[{DC1:3,<seq2seq4repair_space>DC2:4,<seq2seq4repair_space>DC5:1}]" , "assume<seq2seq4repair_space>CF1<seq2seq4repair_space>comparator<seq2seq4repair_space>as<seq2seq4repair_space>utf8" , "assume<seq2seq4repair_space>CF1<seq2seq4repair_space>sub_comparator<seq2seq4repair_space>as<seq2seq4repair_space>integer" , "assume<seq2seq4repair_space>CF1<seq2seq4repair_space>validator<seq2seq4repair_space>as<seq2seq4repair_space>lexicaluuid" , "assume<seq2seq4repair_space>CF1<seq2seq4repair_space>keys<seq2seq4repair_space>as<seq2seq4repair_space>timeuuid" , "create<seq2seq4repair_space>column<seq2seq4repair_space>family<seq2seq4repair_space>CF7" , "set<seq2seq4repair_space>CF7[1][timeuuid()]<seq2seq4repair_space>=<seq2seq4repair_space>utf8(test1)" , "set<seq2seq4repair_space>CF7[2][lexicaluuid()]<seq2seq4repair_space>=<seq2seq4repair_space>utf8('hello<seq2seq4repair_space>world!')" , "set<seq2seq4repair_space>CF7[3][lexicaluuid(550e8400-e29b-41d4-a716-446655440000)]<seq2seq4repair_space>=<seq2seq4repair_space>utf8(test2)" , "set<seq2seq4repair_space>CF7[key2][timeuuid()]<seq2seq4repair_space>=<seq2seq4repair_space>utf8(test3)" , "assume<seq2seq4repair_space>CF7<seq2seq4repair_space>comparator<seq2seq4repair_space>as<seq2seq4repair_space>lexicaluuid" , "assume<seq2seq4repair_space>CF7<seq2seq4repair_space>keys<seq2seq4repair_space>as<seq2seq4repair_space>utf8" , "list<seq2seq4repair_space>CF7" , "get<seq2seq4repair_space>CF7[3]" , "get<seq2seq4repair_space>CF7[3][lexicaluuid(550e8400-e29b-41d4-a716-446655440000)]" } ; @ Test public void testCli ( ) throws IOException , ConfigurationException , TTransportException { setup ( ) ; ByteArrayOutputStream errStream = new ByteArrayOutputStream ( ) ; ByteArrayOutputStream outStream = new ByteArrayOutputStream ( ) ; CliMain . connect ( "127.0.0.1" , 9170 ) ; sessionState . setOut ( new PrintStream ( outStream ) ) ; sessionState . setErr ( new PrintStream ( errStream ) ) ; CliMain . processStatement ( "drop<seq2seq4repair_space>keyspace<seq2seq4repair_space>TestKeySpace" ) ; CliMain . processStatement ( "create<seq2seq4repair_space>keyspace<seq2seq4repair_space>TestKeySpace" ) ; for ( String statement : statements ) { errStream . reset ( ) ; CliMain . processStatement ( statement ) ; String result = outStream . toString ( ) ; <START_BUG> assertEquals ( "" , errStream . toString ( ) ) ; <END_BUG> if ( ( ( statement . startsWith ( "drop<seq2seq4repair_space>" ) ) || ( statement . startsWith ( "create<seq2seq4repair_space>" ) ) ) || ( statement . startsWith ( "update<seq2seq4repair_space>" ) ) ) { assertTrue ( result . matches ( "(.{8})-(.{4})-(.{4})-(.{4})-(.{12})\n" ) ) ; } else if ( statement . startsWith ( "set<seq2seq4repair_space>" ) ) { assertEquals ( result , "Value<seq2seq4repair_space>inserted.\n" ) ; } else if ( statement . startsWith ( "get<seq2seq4repair_space>" ) ) { if ( statement . contains ( "where" ) ) { assertTrue ( result . startsWith ( "-------------------\nRowKey:" ) ) ; } else { assertTrue ( ( ( result . startsWith ( "=><seq2seq4repair_space>(column=" ) ) || ( result . startsWith ( "Value<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>found" ) ) ) ) ; } } else if ( statement . startsWith ( "truncate<seq2seq4repair_space>" ) ) { assertTrue ( result . contains ( "<seq2seq4repair_space>truncated." ) ) ; } else if ( statement . startsWith ( "assume<seq2seq4repair_space>" ) ) { assertTrue ( result . contains ( "successfully." ) ) ; } outStream . reset ( ) ; errStream . reset ( ) ; } } private void setup ( ) throws IOException , ConfigurationException , TTransportException { } }

Fix:
assertEquals ( ( ( ( errStream . toString ( ) ) + "<seq2seq4repair_space>processing<seq2seq4repair_space>" ) + statement ) , "" , errStream . toString ( ) ) ;