diff --git a/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBColumn.java b/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBColumn.java
index eb2de01..45799fa 100644
--- a/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBColumn.java
+++ b/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBColumn.java
@@ -21,7 +21,7 @@
 
 import java.util.Objects;
 
-final class ADBColumn {
+public class ADBColumn {
 
     private final String name;
 
@@ -29,21 +29,21 @@
 
     private final boolean optional;
 
-    ADBColumn(String name, ADBDatatype type, boolean optional) {
+    public ADBColumn(String name, ADBDatatype type, boolean optional) {
         this.name = Objects.requireNonNull(name);
         this.type = Objects.requireNonNull(type);
         this.optional = optional || type.isNullOrMissing() || type == ADBDatatype.ANY;
     }
 
-    String getName() {
+    public String getName() {
         return name;
     }
 
-    ADBDatatype getType() {
+    public ADBDatatype getType() {
         return type;
     }
 
-    boolean isOptional() {
+    public boolean isOptional() {
         return optional;
     }
 
diff --git a/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBConnection.java b/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBConnection.java
index c9d78f7..23b98af 100644
--- a/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBConnection.java
+++ b/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBConnection.java
@@ -48,12 +48,12 @@
 
 public class ADBConnection extends ADBWrapperSupport implements Connection {
 
-    final ADBProtocolBase protocol;
-    final String url;
-    final String databaseVersion;
-    final ADBDriverProperty.CatalogDataverseMode catalogDataverseMode;
-    final boolean catalogIncludesSchemaless;
-    final boolean sqlCompatMode;
+    protected final ADBProtocolBase protocol;
+    protected final String url;
+    protected final String databaseVersion;
+    protected final ADBDriverProperty.CatalogDataverseMode catalogDataverseMode;
+    protected final boolean catalogIncludesSchemaless;
+    protected final boolean sqlCompatMode;
     private final AtomicBoolean closed;
     private final ConcurrentLinkedQueue<ADBStatement> statements;
     private volatile SQLWarning warning;
@@ -63,7 +63,7 @@
 
     // Lifecycle
 
-    protected ADBConnection(ADBProtocolBase protocol, String url, String databaseVersion, String dataverseCanonicalName,
+    public ADBConnection(ADBProtocolBase protocol, String url, String databaseVersion, String dataverseCanonicalName,
             Map<ADBDriverProperty, Object> properties, SQLWarning connectWarning) throws SQLException {
         this.url = Objects.requireNonNull(url);
         this.protocol = Objects.requireNonNull(protocol);
@@ -78,7 +78,7 @@
         initCatalogSchema(protocol, dataverseCanonicalName);
     }
 
-    private void initCatalogSchema(ADBProtocolBase protocol, String dataverseCanonicalName) throws SQLException {
+    protected void initCatalogSchema(ADBProtocolBase protocol, String dataverseCanonicalName) throws SQLException {
         switch (catalogDataverseMode) {
             case CATALOG:
                 catalog = dataverseCanonicalName == null || dataverseCanonicalName.isEmpty()
@@ -126,7 +126,7 @@
         closeImpl(executor);
     }
 
-    void closeImpl(Executor executor) throws SQLException {
+    protected void closeImpl(Executor executor) throws SQLException {
         boolean wasClosed = closed.getAndSet(true);
         if (wasClosed) {
             return;
@@ -146,7 +146,7 @@
         }
     }
 
-    private void closeStatementsAndProtocol() throws SQLException {
+    protected void closeStatementsAndProtocol() throws SQLException {
         SQLException err = null;
         try {
             closeRegisteredStatements();
@@ -267,7 +267,7 @@
         }
     }
 
-    private ADBStatement createStatementImpl() {
+    protected ADBStatement createStatementImpl() {
         ADBStatement stmt = new ADBStatement(this);
         registerStatement(stmt);
         return stmt;
@@ -364,7 +364,7 @@
         this.schema = schema;
     }
 
-    String getDataverseCanonicalName() {
+    protected String getDataverseCanonicalName() {
         switch (catalogDataverseMode) {
             case CATALOG:
                 return catalog;
@@ -377,7 +377,7 @@
         }
     }
 
-    private static ADBDriverProperty.CatalogDataverseMode getCatalogDataverseMode(
+    protected static ADBDriverProperty.CatalogDataverseMode getCatalogDataverseMode(
             Map<ADBDriverProperty, Object> properties, ADBErrorReporter errorReporter) throws SQLException {
         int mode = ((Number) ADBDriverProperty.Common.CATALOG_DATAVERSE_MODE.fetchPropertyValue(properties)).intValue();
         try {
diff --git a/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBDatabaseMetaData.java b/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBDatabaseMetaData.java
index 3e8cfc4..81e42eb 100644
--- a/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBDatabaseMetaData.java
+++ b/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBDatabaseMetaData.java
@@ -26,20 +26,20 @@
 import java.sql.SQLException;
 import java.util.Objects;
 
-final class ADBDatabaseMetaData extends ADBWrapperSupport implements DatabaseMetaData {
+public class ADBDatabaseMetaData extends ADBWrapperSupport implements DatabaseMetaData {
 
     /*
      * See org.apache.asterix.metadata.utils.MetadataConstants.METADATA_OBJECT_NAME_LENGTH_LIMIT_UTF8
      */
     private static final int METADATA_OBJECT_NAME_LENGTH_LIMIT_UTF8 = 251;
 
-    private final ADBMetaStatement metaStatement;
+    protected final ADBMetaStatement metaStatement;
 
-    private final String databaseVersionText;
+    protected final String databaseVersionText;
 
     private volatile ADBProductVersion databaseVersion;
 
-    ADBDatabaseMetaData(ADBMetaStatement metaStatement, String databaseVersionText) {
+    public ADBDatabaseMetaData(ADBMetaStatement metaStatement, String databaseVersionText) {
         this.metaStatement = Objects.requireNonNull(metaStatement);
         this.databaseVersionText = databaseVersionText;
     }
@@ -48,22 +48,22 @@
 
     @Override
     public String getDriverName() {
-        return metaStatement.connection.protocol.getDriverContext().getDriverVersion().productName;
+        return metaStatement.connection.protocol.getDriverContext().getDriverVersion().getProductName();
     }
 
     @Override
     public String getDriverVersion() {
-        return metaStatement.connection.protocol.getDriverContext().getDriverVersion().productVersion;
+        return metaStatement.connection.protocol.getDriverContext().getDriverVersion().getProductVersion();
     }
 
     @Override
     public int getDriverMajorVersion() {
-        return metaStatement.connection.protocol.getDriverContext().getDriverVersion().majorVersion;
+        return metaStatement.connection.protocol.getDriverContext().getDriverVersion().getMajorVersion();
     }
 
     @Override
     public int getDriverMinorVersion() {
-        return metaStatement.connection.protocol.getDriverContext().getDriverVersion().minorVersion;
+        return metaStatement.connection.protocol.getDriverContext().getDriverVersion().getMinorVersion();
     }
 
     @Override
@@ -80,25 +80,25 @@
 
     @Override
     public String getDatabaseProductName() {
-        return getDatabaseVersion().productName;
+        return getDatabaseVersion().getProductName();
     }
 
     @Override
     public String getDatabaseProductVersion() {
-        return getDatabaseVersion().productVersion;
+        return getDatabaseVersion().getProductVersion();
     }
 
     @Override
     public int getDatabaseMajorVersion() {
-        return getDatabaseVersion().majorVersion;
+        return getDatabaseVersion().getMajorVersion();
     }
 
     @Override
     public int getDatabaseMinorVersion() {
-        return getDatabaseVersion().minorVersion;
+        return getDatabaseVersion().getMinorVersion();
     }
 
-    private ADBProductVersion getDatabaseVersion() {
+    protected ADBProductVersion getDatabaseVersion() {
         ADBProductVersion result = databaseVersion;
         if (result == null) {
             databaseVersion = result = ADBProductVersion.parseDatabaseVersion(databaseVersionText);
@@ -136,11 +136,11 @@
     }
 
     //TODO:document
-    private boolean supportsCatalogsInStatements() {
+    protected boolean supportsCatalogsInStatements() {
         return false;
     }
 
-    private boolean supportsSchemasInStatements() {
+    protected boolean supportsSchemasInStatements() {
         return false;
     }
 
@@ -509,7 +509,6 @@
 
     @Override
     public String getTimeDateFunctions() {
-        // TODO:review
         return "current_date,current_time,current_datetime";
     }
 
diff --git a/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBDatatype.java b/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBDatatype.java
index e6634b5..b2482a2 100644
--- a/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBDatatype.java
+++ b/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBDatatype.java
@@ -25,7 +25,7 @@
 import java.util.Map;
 import java.util.Objects;
 
-enum ADBDatatype {
+public enum ADBDatatype {
     TINYINT(1, "int8", JDBCType.TINYINT, Byte.class),
     SMALLINT(2, "int16", JDBCType.SMALLINT, Short.class),
     INTEGER(3, "int32", JDBCType.INTEGER, Integer.class),
@@ -98,19 +98,19 @@
         this.javaClass = Objects.requireNonNull(javaClass);
     }
 
-    byte getTypeTag() {
+    public byte getTypeTag() {
         return typeTag;
     }
 
-    String getTypeName() {
+    public String getTypeName() {
         return typeName;
     }
 
-    JDBCType getJdbcType() {
+    public JDBCType getJdbcType() {
         return jdbcType;
     }
 
-    Class<?> getJavaClass() {
+    public Class<?> getJavaClass() {
         return javaClass;
     }
 
@@ -119,15 +119,15 @@
         return getTypeName();
     }
 
-    boolean isDerived() {
+    public boolean isDerived() {
         return this == OBJECT || isList();
     }
 
-    boolean isList() {
+    public boolean isList() {
         return this == ARRAY || this == MULTISET;
     }
 
-    boolean isNullOrMissing() {
+    public boolean isNullOrMissing() {
         return this == NULL || this == MISSING;
     }
 
@@ -162,7 +162,7 @@
         return maxTypeTag;
     }
 
-    static String getDerivedRecordName(ADBDatatype type) {
+    public static String getDerivedRecordName(ADBDatatype type) {
         switch (type) {
             case OBJECT:
                 return "Record";
diff --git a/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBDriverBase.java b/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBDriverBase.java
index 9524b1c..ce4f336 100644
--- a/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBDriverBase.java
+++ b/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBDriverBase.java
@@ -53,7 +53,7 @@
 
     protected final int defaultApiPort;
 
-    protected volatile ADBDriverContext context;
+    private volatile ADBDriverContext context;
 
     public ADBDriverBase(String driverScheme, int defaultApiPort) {
         this.urlScheme = JDBC_SCHEME + Objects.requireNonNull(driverScheme);
@@ -68,7 +68,7 @@
         }
     }
 
-    private static void parseConnectionProperties(Properties inProps, ADBDriverContext driverContext,
+    protected static void parseConnectionProperties(Properties inProps, ADBDriverContext driverContext,
             Map<ADBDriverProperty, Object> outProperties, SQLWarning outWarning) throws SQLException {
         if (inProps != null) {
             for (Enumeration<?> en = inProps.propertyNames(); en.hasMoreElements();) {
@@ -79,7 +79,7 @@
         }
     }
 
-    private static void parseConnectionProperty(String name, String textValue, ADBDriverContext driverContext,
+    protected static void parseConnectionProperty(String name, String textValue, ADBDriverContext driverContext,
             Map<ADBDriverProperty, Object> outProperties, SQLWarning outWarning) throws SQLException {
         ADBDriverProperty property = driverContext.getSupportedProperties().get(name);
         if (property == null) {
@@ -191,11 +191,11 @@
     }
 
     public int getMajorVersion() {
-        return getOrCreateDriverContext().getDriverVersion().majorVersion;
+        return getOrCreateDriverContext().getDriverVersion().getMajorVersion();
     }
 
     public int getMinorVersion() {
-        return getOrCreateDriverContext().getDriverVersion().minorVersion;
+        return getOrCreateDriverContext().getDriverVersion().getMinorVersion();
     }
 
     public boolean jdbcCompliant() {
diff --git a/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBMetaStatement.java b/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBMetaStatement.java
index 0e2f53d..4525062 100644
--- a/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBMetaStatement.java
+++ b/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBMetaStatement.java
@@ -40,7 +40,7 @@
     private static final String PK_NAME_SUFFIX = "_pk";
     private static final String FK_NAME_SUFFIX = "_fk";
 
-    protected ADBMetaStatement(ADBConnection connection) {
+    public ADBMetaStatement(ADBConnection connection) {
         super(connection);
     }
 
@@ -51,7 +51,7 @@
         //sql.append("set `compiler.min.memory.allocation` 'false';\n");
     }
 
-    ADBResultSet executeGetCatalogsQuery() throws SQLException {
+    protected ADBResultSet executeGetCatalogsQuery() throws SQLException {
         checkClosed();
 
         StringBuilder sql = new StringBuilder(256);
@@ -78,7 +78,7 @@
         return executeQueryImpl(sql.toString(), null);
     }
 
-    ADBResultSet executeGetSchemasQuery() throws SQLException {
+    protected ADBResultSet executeGetSchemasQuery() throws SQLException {
         String catalog;
         switch (connection.catalogDataverseMode) {
             case CATALOG:
@@ -93,11 +93,12 @@
         return executeGetSchemasQuery(catalog, null, "0");
     }
 
-    ADBResultSet executeGetSchemasQuery(String catalog, String schemaPattern) throws SQLException {
+    protected ADBResultSet executeGetSchemasQuery(String catalog, String schemaPattern) throws SQLException {
         return executeGetSchemasQuery(catalog, schemaPattern, "1");
     }
 
-    ADBResultSet executeGetSchemasQuery(String catalog, String schemaPattern, String tag) throws SQLException {
+    protected ADBResultSet executeGetSchemasQuery(String catalog, String schemaPattern, String tag)
+            throws SQLException {
         checkClosed();
 
         StringBuilder sql = new StringBuilder(512);
@@ -132,8 +133,8 @@
         return executeQueryImpl(sql.toString(), Arrays.asList(catalog, schemaPattern));
     }
 
-    ADBResultSet executeGetTablesQuery(String catalog, String schemaPattern, String tableNamePattern, String[] types)
-            throws SQLException {
+    protected ADBResultSet executeGetTablesQuery(String catalog, String schemaPattern, String tableNamePattern,
+            String[] types) throws SQLException {
         checkClosed();
 
         String datasetTermTabular = getDatasetTerm(true);
@@ -203,7 +204,7 @@
         return executeQueryImpl(sql.toString(), Arrays.asList(typesList, catalog, schemaPattern, tableNamePattern));
     }
 
-    ADBResultSet executeGetColumnsQuery(String catalog, String schemaPattern, String tableNamePattern,
+    protected ADBResultSet executeGetColumnsQuery(String catalog, String schemaPattern, String tableNamePattern,
             String columnNamePattern) throws SQLException {
         checkClosed();
 
@@ -293,7 +294,7 @@
                 Arrays.asList(catalog, schemaPattern, tableNamePattern, columnNamePattern));
     }
 
-    ADBResultSet executeGetPrimaryKeysQuery(String catalog, String schema, String table) throws SQLException {
+    protected ADBResultSet executeGetPrimaryKeysQuery(String catalog, String schema, String table) throws SQLException {
         checkClosed();
 
         StringBuilder sql = new StringBuilder(1024);
@@ -353,17 +354,19 @@
         return executeQueryImpl(sql.toString(), Arrays.asList(catalog, schema, table));
     }
 
-    ADBResultSet executeGetImportedKeysQuery(String catalog, String schema, String table) throws SQLException {
+    protected ADBResultSet executeGetImportedKeysQuery(String catalog, String schema, String table)
+            throws SQLException {
         return executeGetImportedExportedKeysQuery("JDBC-GetImportedKeys", null, null, null, catalog, schema, table,
                 false);
     }
 
-    ADBResultSet executeGetExportedKeysQuery(String catalog, String schema, String table) throws SQLException {
+    protected ADBResultSet executeGetExportedKeysQuery(String catalog, String schema, String table)
+            throws SQLException {
         return executeGetImportedExportedKeysQuery("JDBC-GetExportedKeys", catalog, schema, table, null, null, null,
                 true);
     }
 
-    ADBResultSet executeCrossReferenceQuery(String parentCatalog, String parentSchema, String parentTable,
+    protected ADBResultSet executeCrossReferenceQuery(String parentCatalog, String parentSchema, String parentTable,
             String foreignCatalog, String foreignSchema, String foreignTable) throws SQLException {
         return executeGetImportedExportedKeysQuery("JDBC-CrossReference", parentCatalog, parentSchema, parentTable,
                 foreignCatalog, foreignSchema, foreignTable, true);
@@ -462,7 +465,7 @@
                 Arrays.asList(pkCatalog, pkSchema, pkTable, fkCatalog, fkSchema, fkTable));
     }
 
-    ADBResultSet executeGetTableTypesQuery() throws SQLException {
+    protected ADBResultSet executeGetTableTypesQuery() throws SQLException {
         checkClosed();
 
         LinkedHashSet<String> tableTypes = new LinkedHashSet<>();
@@ -485,7 +488,7 @@
         return createSystemResultSet(columns, result);
     }
 
-    ADBResultSet executeGetTypeInfoQuery() throws SQLException {
+    protected ADBResultSet executeGetTypeInfoQuery() throws SQLException {
         checkClosed();
 
         AbstractValueSerializer int16Ser = getADMFormatSerializer(Short.class);
@@ -550,7 +553,7 @@
         return createSystemResultSet(columns, result);
     }
 
-    private void populateTypeInfo(ObjectNode typeInfo, ADBDatatype type, int precision, Integer precisionRadix,
+    protected void populateTypeInfo(ObjectNode typeInfo, ADBDatatype type, int precision, Integer precisionRadix,
             Integer minScale, Integer maxScale, Boolean searchable, String literalPrefix, String literalSuffix,
             ADBPreparedStatement.AbstractValueSerializer int16Ser,
             ADBPreparedStatement.AbstractValueSerializer int32Ser,
@@ -577,13 +580,13 @@
         typeInfo.put("NUM_PREC_RADIX", int32Ser.serializeToString(precisionRadix != null ? precisionRadix : 10));
     }
 
-    ADBResultSet executeEmptyResultQuery() throws SQLException {
+    protected ADBResultSet executeEmptyResultQuery() throws SQLException {
         checkClosed();
         return createEmptyResultSet();
     }
 
     @Override
-    ADBStatement getResultSetStatement(ADBResultSet rs) {
+    protected ADBStatement getResultSetStatement(ADBResultSet rs) {
         return null;
     }
 
diff --git a/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBParameterMetaData.java b/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBParameterMetaData.java
index d612b3f..a42def1 100644
--- a/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBParameterMetaData.java
+++ b/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBParameterMetaData.java
@@ -23,11 +23,11 @@
 import java.sql.Types;
 import java.util.Objects;
 
-final class ADBParameterMetaData extends ADBWrapperSupport implements ParameterMetaData {
+public class ADBParameterMetaData extends ADBWrapperSupport implements ParameterMetaData {
 
-    final ADBPreparedStatement statement;
+    protected final ADBPreparedStatement statement;
 
-    final int parameterCount;
+    protected final int parameterCount;
 
     public ADBParameterMetaData(ADBPreparedStatement statement, int parameterCount) {
         this.statement = Objects.requireNonNull(statement);
diff --git a/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBPreparedStatement.java b/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBPreparedStatement.java
index c95d462..7a6d5af 100644
--- a/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBPreparedStatement.java
+++ b/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBPreparedStatement.java
@@ -41,15 +41,15 @@
 import java.util.Collections;
 import java.util.List;
 
-final class ADBPreparedStatement extends ADBStatement implements PreparedStatement {
+public class ADBPreparedStatement extends ADBStatement implements PreparedStatement {
 
-    final String sql;
+    protected final String sql;
 
-    final List<Object> args;
+    protected final List<Object> args;
 
-    final List<ADBColumn> resultColumns;
+    protected final List<ADBColumn> resultColumns;
 
-    ADBPreparedStatement(ADBConnection connection, String sql) throws SQLException {
+    public ADBPreparedStatement(ADBConnection connection, String sql) throws SQLException {
         super(connection);
         ADBProtocolBase.SubmitStatementOptions stmtOptions = createSubmitStatementOptions();
         stmtOptions.compileOnly = true;
diff --git a/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBProductVersion.java b/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBProductVersion.java
index 5255d75..a49a209 100644
--- a/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBProductVersion.java
+++ b/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBProductVersion.java
@@ -22,29 +22,45 @@
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-final class ADBProductVersion {
+public class ADBProductVersion {
 
     public static final String ASTERIXDB = "Apache AsterixDB";
 
     private static final Pattern DATABASE_VERSION_PATTERN =
             Pattern.compile("(?<name>[^/]+)(?:/(?<ver>(?:(?<vermj>\\d+)(?:\\.(?<vermn>\\d+))?)?.*))?");
 
-    final String productName;
+    private final String productName;
 
-    final String productVersion;
+    private final String productVersion;
 
-    final int majorVersion;
+    private final int majorVersion;
 
-    final int minorVersion;
+    private final int minorVersion;
 
-    private ADBProductVersion(String productName, String productVersion, int majorVersion, int minorVersion) {
+    public ADBProductVersion(String productName, String productVersion, int majorVersion, int minorVersion) {
         this.productName = productName != null ? productName : ASTERIXDB;
         this.productVersion = productVersion != null ? productVersion : majorVersion + "." + minorVersion;
         this.majorVersion = majorVersion;
         this.minorVersion = minorVersion;
     }
 
-    static ADBProductVersion parseDriverVersion(Package driverPackage) {
+    public String getProductName() {
+        return productName;
+    }
+
+    public String getProductVersion() {
+        return productVersion;
+    }
+
+    public int getMajorVersion() {
+        return majorVersion;
+    }
+
+    public int getMinorVersion() {
+        return minorVersion;
+    }
+
+    public static ADBProductVersion parseDriverVersion(Package driverPackage) {
         int majorVersion = 0, minorVersion = 0;
         String productName = driverPackage.getImplementationTitle();
         if (productName == null) {
@@ -65,7 +81,7 @@
         return new ADBProductVersion(productName, productVersion, majorVersion, minorVersion);
     }
 
-    static ADBProductVersion parseDatabaseVersion(String serverVersion) {
+    public static ADBProductVersion parseDatabaseVersion(String serverVersion) {
         String dbProductName = null;
         String dbProductVersion = null;
         int dbMajorVersion = 0;
diff --git a/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBResultSet.java b/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBResultSet.java
index 8ba5b83..1d46b4e 100644
--- a/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBResultSet.java
+++ b/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBResultSet.java
@@ -53,7 +53,7 @@
 import com.fasterxml.jackson.core.JsonToken;
 import com.fasterxml.jackson.databind.ObjectReader;
 
-final class ADBResultSet extends ADBWrapperSupport implements java.sql.ResultSet {
+public class ADBResultSet extends ADBWrapperSupport implements java.sql.ResultSet {
 
     static final int RESULT_SET_HOLDABILITY = HOLD_CURSORS_OVER_COMMIT;
 
@@ -80,7 +80,8 @@
 
     // Lifecycle
 
-    ADBResultSet(ADBResultSetMetaData metadata, JsonParser rowParser, boolean rowParserOwnsResources, long maxRows) {
+    public ADBResultSet(ADBResultSetMetaData metadata, JsonParser rowParser, boolean rowParserOwnsResources,
+            long maxRows) {
         this.metadata = Objects.requireNonNull(metadata);
         this.rowParser = Objects.requireNonNull(rowParser);
         this.rowParserOwnsResources = rowParserOwnsResources;
diff --git a/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBResultSetMetaData.java b/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBResultSetMetaData.java
index 67dd217..8e2cb01 100644
--- a/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBResultSetMetaData.java
+++ b/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBResultSetMetaData.java
@@ -27,7 +27,7 @@
 import java.util.Map;
 import java.util.Objects;
 
-final class ADBResultSetMetaData extends ADBWrapperSupport implements ResultSetMetaData {
+public class ADBResultSetMetaData extends ADBWrapperSupport implements ResultSetMetaData {
 
     final ADBStatement statement;
 
@@ -35,7 +35,7 @@
 
     private final Map<String, Integer> indexByName;
 
-    ADBResultSetMetaData(ADBStatement statement, List<ADBColumn> columns) {
+    public ADBResultSetMetaData(ADBStatement statement, List<ADBColumn> columns) {
         this.statement = Objects.requireNonNull(statement);
         this.columns = columns != null ? columns : Collections.emptyList();
         this.indexByName = createIndexByName(this.columns);
diff --git a/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBRowStore.java b/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBRowStore.java
index ad9d691..ed6995d 100644
--- a/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBRowStore.java
+++ b/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBRowStore.java
@@ -64,7 +64,7 @@
 import com.fasterxml.jackson.databind.deser.BeanDeserializerModifier;
 import com.fasterxml.jackson.databind.module.SimpleModule;
 
-final class ADBRowStore {
+public final class ADBRowStore {
 
     static final char TEXT_DELIMITER = ':';
     private static final String ROW_STORE_ATTR_NAME = ADBRowStore.class.getSimpleName();
@@ -95,7 +95,7 @@
     private JsonGenerator jsonGen;
     private StringWriter jsonGenBuffer;
 
-    ADBRowStore(ADBResultSet resultSet, int initialColumnCount) {
+    public ADBRowStore(ADBResultSet resultSet, int initialColumnCount) {
         this.resultSet = Objects.requireNonNull(resultSet);
         columnTypes = new ADBDatatype[initialColumnCount];
         objectStore = new Object[initialColumnCount];
diff --git a/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBStatement.java b/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBStatement.java
index ce706a4..6eea813 100644
--- a/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBStatement.java
+++ b/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBStatement.java
@@ -63,7 +63,7 @@
 import com.fasterxml.jackson.databind.node.ArrayNode;
 import com.fasterxml.jackson.databind.ser.BeanSerializerModifier;
 
-class ADBStatement extends ADBWrapperSupport implements java.sql.Statement {
+public class ADBStatement extends ADBWrapperSupport implements java.sql.Statement {
 
     static final List<Class<?>> SET_OBJECT_ATOMIC_EXTRA =
             Arrays.asList(SqlCalendarDate.class, SqlCalendarTime.class, SqlCalendarTimestamp.class);
@@ -75,7 +75,7 @@
     protected final ADBConnection connection;
 
     protected final AtomicBoolean closed = new AtomicBoolean(false);
-    protected volatile boolean closeOnCompletion;
+    private volatile boolean closeOnCompletion;
 
     protected int queryTimeoutSeconds;
     protected long maxRows;
@@ -95,7 +95,7 @@
 
     // Lifecycle
 
-    ADBStatement(ADBConnection connection) {
+    public ADBStatement(ADBConnection connection) {
         this.connection = Objects.requireNonNull(connection);
         this.resultSetsWithResources = new ConcurrentLinkedQueue<>();
         this.resultSetsWithoutResources = new ConcurrentLinkedQueue<>();
@@ -107,7 +107,7 @@
         closeImpl(true, true);
     }
 
-    void closeImpl(boolean closeResultSets, boolean notifyConnection) throws SQLException {
+    protected void closeImpl(boolean closeResultSets, boolean notifyConnection) throws SQLException {
         boolean wasClosed = closed.getAndSet(true);
         if (wasClosed) {
             return;
@@ -406,7 +406,7 @@
 
     // ResultSet lifecycle
 
-    private ADBResultSet fetchResultSet(ADBProtocolBase.QueryServiceResponse execResponse) throws SQLException {
+    protected ADBResultSet fetchResultSet(ADBProtocolBase.QueryServiceResponse execResponse) throws SQLException {
         List<ADBColumn> columns = connection.protocol.getColumns(execResponse);
         if (getLogger().isLoggable(Level.FINER)) {
             getLogger().log(Level.FINE, "result schema " + columns);
@@ -432,7 +432,7 @@
         return createSystemResultSet(Collections.emptyList(), empty);
     }
 
-    private ADBResultSet createResultSetImpl(List<ADBColumn> columns, JsonParser rowParser,
+    protected ADBResultSet createResultSetImpl(List<ADBColumn> columns, JsonParser rowParser,
             boolean rowParserOwnsResources, long maxRows) {
         ADBResultSetMetaData metadata = new ADBResultSetMetaData(this, columns);
         ADBResultSet rs = new ADBResultSet(metadata, rowParser, rowParserOwnsResources, maxRows);
@@ -440,7 +440,7 @@
         return rs;
     }
 
-    private void registerResultSet(ADBResultSet rs) {
+    protected void registerResultSet(ADBResultSet rs) {
         if (rs.rowParserOwnsResources) {
             resultSetsWithResources.add(rs);
         } else {
@@ -470,7 +470,7 @@
         }
     }
 
-    private void closeRegisteredResultSets() throws SQLException {
+    protected void closeRegisteredResultSets() throws SQLException {
         SQLException err = null;
         try {
             closedRegisteredResultSetsImpl(resultSetsWithResources, Function.identity());
@@ -490,7 +490,7 @@
         }
     }
 
-    private <T> void closedRegisteredResultSetsImpl(Queue<T> queue, Function<T, ADBResultSet> rsAccessor)
+    protected <T> void closedRegisteredResultSetsImpl(Queue<T> queue, Function<T, ADBResultSet> rsAccessor)
             throws SQLException {
         SQLException err = null;
         T item;
@@ -643,15 +643,15 @@
 
     // Serialization
 
-    static void configureADMFormatSerialization(SimpleModule serdeModule) {
+    protected static void configureADMFormatSerialization(SimpleModule serdeModule) {
         serdeModule.setSerializerModifier(createADMFormatSerializerModifier());
     }
 
-    static AbstractValueSerializer getADMFormatSerializer(Class<?> cls) {
+    protected static AbstractValueSerializer getADMFormatSerializer(Class<?> cls) {
         return SERIALIZER_MAP.get(cls);
     }
 
-    private static BeanSerializerModifier createADMFormatSerializerModifier() {
+    protected static BeanSerializerModifier createADMFormatSerializerModifier() {
         return new BeanSerializerModifier() {
             @Override
             public JsonSerializer<?> modifySerializer(SerializationConfig config, BeanDescription beanDesc,
@@ -667,7 +667,7 @@
         };
     }
 
-    static boolean isSetObjectCompatible(Class<?> cls) {
+    protected static boolean isSetObjectCompatible(Class<?> cls) {
         if (ADBRowStore.OBJECT_ACCESSORS_ATOMIC.containsKey(cls) || SET_OBJECT_ATOMIC_EXTRA.contains(cls)) {
             return true;
         }
@@ -679,7 +679,7 @@
         return false;
     }
 
-    private static Map<Class<?>, AbstractValueSerializer> createSerializerMap() {
+    protected static Map<Class<?>, AbstractValueSerializer> createSerializerMap() {
         Map<Class<?>, AbstractValueSerializer> serializerMap = new HashMap<>();
         registerSerializer(serializerMap, createGenericSerializer(Byte.class, ADBDatatype.TINYINT));
         registerSerializer(serializerMap, createGenericSerializer(Short.class, ADBDatatype.SMALLINT));
@@ -703,12 +703,12 @@
         return serializerMap;
     }
 
-    private static void registerSerializer(Map<Class<?>, AbstractValueSerializer> map,
+    protected static void registerSerializer(Map<Class<?>, AbstractValueSerializer> map,
             AbstractValueSerializer serializer) {
         map.put(serializer.getJavaType(), serializer);
     }
 
-    private static ATaggedValueSerializer createGenericSerializer(Class<?> javaType, ADBDatatype ADBDatatype) {
+    protected static ATaggedValueSerializer createGenericSerializer(Class<?> javaType, ADBDatatype ADBDatatype) {
         return new ATaggedValueSerializer(javaType, ADBDatatype) {
             @Override
             protected void serializeNonTaggedValue(Object value, StringBuilder out) {
@@ -717,7 +717,7 @@
         };
     }
 
-    private static AbstractValueSerializer createStringSerializer() {
+    protected static AbstractValueSerializer createStringSerializer() {
         return new AbstractValueSerializer(java.lang.String.class) {
             @Override
             public void serialize(Object value, JsonGenerator gen, SerializerProvider serializers) throws IOException {
@@ -731,7 +731,7 @@
         };
     }
 
-    private static ATaggedValueSerializer createFloatSerializer() {
+    protected static ATaggedValueSerializer createFloatSerializer() {
         return new ATaggedValueSerializer(Float.class, ADBDatatype.FLOAT) {
             @Override
             protected void serializeNonTaggedValue(Object value, StringBuilder out) {
@@ -741,7 +741,7 @@
         };
     }
 
-    private static ATaggedValueSerializer createDoubleSerializer() {
+    protected static ATaggedValueSerializer createDoubleSerializer() {
         return new ATaggedValueSerializer(Double.class, ADBDatatype.DOUBLE) {
             @Override
             protected void serializeNonTaggedValue(Object value, StringBuilder out) {
@@ -751,7 +751,7 @@
         };
     }
 
-    private static ATaggedValueSerializer createSqlDateSerializer() {
+    protected static ATaggedValueSerializer createSqlDateSerializer() {
         return new ATaggedValueSerializer(java.sql.Date.class, ADBDatatype.DATE) {
             @Override
             protected void serializeNonTaggedValue(Object value, StringBuilder out) {
@@ -763,7 +763,7 @@
         };
     }
 
-    private static ATaggedValueSerializer createSqlDateWithCalendarSerializer() {
+    protected static ATaggedValueSerializer createSqlDateWithCalendarSerializer() {
         return new ATaggedValueSerializer(SqlCalendarDate.class, ADBDatatype.DATE) {
             @Override
             protected void serializeNonTaggedValue(Object value, StringBuilder out) {
@@ -776,7 +776,7 @@
         };
     }
 
-    private static ATaggedValueSerializer createLocalDateSerializer() {
+    protected static ATaggedValueSerializer createLocalDateSerializer() {
         return new ATaggedValueSerializer(java.time.LocalDate.class, ADBDatatype.DATE) {
             @Override
             protected void serializeNonTaggedValue(Object value, StringBuilder out) {
@@ -786,7 +786,7 @@
         };
     }
 
-    private static ATaggedValueSerializer createSqlTimeSerializer() {
+    protected static ATaggedValueSerializer createSqlTimeSerializer() {
         return new ATaggedValueSerializer(java.sql.Time.class, ADBDatatype.TIME) {
             @Override
             protected void serializeNonTaggedValue(Object value, StringBuilder out) {
@@ -798,7 +798,7 @@
         };
     }
 
-    private static ATaggedValueSerializer createSqlCalendarTimeSerializer() {
+    protected static ATaggedValueSerializer createSqlCalendarTimeSerializer() {
         return new ATaggedValueSerializer(SqlCalendarTime.class, ADBDatatype.TIME) {
             @Override
             protected void serializeNonTaggedValue(Object value, StringBuilder out) {
@@ -811,7 +811,7 @@
         };
     }
 
-    private static ATaggedValueSerializer createLocalTimeSerializer() {
+    protected static ATaggedValueSerializer createLocalTimeSerializer() {
         return new ATaggedValueSerializer(java.time.LocalTime.class, ADBDatatype.TIME) {
             @Override
             protected void serializeNonTaggedValue(Object value, StringBuilder out) {
@@ -822,7 +822,7 @@
         };
     }
 
-    private static ATaggedValueSerializer createSqlTimestampSerializer() {
+    protected static ATaggedValueSerializer createSqlTimestampSerializer() {
         return new ATaggedValueSerializer(java.sql.Timestamp.class, ADBDatatype.DATETIME) {
             @Override
             protected void serializeNonTaggedValue(Object value, StringBuilder out) {
@@ -833,7 +833,7 @@
         };
     }
 
-    private static ATaggedValueSerializer createSqlCalendarTimestampSerializer() {
+    protected static ATaggedValueSerializer createSqlCalendarTimestampSerializer() {
         return new ATaggedValueSerializer(SqlCalendarTimestamp.class, ADBDatatype.DATETIME) {
             @Override
             protected void serializeNonTaggedValue(Object value, StringBuilder out) {
@@ -845,7 +845,7 @@
         };
     }
 
-    private static ATaggedValueSerializer createLocalDateTimeSerializer() {
+    protected static ATaggedValueSerializer createLocalDateTimeSerializer() {
         return new ATaggedValueSerializer(java.time.LocalDateTime.class, ADBDatatype.DATETIME) {
             @Override
             protected void serializeNonTaggedValue(Object value, StringBuilder out) {
@@ -855,7 +855,7 @@
         };
     }
 
-    private static ATaggedValueSerializer createPeriodSerializer() {
+    protected static ATaggedValueSerializer createPeriodSerializer() {
         return new ATaggedValueSerializer(java.time.Period.class, ADBDatatype.YEARMONTHDURATION) {
             @Override
             protected void serializeNonTaggedValue(Object value, StringBuilder out) {
@@ -865,7 +865,7 @@
         };
     }
 
-    private static ATaggedValueSerializer createDurationSerializer() {
+    protected static ATaggedValueSerializer createDurationSerializer() {
         return new ATaggedValueSerializer(java.time.Duration.class, ADBDatatype.DAYTIMEDURATION) {
             @Override
             protected void serializeNonTaggedValue(Object value, StringBuilder out) {
@@ -875,7 +875,7 @@
         };
     }
 
-    static abstract class AbstractValueSerializer extends JsonSerializer<Object> {
+    protected static abstract class AbstractValueSerializer extends JsonSerializer<Object> {
 
         protected final Class<?> javaType;
 
@@ -890,7 +890,7 @@
         abstract String serializeToString(Object value);
     }
 
-    private static abstract class ATaggedValueSerializer extends AbstractValueSerializer {
+    protected static abstract class ATaggedValueSerializer extends AbstractValueSerializer {
 
         protected static ZoneId TZ_UTC = ZoneId.of("UTC");
 
@@ -931,7 +931,7 @@
         }
     }
 
-    static abstract class AbstractSqlCalendarDateTime {
+    protected static abstract class AbstractSqlCalendarDateTime {
         final TimeZone timeZone;
 
         AbstractSqlCalendarDateTime(TimeZone timeZone) {
@@ -939,7 +939,7 @@
         }
     }
 
-    static final class SqlCalendarDate extends AbstractSqlCalendarDateTime {
+    protected static final class SqlCalendarDate extends AbstractSqlCalendarDateTime {
         final Date date;
 
         SqlCalendarDate(Date date, TimeZone timeZone) {
@@ -948,7 +948,7 @@
         }
     }
 
-    static final class SqlCalendarTime extends AbstractSqlCalendarDateTime {
+    protected static final class SqlCalendarTime extends AbstractSqlCalendarDateTime {
         final Time time;
 
         SqlCalendarTime(Time time, TimeZone timeZone) {
@@ -957,7 +957,7 @@
         }
     }
 
-    static final class SqlCalendarTimestamp extends AbstractSqlCalendarDateTime {
+    protected static final class SqlCalendarTimestamp extends AbstractSqlCalendarDateTime {
         final Timestamp timestamp;
 
         SqlCalendarTimestamp(Timestamp timestamp, TimeZone timeZone) {
diff --git a/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBWrapperSupport.java b/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBWrapperSupport.java
index 30cbfd0..032659b 100644
--- a/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBWrapperSupport.java
+++ b/asterixdb-jdbc/asterix-jdbc-core/src/main/java/org/apache/asterix/jdbc/core/ADBWrapperSupport.java
@@ -22,7 +22,7 @@
 import java.sql.SQLException;
 import java.sql.Wrapper;
 
-abstract class ADBWrapperSupport implements Wrapper {
+public abstract class ADBWrapperSupport implements Wrapper {
 
     @Override
     public final boolean isWrapperFor(Class<?> iface) {
