### Question:
SQLSchemaImpl implements SQLSchema { public List<Table> getTables(String catalog, String schema, String name) { Vector<Table> ret = new Vector<Table>(); String[] tableNames = _session.getSchemaInfo().getTables(); for (int i = 0; i < tableNames.length; i++) { String key = getKey(catalog, schema, name); SQLSchema.Table buf = _tableCache.get(key); if(null == buf) { buf = new SQLSchema.Table(catalog, schema, tableNames[i], _dmd); _tableCache.put(key, buf); } ret.add(buf); } return ret; } SQLSchemaImpl(ISession session); SQLSchema.Table getTable(String catalog, String schema, String name); List<Table> getTables(String catalog, String schema, String name); SQLSchema.Table getTableForAlias(String alias);  }### Answer:
@Test public void testGetTables() { expect(mockSchemaInfo.getTables()).andReturn(tables); mockHelper.replayAll(); classUnderTest = new SQLSchemaImpl(mockSession); List<SQLSchema.Table> result = classUnderTest.getTables(catalog, schema, name); assertEquals(tables.length, result.size()); mockHelper.verifyAll(); }
@Test public void testGetTables_null_Catalog_and_Schema() { expect(mockSchemaInfo.getTables()).andReturn(tables); mockHelper.replayAll(); classUnderTest = new SQLSchemaImpl(mockSession); List<SQLSchema.Table> result = classUnderTest.getTables(null, null, name); assertEquals(tables.length, result.size()); mockHelper.verifyAll(); }