### Question:
EllipseSemiMajorAxisKey extends AbstractSpecialKey implements SpecialColumnDetector { public static Class<? extends Length> detectUnit(String columnName) { Class<? extends Length> lengthClass = null; if (StringUtils.containsIgnoreCase(columnName, "km)") || StringUtils.containsIgnoreCase(columnName, "kilometers)")) { lengthClass = Kilometers.class; } else if (StringUtils.containsIgnoreCase(columnName, "nm)") || StringUtils.containsIgnoreCase(columnName, "nmi)") || StringUtils.containsIgnoreCase(columnName, "nautical miles)")) { lengthClass = NauticalMiles.class; } else if (StringUtils.containsIgnoreCase(columnName, "mi)") || StringUtils.containsIgnoreCase(columnName, "miles)")) { lengthClass = StatuteMiles.class; } else if (StringUtils.containsIgnoreCase(columnName, "m)") || StringUtils.containsIgnoreCase(columnName, "meters)")) { lengthClass = Meters.class; } return lengthClass; } EllipseSemiMajorAxisKey();  EllipseSemiMajorAxisKey(Class<? extends Length> semiMajorUnit); @Override boolean markSpecialColumn(MetaDataInfo metaData, String columnName); @Override SpecialKey detectColumn(String columnName); @SuppressWarnings("unchecked") Class<? extends Length> getSemiMajorUnit(); static Class<? extends Length> detectUnit(String columnName); static final EllipseSemiMajorAxisKey DEFAULT; }### Answer:
@Test public void testDetectUnit() { Assert.assertEquals(Kilometers.class, EllipseSemiMajorAxisKey.detectUnit("blah (km)")); Assert.assertEquals(Kilometers.class, EllipseSemiMajorAxisKey.detectUnit("blah (kilometers)")); Assert.assertEquals(Meters.class, EllipseSemiMajorAxisKey.detectUnit("blah (m)")); Assert.assertEquals(Meters.class, EllipseSemiMajorAxisKey.detectUnit("blah (meters)")); Assert.assertEquals(StatuteMiles.class, EllipseSemiMajorAxisKey.detectUnit("blah (mi)")); Assert.assertEquals(StatuteMiles.class, EllipseSemiMajorAxisKey.detectUnit("blah (miles)")); Assert.assertEquals(NauticalMiles.class, EllipseSemiMajorAxisKey.detectUnit("blah (nm)")); Assert.assertEquals(NauticalMiles.class, EllipseSemiMajorAxisKey.detectUnit("blah (nmi)")); Assert.assertEquals(NauticalMiles.class, EllipseSemiMajorAxisKey.detectUnit("blah (nautical miles)")); }