@Test
  public void testMatrix() {
    GHMRequest req = AbstractGHMatrixWebTester.createRequest();
    MatrixResponse res = ghMatrix.route(req);

    // no distances available
    assertEquals(0, res.get(1, 2).getBest().getDistance(), 1);
    // ... only weight:
    assertEquals(807, res.get(1, 2).getBest().getRouteWeight(), 5);

    req = AbstractGHMatrixWebTester.createRequest();
    req.addOutArray("weights");
    req.addOutArray("distances");
    res = ghMatrix.route(req);

    assertEquals(9750, res.get(1, 2).getBest().getDistance(), 5);
    assertEquals(807, res.get(1, 2).getBest().getRouteWeight(), 5);
  }
 @Before
 public void setUp() {
   String key = System.getProperty("graphhopper.key", "");
   ghMatrix = createMatrixWeb();
   ghMatrix.setKey(key);
 }