### Question:
FileParseUtils { public static Map<Integer, Double> parseIntDouble(String file, String separator) throws FileNotFoundException { Map<Integer, Double> ret = new HashMap<Integer, Double>(); for (String line : new LineReader(new FileInputStream(file))) { String[] split = line.split(separator); ret.put(parseInt(split[0].trim()), parseDouble(split[1].trim())); } return ret; }  static List<Double> parseToDoubleList(String txt, String separator); static List<Float> parseToFloatList(String txt, String separator); static List<Integer> parseToIntegerList(String txt, String separator); static Map<Integer, Double> parseIntDouble(String file,
            String separator); static Map<Integer, Integer> parseIntInt(String file,
            String separator); static List<Integer> parseIntColumn(String file, int column,
            String separator, boolean skipHeader);  }### Answer:
@Test public void testParseIntDouble() throws Exception { String f = FileParseUtilsTest.class.getResource( "FileParseUtilsTest_intdouble.txt").getFile(); Map<Integer, Double> i_d = FileParseUtils.parseIntDouble(f, " "); assertEquals(3, i_d.size()); assertEquals(2.3, i_d.get(1), 0.00001); }