### Question:
SpeedKey extends AbstractSpecialKey implements SpecialColumnDetector { @Override public boolean markSpecialColumn(MetaDataInfo metaData, String columnName) { boolean wasDetected = false; if (!metaData.hasTypeForSpecialKey(SpeedKey.DEFAULT)) { SpecialKey specialKey = detectColumn(columnName); if (specialKey != null) { metaData.setSpecialKey(columnName, specialKey, metaData); wasDetected = true; } } return wasDetected; } SpeedKey();  SpeedKey(SpeedUnit unit); @Override SpeedUnit getKeyUnit(); @Override boolean markSpecialColumn(MetaDataInfo metaData, String columnName); @Override SpecialKey detectColumn(String columnName); static boolean isSpeed(String columnName); static final SpeedKey DEFAULT; }### Answer:
@Test public void testMarkSpecialColumn() { DefaultMetaDataInfo metaData = new DefaultMetaDataInfo(); String column = "Speed (m/s)"; metaData.addKey(column, Double.class, this); SpeedKey.DEFAULT.markSpecialColumn(metaData, column); SpeedKey actual = (SpeedKey)metaData.getSpecialTypeForKey(column); SpeedKey expected = new SpeedKey(SpeedUnit.METERS_PER_SECOND); Assert.assertEquals(expected, actual); Assert.assertEquals(expected.getKeyUnit(), actual.getKeyUnit()); metaData = new DefaultMetaDataInfo(); column = "Speed (km/hr)"; metaData.addKey(column, Double.class, this); SpeedKey.DEFAULT.markSpecialColumn(metaData, column); actual = (SpeedKey)metaData.getSpecialTypeForKey(column); expected = new SpeedKey(SpeedUnit.KILOMETERS_PER_HOUR); Assert.assertEquals(expected, actual); Assert.assertEquals(expected.getKeyUnit(), actual.getKeyUnit()); }