### Question:
HBaseConnection { protected void close() { try { if (connection != null) { connection.close(); } } catch (IOException | RuntimeException ex) { logger.warn("close: Exception while closing connection."); } } protected  HBaseConnection(Configuration config, int maxRetries); @VisibleForTesting protected  HBaseConnection(Connection connection, int maxRetries); synchronized boolean isHealthy(); NamespaceDescriptor[] listNamespaceDescriptors(); TableName[] listTableNamesByNamespace(String schemaName); List<HRegionInfo> getTableRegions(TableName tableName); T scanTable(TableName tableName, Scan scan, ResultProcessor<T> resultProcessor);  }### Answer:
@Test public void close() throws IOException { connection.close(); verify(mockConnection, times(1)).close(); }