/** Tests getting lists of the price of each house in each place. */ @Test public void testPriceByPlace() throws IOException, SAXException, ParserConfigurationException { int[][] expectedPrices = { {45000000, 42500000}, {40000000}, {47500000}, {44500000, 42500000, 42500000} }; setUp(); Map<String, List<Integer>> pricesByPlace = stats.pricesByPlace(); for (int i = 0; i < places.length; ++i) { // for each price in that place, compare it to the price in prices for (int j = 0; j < expectedPrices[i].length; ++j) { assertEquals((Integer) expectedPrices[i][j], pricesByPlace.get(places[i]).get(j)); } } }