LatLongEnhancer { public MapPoint getNyspPoint(Map<String, Object> geocodingResult, LatLongConfig config) { MapPoint mapPoint = new MapPoint(); if (geocodingResult.containsKey(config.getXCoordInputName()) && geocodingResult.containsKey(config.getYCoordInputName())) { mapPoint.setX(doubleValueOf(geocodingResult.get(config.getXCoordInputName()))); mapPoint.setY(doubleValueOf(geocodingResult.get(config.getYCoordInputName()))); } return mapPoint; }  void addLatLong(Map<String, Object> geocodingResult); MapPoint getNyspPoint(Map<String, Object> geocodingResult, LatLongConfig config); List<ItemDocumentation> getItemDocumentation(); Transformer getTransformer(); void setTransformer(Transformer transformer); List<LatLongConfig> getLatLongConfigs(); void setLatLongConfigs(List<LatLongConfig> latLongConfigs); static final LatLongConfig DEFAULT_LATLONG_CONFIG; static final LatLongConfig DEFAULT_LATLONG_INTERNAL_LABEL_CONFIG; static final Transformer DEFAULT_TRANSFORMER; static final List<LatLongConfig> DEFAULT_CONFIGS; }
@Test public void testGetNyspPoint() { MapPoint result = this.latLongEnhancer.getNyspPoint(geocodingResult, LatLongEnhancer.DEFAULT_LATLONG_CONFIG); assertZeroXY(result); this.geocodingResult.put(OutputParam.XCOORD, this.xCoord); result = this.latLongEnhancer.getNyspPoint(geocodingResult, LatLongEnhancer.DEFAULT_LATLONG_CONFIG); assertZeroXY(result); this.geocodingResult.remove(OutputParam.XCOORD); this.geocodingResult.put(OutputParam.YCOORD, this.yCoord); result = this.latLongEnhancer.getNyspPoint(geocodingResult, LatLongEnhancer.DEFAULT_LATLONG_CONFIG); assertZeroXY(result); this.geocodingResult.put(OutputParam.XCOORD, this.xCoord); this.geocodingResult.put(OutputParam.YCOORD, this.yCoord); result = this.latLongEnhancer.getNyspPoint(geocodingResult, LatLongEnhancer.DEFAULT_LATLONG_CONFIG); assertEquals(Double.parseDouble(this.xCoord), result.getX()); assertEquals(Double.parseDouble(this.yCoord), result.getY()); }