### Question:
JSONIndividualMatrixResponse extends JSONBasedIndividualMatrixResponse { public void setSources(List<JSON2DSources> sources) { this.sources = sources; } JSONIndividualMatrixResponse(MatrixResult result, MatrixRequest request); Double[][] getDurations(); List<JSON2DDestinations> getDestinations(); List<JSON2DSources> getSources(); Double[][] getDistances(); void setDistances(Double[][] distances); void setDurations(Double[][] durations); void setDestinations(List<JSON2DDestinations> destinations); void setSources(List<JSON2DSources> sources);  }### Answer:
@Test public void setSources() { Coordinate coordinate = new Coordinate(9.681495, 50.41461); ResolvedLocation resolvedLocation = new ResolvedLocation(coordinate, "foo", 0.0); List<JSON2DSources> json2DSources = new ArrayList<>(); JSON2DSources json2DSource = new JSON2DSources(resolvedLocation, false); json2DSources.add(json2DSource); durationsMatrixResponse.setSources(json2DSources); distancesMatrixResponse.setSources(json2DSources); Assert.assertEquals(1, durationsMatrixResponse.getSources().size()); Assert.assertArrayEquals(new Double[]{9.681495, 50.41461}, durationsMatrixResponse.getSources().get(0).getLocation()); Assert.assertEquals(1, distancesMatrixResponse.getSources().size()); Assert.assertArrayEquals(new Double[]{9.681495, 50.41461}, distancesMatrixResponse.getSources().get(0).getLocation()); }