IoTDBConnection implements Connection { public ServerProperties getServerProperties() throws TException { return getClient().getProperties(); } IoTDBConnection();  IoTDBConnection(String url, Properties info); @Override boolean isWrapperFor(Class<?> arg0); @Override T unwrap(Class<T> arg0); @Override void abort(Executor arg0); @Override void clearWarnings(); @Override void close(); @Override void commit(); @Override Array createArrayOf(String arg0, Object[] arg1); @Override Blob createBlob(); @Override Clob createClob(); @Override NClob createNClob(); @Override SQLXML createSQLXML(); @Override Statement createStatement(); @Override Statement createStatement(int resultSetType, int resultSetConcurrency); @Override Statement createStatement(int arg0, int arg1, int arg2); @Override Struct createStruct(String arg0, Object[] arg1); @Override boolean getAutoCommit(); @Override void setAutoCommit(boolean arg0); @Override String getCatalog(); @Override void setCatalog(String arg0); @Override Properties getClientInfo(); @Override void setClientInfo(Properties arg0); @Override String getClientInfo(String arg0); @Override int getHoldability(); @Override void setHoldability(int arg0); @Override DatabaseMetaData getMetaData(); @Override int getNetworkTimeout(); @Override String getSchema(); @Override void setSchema(String arg0); @Override int getTransactionIsolation(); @Override void setTransactionIsolation(int arg0); @Override Map<String, Class<?>> getTypeMap(); @Override void setTypeMap(Map<String, Class<?>> arg0); @Override SQLWarning getWarnings(); @Override boolean isClosed(); @Override boolean isReadOnly(); @Override void setReadOnly(boolean arg0); @Override boolean isValid(int arg0); @Override String nativeSQL(String arg0); @Override CallableStatement prepareCall(String arg0); @Override CallableStatement prepareCall(String arg0, int arg1, int arg2); @Override CallableStatement prepareCall(String arg0, int arg1, int arg2, int arg3); @Override PreparedStatement prepareStatement(String sql); @Override PreparedStatement prepareStatement(String sql, int autoGeneratedKeys); @Override PreparedStatement prepareStatement(String sql, int[] columnIndexes); @Override PreparedStatement prepareStatement(String sql, String[] columnNames); @Override PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency); @Override PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency,
      int resultSetHoldability); @Override void releaseSavepoint(Savepoint arg0); @Override void rollback(); @Override void rollback(Savepoint arg0); @Override void setClientInfo(String arg0, String arg1); @Override void setNetworkTimeout(Executor arg0, int arg1); @Override Savepoint setSavepoint(); @Override Savepoint setSavepoint(String arg0); TSIService.Iface getClient(); long getSessionId(); void setClient(TSIService.Iface client); String getTimeZone(); void setTimeZone(String zoneId); ServerProperties getServerProperties();  }
@Test public void testGetServerProperties() throws TException { final String version = "v0.1"; @SuppressWarnings("serial") final List<String> supportedAggregationTime = new ArrayList<String>() { { add("max_time"); add("min_time"); } }; final String timestampPrecision = "ms"; when(client.getProperties()) .thenReturn(new ServerProperties(version, supportedAggregationTime, timestampPrecision)); connection.setClient(client); assertEquals(connection.getServerProperties().getVersion(), version); for (int i = 0; i < supportedAggregationTime.size(); i++) { assertEquals(connection.getServerProperties().getSupportedTimeAggregationOperations().get(i), supportedAggregationTime.get(i)); } assertEquals(connection.getServerProperties().getTimestampPrecision(), timestampPrecision); }