### Question:
HBaseConnection { public TableName[] listTableNamesByNamespace(String schemaName) { return callWithReconnectAndRetry(() -> { Admin admin = getConnection().getAdmin(); return admin.listTableNamesByNamespace(schemaName); }); } 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 listTableNamesByNamespace() throws IOException { logger.info("listTableNamesByNamespace: enter"); when(mockConnection.getAdmin()).thenReturn(mockAdmin); when(mockAdmin.listTableNamesByNamespace(anyString())).thenReturn(new TableName[] {}); TableName[] result = connection.listTableNamesByNamespace("schemaName"); assertNotNull(result); assertTrue(connection.isHealthy()); assertEquals(0, connection.getRetries()); verify(mockConnection, atLeastOnce()).getAdmin(); verify(mockAdmin, atLeastOnce()).listTableNamesByNamespace(anyObject()); logger.info("listTableNamesByNamespace: exit"); }