D3MapDisplayer extends C3AbstractDisplayer<D3MapDisplayer.View> { protected Map<String, Double> retrieveData(DataSet dataSet) { Map<String, Double> data = new HashMap<>(); List<DataColumn> columns = dataSet.getColumns(); List<?> locations = columns.get(0).getValues(); List<?> numbers = columns.get(1).getValues(); int total = locations.size(); for (int i = 0; i < total; i++) { Object locationValue = locations.get(i); Object numberValue = numbers.get(i); String numberStr = columnValueToString(numberValue); String location = columnValueToString(locationValue); Double value = Double.parseDouble(numberStr); data.put(location, value); } return data; } @Inject  D3MapDisplayer(FilterLabelSet filterLabelSet, View view, CountriesGeoJsonService countriesGeoJsonService); @Override View getView(); @Override DisplayerConstraints createDisplayerConstraints(); void selectLocation(String location); String format(Double value); D3MapDisplayer markers(); D3MapDisplayer regions(); D3MapConf getConf(); boolean isShowLegend();  }
@Test public void dataRetrievalTest() throws ParseException { Map<String, Double> data = displayer.retrieveData(twoColumnsRawDS.toDataSet()); Double val1 = data.get(COUNTRY_1); assertNotNull(val1); assertEquals(VAL_1.intValue(), val1.intValue()); }