### Question:
ColumnMappingSupport implements EnvSupport { @Override public String columnMatch(Col column1, Col column2) { if (StringUtils.equals(column1.owner.getTypeKey(), column2.owner.getTypeKey())) { return null; } if (StringUtils.equals(column1.name, column2.name)) { return column1.name; } String mappedColumn1 = myMapper.getDefinedColumn(column1.owner.getTypeKey(), column1.name); String mappedColumn2 = myMapper.getDefinedColumn(column2.owner.getTypeKey(), column2.name); if (mappedColumn1 != null && mappedColumn1.equals(mappedColumn2)) { return mappedColumn1; } return specialKeyMatch(column1, column2); } ColumnMappingSupport(DataElementLookupUtils elementProvider, ColumnMappingController mappingController); @Override String columnMatch(Col column1, Col column2); @Override List<DataElement> getRecords(DataTypeInfo type);  }### Answer:
@Test public void testColumnMatch() { EasyMockSupport support = new EasyMockSupport(); DataElementLookupUtils lookup = support.createMock(DataElementLookupUtils.class); ColumnMappingController mapper = createMapper(support); List<Col> layer1Columns = createColumns(support, ourTypeKey1, ourType1Columns); List<Col> layer2Columns = createColumns(support, ourTypeKey2, ourType2Columns); support.replayAll(); ColumnMappingSupport mappingSupport = new ColumnMappingSupport(lookup, mapper); int i = 0; for (Col layer1Column : layer1Columns) { int j = 0; for (Col layer2Column : layer2Columns) { String joinedName = mappingSupport.columnMatch(layer1Column, layer2Column); if (i == 1 && j == 1 || i == 2 && j == 2) { assertNotNull(joinedName); } else { assertNull(joinedName); } j++; } i++; } support.verifyAll(); }