diff --git a/generators/server/templates/src/test/java/package/_CassandraKeyspaceUnitTest.java b/generators/server/templates/src/test/java/package/_CassandraKeyspaceUnitTest.java
index <HASH>..<HASH> 100644
--- a/generators/server/templates/src/test/java/package/_CassandraKeyspaceUnitTest.java
+++ b/generators/server/templates/src/test/java/package/_CassandraKeyspaceUnitTest.java
@@ -1,6 +1,6 @@
 package <%=packageName%>;
 
-import com.datastax.driver.core.ResultSet;
+import com.datastax.driver.core.KeyspaceMetadata;
 import com.datastax.driver.core.Session;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -23,9 +23,7 @@ public class CassandraKeyspaceUnitTest extends AbstractCassandraTest {
 
     @Test
     public void shouldListCassandraUnitKeyspace() throws Exception {
-        ResultSet result = session.execute("SELECT * FROM system_schema.keyspaces;");
-        assertThat(result.all())
-            .extracting(row -> row.getString("keyspace_name"))
-            .containsOnlyOnce((CASSANDRA_UNIT_KEYSPACE));
+        KeyspaceMetadata metadata = session.getCluster().getMetadata();
+        assertThat(metadata.getKeyspace(CASSANDRA_UNIT_KEYSPACE)).isNotNull();
     }
 }
Cassandra keyspace unit test made independent from Cassandra version.