### Question:
LongitudeFormatter extends BaseLocationFormatter { @Override public String getFormat(List<String> values) { LongitudeCellSampler sampler = new LongitudeCellSampler(values); LocationDetector detector = new LocationDetector(myRegistry); ValuesWithConfidence<LocationResults> valueWithConf = detector.detect(sampler); LocationResults results = valueWithConf.getBestValue(); LatLonColumnResults result = results == null ? null : results.getMostLikelyLatLonColumnPair(); PotentialLocationColumn column = result == null ? null : result.getLonColumn(); if (column == null) { return super.getFormat(values); } CoordFormat fmt = column.getLonFormat(); if (fmt != null) { return fmt.toString(); } return null; } LongitudeFormatter(PreferencesRegistry registry); @Override Object formatCell(String val, String fmtString); @Override String getFormat(List<String> values);  }### Answer:
@Test public void testGetFormat() { PreferencesRegistry registry = LocationTestUtils.getPrefsRegistry(); LongitudeFormatter formatter = new LongitudeFormatter(registry); String format = formatter.getFormat(New.list("-105.3927469444")); assertEquals(CoordFormat.DECIMAL.toString(), format); format = formatter.getFormat(New.list("105°23'33.889\"W")); assertEquals(CoordFormat.DMS.toString(), format); }