### Question:
MetaDataInfoProvider { public MetaDataInfo createMetaDataInfo(List<DataTypeInfo> mergedLayers, List<MergedDataRow> data) { DefaultMetaDataInfo metadataInfo = new DefaultMetaDataInfo(); Map<String, Class<?>> columnsToTypes = new LinkedHashMap<>(); for (MergedDataRow row : data) { for (Entry<String, Serializable> entry : row.getData().entrySet()) { Class<?> type = String.class; if (entry.getValue() != null) { type = entry.getValue().getClass(); if (!type.equals(columnsToTypes.get(entry.getKey()))) { columnsToTypes.put(entry.getKey(), type); } } else { columnsToTypes.put(entry.getKey(), type); } } } for (Entry<String, Class<?>> column : columnsToTypes.entrySet()) { metadataInfo.addKey(column.getKey(), column.getValue(), this); } addSpecialKeys(metadataInfo, mergedLayers); metadataInfo.copyKeysToOriginalKeys(); return metadataInfo; } MetaDataInfoProvider(ColumnMappingController controller); MetaDataInfo createMetaDataInfo(List<DataTypeInfo> mergedLayers, List<MergedDataRow> data);  }### Answer:
@Test public void testCreateMetaDataInfo() { EasyMockSupport support = new EasyMockSupport(); ColumnMappingController mapper = createMapper(support); List<DataTypeInfo> layers = createDataTypes(support); Map<String, Serializable> data1 = New.map(); data1.put(ourDefinedColumn, Double.valueOf(10)); data1.put(ourColumnTime, TimeSpan.get()); Map<String, Serializable> data2 = New.map(); data1.put(ourDefinedColumn, Double.valueOf(11)); data1.put(ourColumnTime, TimeSpan.get()); List<MergedDataRow> mergedRows = New.list(new MergedDataRow(data1, null, null), new MergedDataRow(data2, null, null)); support.replayAll(); MetaDataInfoProvider provider = new MetaDataInfoProvider(mapper); MetaDataInfo metaInfo = provider.createMetaDataInfo(layers, mergedRows); assertEquals(Double.class, metaInfo.getKeyClassType(ourDefinedColumn)); assertTrue(TimeSpan.class.isAssignableFrom(metaInfo.getKeyClassType(ourColumnTime))); assertEquals(ourDefinedColumn, metaInfo.getLatitudeKey()); assertEquals(ourColumnTime, metaInfo.getTimeKey()); support.verifyAll(); }