SaveToCassandraOperationsService { public void createKeyspace(String keyspaceName) { session.execute(String.format( "CREATE KEYSPACE %s WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}", addQuotes(keyspaceName))); } SaveToCassandraOperationsService(Session session); Boolean check(); void refreshTablenames(); void checkKeyspace(); void createKeyspace(String keyspaceName); void createTable(String tableName, List<ColumnNameTypeValue> columns, String timestampColumnName); Insert createInsertStatement(String streamName, List<ColumnNameTypeValue> columns, String timestampColumnName); void alterTable(String streamName, Set<String> oldColumnNames, List<ColumnNameTypeValue> columns); HashMap<String, Integer> getTableNames(); Session getSession();  }
@Test public void testCreateKeyspace() throws Exception { service.createKeyspace(KEYSPACE); Exception ex= null; try { service.createKeyspace(KEYSPACE); } catch (Exception e) { ex= e; } assertEquals("Expected null but exception found", null, ex); }