### Question:
CassandraUtils { public static void executeCqlScript(final Session session, final String script) { if (script == null) { return; } final List<String> lines = new ArrayList<String>(); for (final String line : Splitter.on("\n").split(script)) { lines.add(line.trim()); } for (String cql : Joiner.on(" ").join(lines).split(";")) { cql = cql.trim(); if (cql.isEmpty()) { continue; } session.execute(cql); } } private  CassandraUtils(); static void executeCqlScript(final Session session, final String script); static TableMetadata getTableMetadata(final Session session, final String keyspace, final String table); static Object parseValue(final DataType type, final String value);  }### Answer:
@Test public void executeCqlScriptNull() { final Session session = mock(Session.class); CassandraUtils.executeCqlScript(session, null); verifyZeroInteractions(session); }
@Test public void executeCqlScriptEmpty() { final Session session = mock(Session.class); CassandraUtils.executeCqlScript(session, ""); verifyZeroInteractions(session); }
@Test public void executeCqlScriptWhitespaceOnly() { final Session session = mock(Session.class); CassandraUtils.executeCqlScript(session, " "); verifyZeroInteractions(session); }
@Test public void executeCqlScriptOneStatement() { final Session session = mock(Session.class); CassandraUtils.executeCqlScript(session, " MY STATEMENT;"); verify(session).execute("MY STATEMENT"); verifyNoMoreInteractions(session); }
@Test public void executeCqlScriptTwoStatements() { final Session session = mock(Session.class); CassandraUtils.executeCqlScript(session, "MY STATEMENT;\n\nOTHER STATEMENT;"); verify(session).execute("MY STATEMENT"); verify(session).execute("OTHER STATEMENT"); verifyNoMoreInteractions(session); }
@Test public void executeCqlScriptTwoStatementsNoFinalSemicolon() { final Session session = mock(Session.class); CassandraUtils.executeCqlScript(session, "MY STATEMENT;\n\nOTHER STATEMENT"); verify(session).execute("MY STATEMENT"); verify(session).execute("OTHER STATEMENT"); verifyNoMoreInteractions(session); }