Repository: graphhopper/graphhopper
Pull request #1913 (2020-02-16 08:54:20)

Cleanup GraphHopper tests in preparation to profile parameter
* make tests depend less on each other by removing class variables
* stop relying on default vehicle/weighting for requests
* stop relying on default CH weighting for preparation
* production code is still the same


Patch:
diff --git a/core/src/main/java/com/graphhopper/routing/profiles/RoadClass.java b/core/src/main/java/com/graphhopper/routing/profiles/RoadClass.java
index 0abc2f2c9..80daf7b6a 100644
--- a/core/src/main/java/com/graphhopper/routing/profiles/RoadClass.java
+++ b/core/src/main/java/com/graphhopper/routing/profiles/RoadClass.java
@@ -17,6 +17,8 @@
  */
 package com.graphhopper.routing.profiles;
 
+import com.graphhopper.util.Helper;
+
 /**
  * This enum defines the road class of an edge. It is heavily influenced from the highway tag in OSM that can be
  * primary, cycleway etc.
@@ -27,8 +29,7 @@ public enum RoadClass {
     TERTIARY("tertiary"), RESIDENTIAL("residential"), UNCLASSIFIED("unclassified"),
     SERVICE("service"), ROAD("road"), TRACK("track"),
     BRIDLEWAY("bridleway"), STEPS("steps"), CYCLEWAY("cycleway"),
-    PATH("path"), LIVING_STREET("living_street"), FOOTWAY("footway"),
-    PEDESTRIAN("pedestrian"), PLATFORM("platform"), CORRIDOR("corridor");
+    PATH("path"), LIVING_STREET("living_street");
 
     public static final String KEY = "road_class";
 
@@ -44,15 +45,12 @@ public enum RoadClass {
     }
 
     public static RoadClass find(String name) {
-        if (name == null || name.isEmpty())
+        if (name == null)
+            return OTHER;
+        try {
+            return RoadClass.valueOf(Helper.toUpperCase(name));
+        } catch (IllegalArgumentException ex) {
             return OTHER;
-        
-        for (RoadClass roadClass : values()) {
-            if (roadClass.name().equalsIgnoreCase(name)) {
-                return roadClass;
-            }
         }
-        
-        return OTHER;
     }
 }


Test patch:
diff --git a/core/src/test/java/com/graphhopper/GraphHopperAPITest.java b/core/src/test/java/com/graphhopper/GraphHopperAPITest.java
index 108bc24cd..4900bff47 100644
--- a/core/src/test/java/com/graphhopper/GraphHopperAPITest.java
+++ b/core/src/test/java/com/graphhopper/GraphHopperAPITest.java
@@ -44,8 +44,6 @@ import static org.junit.Assert.*;
  * @author Peter Karich
  */
 public class GraphHopperAPITest {
-    final EncodingManager encodingManager = EncodingManager.create("car");
-
     void initGraph(GraphHopperStorage graph) {
         NodeAccess na = graph.getNodeAccess();
         na.setNode(0, 42, 10);
@@ -59,7 +57,9 @@ public class GraphHopperAPITest {
 
     @Test
     public void testLoad() {
-        GraphHopperStorage graph = new GraphBuilder(encodingManager).create();
+        final String vehicle = "car";
+        final String weighting = "fastest";
+        GraphHopperStorage graph = new GraphBuilder(EncodingManager.create(vehicle)).create();
         initGraph(graph);
         // do further changes:
         NodeAccess na = graph.getNodeAccess();
@@ -69,12 +69,12 @@ public class GraphHopperAPITest {
         graph.edge(0, 4, 40, true);
         graph.edge(4, 3, 40, true);
 
-        GraphHopper instance = createGraphHopper().
+        GraphHopper instance = createGraphHopper(vehicle).
                 setStoreOnFlush(false).
                 setCHEnabled(false).
                 loadGraph(graph);
         // 3 -> 0
-        GHResponse rsp = instance.route(new GHRequest(42, 10.4, 42, 10));
+        GHResponse rsp = instance.route(new GHRequest(42, 10.4, 42, 10).setVehicle(vehicle).setWeighting(weighting));
         assertFalse(rsp.hasErrors());
         PathWrapper arsp = rsp.getBest();
         assertEquals(80, arsp.getDistance(), 1e-6);
@@ -90,14 +90,16 @@ public class GraphHopperAPITest {
 
     @Test
     public void testDisconnected179() {
-        GraphHopperStorage graph = new GraphBuilder(encodingManager).create();
+        final String vehicle = "car";
+        final String weighting = "fastest";
+        GraphHopperStorage graph = new GraphBuilder(EncodingManager.create(vehicle)).create();
         initGraph(graph);
 
-        GraphHopper instance = createGraphHopper().
+        GraphHopper instance = createGraphHopper(vehicle).
                 setStoreOnFlush(false).
                 setCHEnabled(false).
                 loadGraph(graph);
-        GHResponse rsp = instance.route(new GHRequest(42, 10, 42, 10.4));
+        GHResponse rsp = instance.route(new GHRequest(42, 10, 42, 10.4).setVehicle(vehicle).setWeighting(weighting));
         assertTrue(rsp.hasErrors());
 
         try {
@@ -111,8 +113,10 @@ public class GraphHopperAPITest {
 
     @Test
     public void testDoNotInterpolateTwice1645() {
+        final String vehicle = "car";
         String loc = "./target/issue1645";
         Helper.removeDir(new File(loc));
+        EncodingManager encodingManager = EncodingManager.create(vehicle);
         GraphHopperStorage graph = GraphBuilder.start(encodingManager).setRAM(loc, true).set3D(true).create();
 
         // we need elevation
@@ -126,32 +130,38 @@ public class GraphHopperAPITest {
         graph.edge(2, 3, 10, true);
 
         final AtomicInteger counter = new AtomicInteger(0);
-        GraphHopper instance = createGraphHopper()
-                .setElevation(true).setGraphHopperLocation(loc).setCHEnabled(false)
+        GraphHopper instance = createGraphHopper(vehicle)
+                .setElevation(true)
+                .setGraphHopperLocation(loc)
+                .setCHEnabled(false)
                 .loadGraph(graph);
         instance.flush();
         instance.close();
         assertEquals(0, counter.get());
 
-        instance = setupGraphHopper(new GraphHopper() {
+        instance = new GraphHopper() {
             @Override
             void interpolateBridgesAndOrTunnels() {
                 counter.incrementAndGet();
                 super.interpolateBridgesAndOrTunnels();
             }
-        }).setElevation(true).setCHEnabled(false);
+        }
+                .setEncodingManager(encodingManager)
+                .setElevation(true).setCHEnabled(false);
         instance.load(loc);
         instance.flush();
         instance.close();
         assertEquals(1, counter.get());
 
-        instance = setupGraphHopper(new GraphHopper() {
+        instance = new GraphHopper() {
             @Override
             void interpolateBridgesAndOrTunnels() {
                 counter.incrementAndGet();
                 super.interpolateBridgesAndOrTunnels();
             }
-        }).setElevation(true).setCHEnabled(false);
+        }
+                .setEncodingManager(encodingManager)
+                .setElevation(true).setCHEnabled(false);
         instance.load(loc);
         instance.flush();
         instance.close();
@@ -162,19 +172,21 @@ public class GraphHopperAPITest {
 
     @Test
     public void testNoLoad() {
-        GraphHopper instance = createGraphHopper().
+        String vehicle = "car";
+        String weighting = "fastest";
+        GraphHopper instance = createGraphHopper(vehicle).
                 setStoreOnFlush(false).
                 setCHEnabled(false);
         try {
-            instance.route(new GHRequest(42, 10.4, 42, 10));
+            instance.route(new GHRequest(42, 10.4, 42, 10).setVehicle(vehicle).setWeighting(weighting));
             fail();
         } catch (Exception ex) {
             assertTrue(ex.getMessage(), ex.getMessage().startsWith("Do a successful call to load or importOrLoad before routing"));
         }
 
-        instance = createGraphHopper();
+        instance = createGraphHopper(vehicle);
         try {
-            instance.route(new GHRequest(42, 10.4, 42, 10));
+            instance.route(new GHRequest(42, 10.4, 42, 10).setVehicle(vehicle).setWeighting(weighting));
             fail();
         } catch (Exception ex) {
             assertTrue(ex.getMessage(), ex.getMessage().startsWith("Do a successful call to load or importOrLoad before routing"));
@@ -183,13 +195,16 @@ public class GraphHopperAPITest {
 
     @Test
     public void testConcurrentGraphChange() throws InterruptedException {
+        final String vehicle = "car";
+        final String weighting = "fastest";
+        EncodingManager encodingManager = EncodingManager.create(vehicle);
         final GraphHopperStorage graph = new GraphBuilder(encodingManager).create();
         initGraph(graph);
         graph.edge(1, 2, 10, true);
 
         final CountDownLatch latch = new CountDownLatch(1);
         final AtomicInteger checkPointCounter = new AtomicInteger(0);
-        final GraphHopper graphHopper = setupGraphHopper(new GraphHopper() {
+        final GraphHopper graphHopper = new GraphHopper() {
             @Override
             protected ChangeGraphHelper createChangeGraphHelper(Graph graph, LocationIndex locationIndex) {
                 return new ChangeGraphHelper(graph, locationIndex) {
@@ -207,10 +222,13 @@ public class GraphHopperAPITest {
                     }
                 };
             }
-        }).setStoreOnFlush(false).setCHEnabled(false).
-                loadGraph(graph);
+        }
+                .setEncodingManager(encodingManager)
+                .setStoreOnFlush(false).
+                        setCHEnabled(false).
+                        loadGraph(graph);
 
-        GHResponse rsp = graphHopper.route(new GHRequest(42, 10.4, 42, 10));
+        GHResponse rsp = graphHopper.route(new GHRequest(42, 10.4, 42, 10).setVehicle(vehicle).setWeighting(weighting));
         assertFalse(rsp.toString(), rsp.hasErrors());
         assertEquals(1800, rsp.getBest().getTime());
 
@@ -233,7 +251,7 @@ public class GraphHopperAPITest {
 
         latch.await();
         assertEquals(0, checkPointCounter.get());
-        rsp = graphHopper.route(new GHRequest(42, 10.4, 42, 10));
+        rsp = graphHopper.route(new GHRequest(42, 10.4, 42, 10).setVehicle(vehicle).setWeighting(weighting));
         assertFalse(rsp.toString(), rsp.hasErrors());
         assertEquals(8400, rsp.getBest().getTime());
 
@@ -243,12 +261,8 @@ public class GraphHopperAPITest {
         assertEquals(2, checkPointCounter.get());
     }
 
-    private GraphHopper createGraphHopper() {
-        return setupGraphHopper(new GraphHopper());
-    }
-
-    private GraphHopper setupGraphHopper(GraphHopper hopper) {
-        hopper.setEncodingManager(encodingManager);
-        return hopper;
+    private GraphHopper createGraphHopper(String vehicle) {
+        return new GraphHopper()
+                .setEncodingManager(EncodingManager.create(vehicle));
     }
 }
diff --git a/core/src/test/java/com/graphhopper/routing/profiles/EnumEncodedValueTest.java b/core/src/test/java/com/graphhopper/routing/profiles/EnumEncodedValueTest.java
index 678039209..6ae5fcc73 100644
--- a/core/src/test/java/com/graphhopper/routing/profiles/EnumEncodedValueTest.java
+++ b/core/src/test/java/com/graphhopper/routing/profiles/EnumEncodedValueTest.java
@@ -11,8 +11,8 @@ public class EnumEncodedValueTest {
     public void testInit() {
         EnumEncodedValue<RoadClass> prop = new EnumEncodedValue<>("road_class", RoadClass.class);
         EncodedValue.InitializerConfig init = new EncodedValue.InitializerConfig();
-        assertEquals(5, prop.init(init));
-        assertEquals(5, prop.bits);
+        assertEquals(4, prop.init(init));
+        assertEquals(4, prop.bits);
         assertEquals(0, init.dataIndex);
         assertEquals(0, init.shift);
         IntsRef ref = new IntsRef(1);
diff --git a/reader-osm/src/test/java/com/graphhopper/GraphHopperIT.java b/reader-osm/src/test/java/com/graphhopper/GraphHopperIT.java
index 2fdd0a235..9c2d626f9 100644
--- a/reader-osm/src/test/java/com/graphhopper/GraphHopperIT.java
+++ b/reader-osm/src/test/java/com/graphhopper/GraphHopperIT.java
@@ -34,7 +34,9 @@ import com.graphhopper.util.details.PathDetail;
 import com.graphhopper.util.exceptions.PointDistanceExceededException;
 import com.graphhopper.util.shapes.GHPoint;
 import com.graphhopper.util.shapes.GHPoint3D;
-import org.junit.*;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
 
 import java.io.File;
 import java.util.*;
@@ -51,46 +53,36 @@ import static org.junit.Assert.*;
 public class GraphHopperIT {
 
     public static final String DIR = "../core/files";
-    private static final String graphFileFoot = "target/graphhopperIT-foot";
-    private static final String osmFile = DIR + "/monaco.osm.gz";
-    private static final String importVehicles = "foot";
-    private static final String vehicle = "foot";
-    private static final String weightCalcStr = "shortest";
-    private static GraphHopper hopper;
-    private final String tmpGraphFile = "target/graphhopperIT-tmp";
-
-    @BeforeClass
-    public static void beforeClass() {
-        // make sure we are using fresh graphhopper files with correct vehicle
-        Helper.removeDir(new File(graphFileFoot));
-
-        hopper = createGraphHopper(importVehicles).
-                setOSMFile(osmFile).
-                setStoreOnFlush(true).
-                setCHEnabled(false).
-                setGraphHopperLocation(graphFileFoot).
-                importOrLoad();
-    }
 
-    @AfterClass
-    public static void afterClass() {
-        Helper.removeDir(new File(graphFileFoot));
-    }
+    // map locations
+    private static final String BAYREUTH = DIR + "/north-bayreuth.osm.gz";
+    private static final String BERLIN = DIR + "/berlin-siegessaeule.osm.gz";
+    private static final String KREMS = DIR + "/krems.osm.gz";
+    private static final String LAUF = DIR + "/Laufamholzstrasse.osm.xml";
+    private static final String MONACO = DIR + "/monaco.osm.gz";
+    private static final String MOSCOW = DIR + "/moscow.osm.gz";
 
-    @Before
-    public void setUp() {
-        Helper.removeDir(new File(tmpGraphFile));
-    }
+    // when creating GH instances make sure to use this as the GH location such that it will be cleaned between tests
+    private static final String GH_LOCATION = "target/graphhopper-it-gh";
 
+    @Before
     @After
-    public void tearDown() {
-        Helper.removeDir(new File(tmpGraphFile));
+    public void setup() {
+        Helper.removeDir(new File(GH_LOCATION));
     }
 
     @Test
     public void testMonacoWithInstructions() {
+        final String vehicle = "foot";
+        final String weighting = "shortest";
+        GraphHopper hopper = createGraphHopper(vehicle).
+                setOSMFile(MONACO).
+                setStoreOnFlush(true).
+                setCHEnabled(false).
+                importOrLoad();
+
         GHResponse rsp = hopper.route(new GHRequest(43.727687, 7.418737, 43.74958, 7.436566).
-                setAlgorithm(ASTAR).setVehicle(vehicle).setWeighting(weightCalcStr));
+                setAlgorithm(ASTAR).setVehicle(vehicle).setWeighting(weighting));
 
         // identify the number of counts to compare with CH foot route
         assertEquals(699, rsp.getHints().getLong("visited_nodes.sum", 0));
@@ -132,7 +124,15 @@ public class GraphHopperIT {
 
     @Test
     public void withoutInstructions() {
-        GHRequest request = new GHRequest().setAlgorithm(ASTAR).setVehicle(vehicle).setWeighting(weightCalcStr);
+        final String vehicle = "foot";
+        final String weighting = "shortest";
+        GraphHopper hopper = createGraphHopper(vehicle).
+                setOSMFile(MONACO).
+                setStoreOnFlush(true).
+                setCHEnabled(false).
+                importOrLoad();
+
+        GHRequest request = new GHRequest().setAlgorithm(ASTAR).setVehicle(vehicle).setWeighting(weighting);
         request.addPoint(new GHPoint(43.729584, 7.410965));
         request.addPoint(new GHPoint(43.732499, 7.426758));
         request.getHints().put("instructions", true);
@@ -148,11 +148,12 @@ public class GraphHopperIT {
 
     @Test
     public void testUTurn() {
-        GraphHopper tmpHopper = createGraphHopper("car").
-                setOSMFile(DIR + "/monaco.osm.gz").
-                setCHEnabled(false).
-                setGraphHopperLocation(tmpGraphFile);
-        tmpHopper.importOrLoad();
+        final String vehicle = "car";
+        final String weighting = "shortest";
+        GraphHopper hopper = createGraphHopper(vehicle).
+                setOSMFile(MONACO).
+                setCHEnabled(false);
+        hopper.importOrLoad();
         Translation tr = hopper.getTranslationMap().getWithFallBack(Locale.US);
 
         GHRequest request = new GHRequest();
@@ -160,8 +161,8 @@ public class GraphHopperIT {
         request.addPoint(new GHPoint(43.743887, 7.431151), 200);
         request.addPoint(new GHPoint(43.744007, 7.431076));
 
-        request.setAlgorithm(ASTAR).setVehicle("car").setWeighting(weightCalcStr);
-        GHResponse rsp = tmpHopper.route(request);
+        request.setAlgorithm(ASTAR).setVehicle(vehicle).setWeighting(weighting);
+        GHResponse rsp = hopper.route(request);
 
         assertFalse(rsp.hasErrors());
         PathWrapper arsp = rsp.getBest();
@@ -175,52 +176,48 @@ public class GraphHopperIT {
     }
 
     private void testImportCloseAndLoad(boolean ch, boolean lm, boolean sort) {
-
-        String tmpOsmFile = DIR + "/monaco.osm.gz";
-        String tmpImportVehicles = "foot";
-
-        GraphHopper tmpHopper = createGraphHopper(tmpImportVehicles).
-                setOSMFile(tmpOsmFile).
+        final String vehicle = "foot";
+        final String weighting = "shortest";
+        GraphHopper hopper = createGraphHopper(vehicle).
+                setOSMFile(MONACO).
                 setStoreOnFlush(true).
                 setCHEnabled(ch).
-                setSortGraph(sort).
-                setGraphHopperLocation(tmpGraphFile);
+                setSortGraph(sort);
         if (ch) {
-            tmpHopper.getCHPreparationHandler().setCHProfileStrings(weightCalcStr).setDisablingAllowed(true);
+            hopper.getCHPreparationHandler().setCHProfileStrings(weighting).setDisablingAllowed(true);
         }
         if (lm) {
-            tmpHopper.getLMPreparationHandler().
+            hopper.getLMPreparationHandler().
                     setEnabled(true).
-                    setLMProfileStrings(Collections.singletonList(weightCalcStr)).
+                    setLMProfileStrings(Collections.singletonList(weighting)).
                     setDisablingAllowed(true);
         }
-        tmpHopper.importAndClose();
-        tmpHopper = createGraphHopper(tmpImportVehicles).
-                setOSMFile(tmpOsmFile).
+        hopper.importAndClose();
+        hopper = createGraphHopper(vehicle).
+                setOSMFile(MONACO).
                 setStoreOnFlush(true).
-                setCHEnabled(ch).
-                setGraphHopperLocation(tmpGraphFile);
+                setCHEnabled(ch);
         if (ch) {
-            tmpHopper.getCHPreparationHandler().setCHProfileStrings(weightCalcStr).setDisablingAllowed(true);
+            hopper.getCHPreparationHandler().setCHProfileStrings(weighting).setDisablingAllowed(true);
         }
         if (lm) {
-            tmpHopper.getLMPreparationHandler().
+            hopper.getLMPreparationHandler().
                     setEnabled(true).
-                    setLMProfileStrings(Collections.singletonList(weightCalcStr)).
+                    setLMProfileStrings(Collections.singletonList(weighting)).
                     setDisablingAllowed(true);
         }
-        tmpHopper.importOrLoad();
+        hopper.importOrLoad();
 
         // same query as in testMonacoWithInstructions
         // visited nodes >700 for flexible, <120 for CH or LM
 
         if (ch) {
             GHRequest req = new GHRequest(43.727687, 7.418737, 43.74958, 7.436566).
-                    setWeighting(weightCalcStr).
-                    setVehicle(tmpImportVehicles);
+                    setWeighting(weighting).
+                    setVehicle(vehicle);
             req.getHints().put(CH.DISABLE, false);
             req.getHints().put(Landmark.DISABLE, true);
-            GHResponse rsp = tmpHopper.route(req);
+            GHResponse rsp = hopper.route(req);
 
             PathWrapper bestPath = rsp.getBest();
             long sum = rsp.getHints().getLong("visited_nodes.sum", 0);
@@ -232,12 +229,12 @@ public class GraphHopperIT {
 
         if (lm) {
             GHRequest req = new GHRequest(43.727687, 7.418737, 43.74958, 7.436566).
-                    setVehicle(tmpImportVehicles).
-                    setWeighting(weightCalcStr).
+                    setVehicle(vehicle).
+                    setWeighting(weighting).
                     setAlgorithm(Parameters.Algorithms.ASTAR_BI);
             req.getHints().put(CH.DISABLE, true);
             req.getHints().put(Landmark.DISABLE, false);
-            GHResponse rsp = tmpHopper.route(req);
+            GHResponse rsp = hopper.route(req);
 
             PathWrapper bestPath = rsp.getBest();
             long sum = rsp.getHints().getLong("visited_nodes.sum", 0);
@@ -249,11 +246,11 @@ public class GraphHopperIT {
 
         // flexible
         GHRequest req = new GHRequest(43.727687, 7.418737, 43.74958, 7.436566).
-                setVehicle(tmpImportVehicles).
-                setWeighting(weightCalcStr);
+                setVehicle(vehicle).
+                setWeighting(weighting);
         req.getHints().put(CH.DISABLE, true);
         req.getHints().put(Landmark.DISABLE, true);
-        GHResponse rsp = tmpHopper.route(req);
+        GHResponse rsp = hopper.route(req);
 
         PathWrapper bestPath = rsp.getBest();
         long sum = rsp.getHints().getLong("visited_nodes.sum", 0);
@@ -262,7 +259,7 @@ public class GraphHopperIT {
         assertEquals(3437.6, bestPath.getDistance(), .1);
         assertEquals(86, bestPath.getPoints().getSize());
 
-        tmpHopper.close();
+        hopper.close();
     }
 
     @Test
@@ -292,8 +289,16 @@ public class GraphHopperIT {
 
     @Test
     public void testAlternativeRoutes() {
+        final String vehicle = "foot";
+        final String weighting = "shortest";
+        GraphHopper hopper = createGraphHopper(vehicle).
+                setOSMFile(MONACO).
+                setStoreOnFlush(true).
+                setCHEnabled(false).
+                importOrLoad();
+
         GHRequest req = new GHRequest(43.729057, 7.41251, 43.740298, 7.423561).
-                setAlgorithm(ALT_ROUTE).setVehicle(vehicle).setWeighting(weightCalcStr);
+                setAlgorithm(ALT_ROUTE).setVehicle(vehicle).setWeighting(weighting);
 
         GHResponse rsp = hopper.route(req);
         assertFalse(rsp.hasErrors());
@@ -314,18 +319,19 @@ public class GraphHopperIT {
     }
 
     @Test
-    public void testAlternativeRoutesBikeAndCar() {
-        GraphHopper tmpHopper = new GraphHopperOSM().
-                setOSMFile(DIR + "/north-bayreuth.osm.gz").
-                setCHEnabled(false).
-                setGraphHopperLocation(tmpGraphFile).
-                setEncodingManager(EncodingManager.create("bike, car"));
-        tmpHopper.importOrLoad();
+    public void testAlternativeRoutesBike() {
+        final String vehicle = "bike";
+        final String weighting = "fastest";
+
+        GraphHopper hopper = createGraphHopper(vehicle).
+                setOSMFile(BAYREUTH).
+                setCHEnabled(false);
+        hopper.importOrLoad();
 
         GHRequest req = new GHRequest(50.028917, 11.496506, 49.985228, 11.600876).
-                setAlgorithm(ALT_ROUTE).setVehicle("bike").setWeighting("fastest");
+                setAlgorithm(ALT_ROUTE).setVehicle(vehicle).setWeighting(weighting);
         req.getHints().put("alternative_route.max_paths", "3");
-        GHResponse rsp = tmpHopper.route(req);
+        GHResponse rsp = hopper.route(req);
         assertFalse(rsp.getErrors().toString(), rsp.hasErrors());
 
         assertEquals(3, rsp.getAll().size());
@@ -335,11 +341,22 @@ public class GraphHopperIT {
         assertEquals(3318, rsp.getAll().get(1).getTime() / 1000);
         // via eselslohe -> theta; BTW: here smaller time as 2nd alternative due to priority influences time order
         assertEquals(3094, rsp.getAll().get(2).getTime() / 1000);
+    }
+
+    @Test
+    public void testAlternativeRoutesCar() {
+        final String vehicle = "car";
+        final String weighting = "fastest";
 
-        req = new GHRequest(50.023513, 11.548862, 49.969441, 11.537876).
-                setAlgorithm(ALT_ROUTE).setVehicle("car").setWeighting("fastest");
+        GraphHopper hopper = createGraphHopper(vehicle).
+                setOSMFile(BAYREUTH).
+                setCHEnabled(false);
+        hopper.importOrLoad();
+
+        GHRequest req = new GHRequest(50.023513, 11.548862, 49.969441, 11.537876).
+                setAlgorithm(ALT_ROUTE).setVehicle(vehicle).setWeighting(weighting);
         req.getHints().put("alternative_route.max_paths", "3");
-        rsp = tmpHopper.route(req);
+        GHResponse rsp = hopper.route(req);
         assertFalse(rsp.getErrors().toString(), rsp.hasErrors());
 
         assertEquals(3, rsp.getAll().size());
@@ -353,24 +370,26 @@ public class GraphHopperIT {
 
     @Test
     public void testPointHint() {
-        GraphHopper tmpHopper = createGraphHopper("car").
-                setOSMFile(DIR + "/Laufamholzstrasse.osm.xml").
-                setCHEnabled(false).
-                setGraphHopperLocation(tmpGraphFile);
-        tmpHopper.importOrLoad();
+        final String vehicle = "car";
+        final String weighting = "fastest";
+
+        GraphHopper hopper = createGraphHopper(vehicle).
+                setOSMFile(LAUF).
+                setCHEnabled(false);
+        hopper.importOrLoad();
 
         GHRequest req = new GHRequest(49.46553, 11.154669, 49.465244, 11.152577).
-                setVehicle("car").setWeighting("fastest");
+                setVehicle(vehicle).setWeighting(weighting);
 
         req.setPointHints(new ArrayList<>(asList("Laufamholzstraße, 90482, Nürnberg, Deutschland", "")));
-        GHResponse rsp = tmpHopper.route(req);
+        GHResponse rsp = hopper.route(req);
         assertFalse(rsp.getErrors().toString(), rsp.hasErrors());
         GHPoint snappedPoint = rsp.getBest().getWaypoints().get(0);
         assertEquals(49.465686, snappedPoint.getLat(), .000001);
         assertEquals(11.154605, snappedPoint.getLon(), .000001);
 
         req.setPointHints(new ArrayList<>(asList("", "")));
-        rsp = tmpHopper.route(req);
+        rsp = hopper.route(req);
         assertFalse(rsp.getErrors().toString(), rsp.hasErrors());
         snappedPoint = rsp.getBest().getWaypoints().get(0);
         assertEquals(49.465502, snappedPoint.getLat(), .000001);
@@ -378,7 +397,7 @@ public class GraphHopperIT {
 
         // Match to closest edge, since hint was not found
         req.setPointHints(new ArrayList<>(asList("xy", "")));
-        rsp = tmpHopper.route(req);
+        rsp = hopper.route(req);
         assertFalse(rsp.getErrors().toString(), rsp.hasErrors());
         snappedPoint = rsp.getBest().getWaypoints().get(0);
         assertEquals(49.465502, snappedPoint.getLat(), .000001);
@@ -387,120 +406,139 @@ public class GraphHopperIT {
 
     @Test
     public void testNorthBayreuthDestination() {
-        GraphHopper tmpHopper = createGraphHopper("car").
-                setOSMFile(DIR + "/north-bayreuth.osm.gz").
-                setCHEnabled(false).
-                setGraphHopperLocation(tmpGraphFile);
-        tmpHopper.importOrLoad();
+        final String vehicle = "car";
+        final String weighting = "fastest";
+
+        GraphHopper hopper = createGraphHopper(vehicle).
+                setOSMFile(BAYREUTH).
+                setCHEnabled(false);
+        hopper.importOrLoad();
 
         GHRequest req = new GHRequest(49.985307, 11.50628, 49.985731, 11.507465).
-                setVehicle("car").setWeighting("fastest");
+                setVehicle(vehicle).setWeighting(weighting);
 
-        GHResponse rsp = tmpHopper.route(req);
+        GHResponse rsp = hopper.route(req);
         assertFalse(rsp.getErrors().toString(), rsp.hasErrors());
         assertEquals(550, rsp.getBest().getDistance(), 1);
     }
 
     @Test
     public void testNorthBayreuthBlockedEdges() {
-        GraphHopper tmpHopper = createGraphHopper("car").
-                setOSMFile(DIR + "/north-bayreuth.osm.gz").
-                setCHEnabled(false).
-                setGraphHopperLocation(tmpGraphFile);
-        tmpHopper.importOrLoad();
+        final String vehicle = "car";
+        final String weighting = "fastest";
 
-        GHRequest req = new GHRequest(49.985272, 11.506151, 49.986107, 11.507202);
+        GraphHopper hopper = createGraphHopper(vehicle).
+                setOSMFile(BAYREUTH).
+                setCHEnabled(false);
+        hopper.importOrLoad();
 
-        GHResponse rsp = tmpHopper.route(req);
+        GHRequest req = new GHRequest(49.985272, 11.506151, 49.986107, 11.507202).
+                setVehicle(vehicle).
+                setWeighting(weighting);
+
+        GHResponse rsp = hopper.route(req);
         assertFalse(rsp.getErrors().toString(), rsp.hasErrors());
         assertEquals(122, rsp.getBest().getDistance(), 1);
 
         // block point 49.985759,11.50687
         req.getHints().put(Routing.BLOCK_AREA, "49.985759,11.50687");
-        rsp = tmpHopper.route(req);
+        rsp = hopper.route(req);
         assertFalse(rsp.getErrors().toString(), rsp.hasErrors());
         assertEquals(365, rsp.getBest().getDistance(), 1);
 
         req = new GHRequest(49.975845, 11.522598, 50.026821, 11.497364).
-                setWeighting("fastest");
+                setVehicle(vehicle).
+                setWeighting(weighting);
 
-        rsp = tmpHopper.route(req);
+        rsp = hopper.route(req);
         assertFalse(rsp.getErrors().toString(), rsp.hasErrors());
         assertEquals(6685, rsp.getBest().getDistance(), 1);
 
         // block by area
         String someArea = "49.97986,11.472902,50.003946,11.534357";
         req.getHints().put(Routing.BLOCK_AREA, someArea);
-        rsp = tmpHopper.route(req);
+        rsp = hopper.route(req);
         assertFalse(rsp.getErrors().toString(), rsp.hasErrors());
         assertEquals(13988, rsp.getBest().getDistance(), 1);
 
         // Add blocked point to above area, to increase detour        
         req.getHints().put(Routing.BLOCK_AREA, "50.017578,11.547527;" + someArea);
-        rsp = tmpHopper.route(req);
+        rsp = hopper.route(req);
         assertFalse(rsp.getErrors().toString(), rsp.hasErrors());
         assertEquals(14602, rsp.getBest().getDistance(), 1);
 
         // block by edge IDs -> i.e. use small circular area
         req.getHints().put(Routing.BLOCK_AREA, "49.979929,11.520066,200");
-        rsp = tmpHopper.route(req);
+        rsp = hopper.route(req);
         assertFalse(rsp.getErrors().toString(), rsp.hasErrors());
         assertEquals(12173, rsp.getBest().getDistance(), 1);
 
         // TODO after #1324 this will work and should block both roads and return 12173m, currently it still routes
         //  through one of the roads due to "disconnected" roads
         req.getHints().put(Routing.BLOCK_AREA, "49.981502,11.51762,80");
-        rsp = tmpHopper.route(req);
+        rsp = hopper.route(req);
         assertFalse(rsp.getErrors().toString(), rsp.hasErrors());
         assertEquals(7383, rsp.getBest().getDistance(), 1);
 
         // block by edge IDs -> i.e. use small rectangular area
         req.getHints().put(Routing.BLOCK_AREA, "49.981875,11.515818,49.979522,11.521407");
-        rsp = tmpHopper.route(req);
+        rsp = hopper.route(req);
         assertFalse(rsp.getErrors().toString(), rsp.hasErrors());
         assertEquals(12173, rsp.getBest().getDistance(), 1);
 
         // blocking works for all weightings
         req = new GHRequest(50.009504, 11.490669, 50.024726, 11.496162).
-                setVehicle("car").setWeighting("fastest");
-        rsp = tmpHopper.route(req);
+                setVehicle(vehicle).setWeighting(weighting);
+        rsp = hopper.route(req);
         assertFalse(rsp.getErrors().toString(), rsp.hasErrors());
         assertEquals(1807, rsp.getBest().getDistance(), 1);
 
         // block point 49.985759,11.50687
         req.getHints().put(Routing.BLOCK_AREA, "50.018274,11.492558");
-        rsp = tmpHopper.route(req);
+        rsp = hopper.route(req);
         assertFalse(rsp.getErrors().toString(), rsp.hasErrors());
         assertEquals(3363, rsp.getBest().getDistance(), 1);
 
         // query point and snapped point are different => block snapped point only => show that block_area changes lookup
-        req = new GHRequest(49.984465, 11.507009, 49.986107, 11.507202);
-        rsp = tmpHopper.route(req);
+        req = new GHRequest(49.984465, 11.507009, 49.986107, 11.507202).
+                setVehicle(vehicle).
+                setWeighting(weighting);
+        rsp = hopper.route(req);
         assertEquals(11.506, rsp.getBest().getWaypoints().getLongitude(0), 0.001);
         assertFalse(rsp.getErrors().toString(), rsp.hasErrors());
         assertEquals(155, rsp.getBest().getDistance(), 10);
 
         req.getHints().put(Routing.BLOCK_AREA, "49.984434,11.505212,49.985394,11.506333");
-        rsp = tmpHopper.route(req);
+        rsp = hopper.route(req);
         assertEquals(11.508, rsp.getBest().getWaypoints().getLongitude(0), 0.001);
         assertFalse(rsp.getErrors().toString(), rsp.hasErrors());
         assertEquals(1185, rsp.getBest().getDistance(), 10);
 
         // first point is contained in block_area => error
-        req = new GHRequest(49.979, 11.516, 49.986107, 11.507202);
+        req = new GHRequest(49.979, 11.516, 49.986107, 11.507202).
+                setVehicle(vehicle).
+                setWeighting(weighting);
         req.getHints().put(Routing.BLOCK_AREA, "49.981875,11.515818,49.979522,11.521407");
-        rsp = tmpHopper.route(req);
+        rsp = hopper.route(req);
         assertTrue("expected errors", rsp.hasErrors());
     }
 
     @Test
     public void testMonacoVia() {
+        final String vehicle = "foot";
+        final String weighting = "shortest";
+        GraphHopper hopper = createGraphHopper(vehicle).
+                setOSMFile(MONACO).
+                setStoreOnFlush(true).
+                setCHEnabled(false).
+                importOrLoad();
+
         Translation tr = hopper.getTranslationMap().getWithFallBack(Locale.US);
         GHResponse rsp = hopper.route(new GHRequest().
                 addPoint(new GHPoint(43.727687, 7.418737)).
                 addPoint(new GHPoint(43.74958, 7.436566)).
                 addPoint(new GHPoint(43.727687, 7.418737)).
-                setAlgorithm(ASTAR).setVehicle(vehicle).setWeighting(weightCalcStr));
+                setAlgorithm(ASTAR).setVehicle(vehicle).setWeighting(weighting));
 
         PathWrapper arsp = rsp.getBest();
         assertEquals(6875.2, arsp.getDistance(), .1);
@@ -542,7 +580,7 @@ public class GraphHopperIT {
         rsp = hopper.route(new GHRequest().
                 addPoint(new GHPoint(43.727687, 7.418737)).
                 addPoint(new GHPoint(43.727687, 7.418737)).
-                setAlgorithm(ASTAR).setVehicle(vehicle).setWeighting(weightCalcStr));
+                setAlgorithm(ASTAR).setVehicle(vehicle).setWeighting(weighting));
 
         arsp = rsp.getBest();
         assertEquals(0, arsp.getDistance(), .1);
@@ -556,7 +594,7 @@ public class GraphHopperIT {
                 addPoint(new GHPoint(43.727687, 7.418737)).
                 addPoint(new GHPoint(43.727687, 7.418737)).
                 addPoint(new GHPoint(43.727687, 7.418737)).
-                setAlgorithm(ASTAR).setVehicle(vehicle).setWeighting(weightCalcStr));
+                setAlgorithm(ASTAR).setVehicle(vehicle).setWeighting(weighting));
 
         arsp = rsp.getBest();
         assertEquals(0, arsp.getDistance(), .1);
@@ -569,11 +607,19 @@ public class GraphHopperIT {
 
     @Test
     public void testMonacoPathDetails() {
+        final String vehicle = "foot";
+        final String weighting = "shortest";
+        GraphHopper hopper = createGraphHopper(vehicle).
+                setOSMFile(MONACO).
+                setStoreOnFlush(true).
+                setCHEnabled(false).
+                importOrLoad();
+
         GHRequest request = new GHRequest();
         request.addPoint(new GHPoint(43.727687, 7.418737));
         request.addPoint(new GHPoint(43.74958, 7.436566));
         request.addPoint(new GHPoint(43.727687, 7.418737));
-        request.setAlgorithm(ASTAR).setVehicle(vehicle).setWeighting(weightCalcStr);
+        request.setAlgorithm(ASTAR).setVehicle(vehicle).setWeighting(weighting);
         request.setPathDetails(Collections.singletonList(Parameters.Details.AVERAGE_SPEED));
 
         GHResponse rsp = hopper.route(request);
@@ -591,10 +637,18 @@ public class GraphHopperIT {
 
     @Test
     public void testMonacoEnforcedDirection() {
+        final String vehicle = "foot";
+        final String weighting = "fastest";
+        GraphHopper hopper = createGraphHopper(vehicle).
+                setOSMFile(MONACO).
+                setStoreOnFlush(true).
+                setCHEnabled(false).
+                importOrLoad();
+
         GHRequest req = new GHRequest().
                 addPoint(new GHPoint(43.741069, 7.426854), 0.).
                 addPoint(new GHPoint(43.744445, 7.429483), 190.).
-                setVehicle(vehicle).setWeighting("fastest");
+                setVehicle(vehicle).setWeighting(weighting);
         req.getHints().put(Routing.HEADING_PENALTY, "300");
         GHResponse rsp = hopper.route(req);
 
@@ -605,35 +659,51 @@ public class GraphHopperIT {
 
     @Test
     public void testMonacoMaxVisitedNodes() {
+        final String vehicle = "foot";
+        final String weighting = "fastest";
+        GraphHopper hopper = createGraphHopper(vehicle).
+                setOSMFile(MONACO).
+                setStoreOnFlush(true).
+                setCHEnabled(false).
+                importOrLoad();
+
         GHPoint from = new GHPoint(43.741069, 7.426854);
         GHPoint to = new GHPoint(43.744445, 7.429483);
         GHRequest req = new GHRequest().
                 addPoint(from).
                 addPoint(to).
-                setVehicle(vehicle).setWeighting("fastest");
+                setVehicle(vehicle).setWeighting(weighting);
         req.getHints().put(Routing.MAX_VISITED_NODES, 5);
         GHResponse rsp = hopper.route(req);
 
-        assertTrue(rsp.hasErrors());
+        assertTrue(rsp.getErrors().toString(), rsp.hasErrors());
 
         req = new GHRequest().
                 addPoint(from).
                 addPoint(to).
-                setVehicle(vehicle).setWeighting("fastest");
+                setVehicle(vehicle).setWeighting(weighting);
         rsp = hopper.route(req);
 
-        assertFalse(rsp.hasErrors());
+        assertFalse(rsp.getErrors().toString(), rsp.hasErrors());
     }
 
     @Test
     public void testMonacoNonChMaxWaypointDistance() {
+        final String vehicle = "foot";
+        final String weighting = "fastest";
+        GraphHopper hopper = createGraphHopper(vehicle).
+                setOSMFile(MONACO).
+                setStoreOnFlush(true).
+                setCHEnabled(false).
+                importOrLoad();
+
         GHPoint from = new GHPoint(43.741069, 7.426854);
         GHPoint to = new GHPoint(43.727697, 7.419199);
 
         GHRequest req = new GHRequest().
                 addPoint(from).
                 addPoint(to).
-                setVehicle(vehicle).setWeighting("fastest");
+                setVehicle(vehicle).setWeighting(weighting);
 
         // Fail since points are too far
         hopper.setNonChMaxWaypointDistance(1000);
@@ -645,11 +715,19 @@ public class GraphHopperIT {
         hopper.setNonChMaxWaypointDistance(Integer.MAX_VALUE);
         rsp = hopper.route(req);
 
-        assertFalse(rsp.hasErrors());
+        assertFalse(rsp.getErrors().toString(), rsp.hasErrors());
     }
 
     @Test
     public void testMonacoNonChMaxWaypointDistanceMultiplePoints() {
+        final String vehicle = "foot";
+        final String weighting = "fastest";
+        GraphHopper hopper = createGraphHopper(vehicle).
+                setOSMFile(MONACO).
+                setStoreOnFlush(true).
+                setCHEnabled(false).
+                importOrLoad();
+
         GHPoint from = new GHPoint(43.741069, 7.426854);
         GHPoint via = new GHPoint(43.744445, 7.429483);
         GHPoint to = new GHPoint(43.727697, 7.419199);
@@ -658,7 +736,7 @@ public class GraphHopperIT {
                 addPoint(from).
                 addPoint(via).
                 addPoint(to).
-                setVehicle(vehicle).setWeighting("fastest");
+                setVehicle(vehicle).setWeighting(weighting);
 
         // Fail since points are too far
         hopper.setNonChMaxWaypointDistance(1000);
@@ -672,16 +750,24 @@ public class GraphHopperIT {
         hopper.setNonChMaxWaypointDistance(Integer.MAX_VALUE);
         rsp = hopper.route(req);
 
-        assertFalse(rsp.hasErrors());
+        assertFalse(rsp.getErrors().toString(), rsp.hasErrors());
     }
 
     @Test
     public void testMonacoStraightVia() {
+        final String vehicle = "foot";
+        final String weighting = "fastest";
+        GraphHopper hopper = createGraphHopper(vehicle).
+                setOSMFile(MONACO).
+                setStoreOnFlush(true).
+                setCHEnabled(false).
+                importOrLoad();
+
         GHRequest rq = new GHRequest().
                 addPoint(new GHPoint(43.741069, 7.426854)).
                 addPoint(new GHPoint(43.740371, 7.426946)).
                 addPoint(new GHPoint(43.740794, 7.427294)).
-                setVehicle(vehicle).setWeighting("fastest");
+                setVehicle(vehicle).setWeighting(weighting);
         rq.getHints().put(Routing.PASS_THROUGH, true);
         GHResponse rsp = hopper.route(rq);
 
@@ -694,7 +780,7 @@ public class GraphHopperIT {
                 addPoint(new GHPoint(43.741069, 7.426854)).
                 addPoint(new GHPoint(43.741069, 7.426854)).
                 addPoint(new GHPoint(43.740371, 7.426946)).
-                setVehicle(vehicle).setWeighting("fastest");
+                setVehicle(vehicle).setWeighting(weighting);
         rq.getHints().put(Routing.PASS_THROUGH, true);
         rsp = hopper.route(rq);
         assertEquals(91, rsp.getBest().getDistance(), 5.);
@@ -702,17 +788,19 @@ public class GraphHopperIT {
 
     @Test
     public void testSRTMWithInstructions() {
-        GraphHopper tmpHopper = createGraphHopper(importVehicles).
-                setOSMFile(osmFile).
+        final String vehicle = "foot";
+        final String weighting = "shortest";
+
+        GraphHopper hopper = createGraphHopper(vehicle).
+                setOSMFile(MONACO).
                 setStoreOnFlush(true).
-                setCHEnabled(false).
-                setGraphHopperLocation(tmpGraphFile);
+                setCHEnabled(false);
 
-        tmpHopper.setElevationProvider(new SRTMProvider(DIR));
-        tmpHopper.importOrLoad();
+        hopper.setElevationProvider(new SRTMProvider(DIR));
+        hopper.importOrLoad();
 
-        GHResponse rsp = tmpHopper.route(new GHRequest(43.730729, 7.421288, 43.727697, 7.419199).
-                setAlgorithm(ASTAR).setVehicle(vehicle).setWeighting(weightCalcStr));
+        GHResponse rsp = hopper.route(new GHRequest(43.730729, 7.421288, 43.727697, 7.419199).
+                setAlgorithm(ASTAR).setVehicle(vehicle).setWeighting(weighting));
 
         PathWrapper arsp = rsp.getBest();
         assertEquals(1625.4, arsp.getDistance(), .1);
@@ -752,22 +840,28 @@ public class GraphHopperIT {
 
     @Test
     public void testSRTMWithoutTunnelInterpolation() {
-        GraphHopper tmpHopper = new GraphHopperOSM().setOSMFile(osmFile).setStoreOnFlush(true)
-                .setCHEnabled(false).setGraphHopperLocation(tmpGraphFile)
+        final String vehicle = "foot";
+        final String weighting = "shortest";
+
+        GraphHopper hopper = new GraphHopperOSM()
+                .setOSMFile(MONACO)
+                .setStoreOnFlush(true)
+                .setCHEnabled(false)
+                .setGraphHopperLocation(GH_LOCATION)
                 .setEncodingManager(EncodingManager.start().add(new OSMRoadEnvironmentParser() {
                     @Override
                     public IntsRef handleWayTags(IntsRef edgeFlags, ReaderWay readerWay, boolean ferry, IntsRef relationFlags) {
                         // do not change RoadEnvironment to avoid triggering tunnel interpolation - is this a valid use case after #TODONOW?
                         return edgeFlags;
                     }
-                }).addAll(new DefaultFlagEncoderFactory(), importVehicles).build());
+                }).addAll(new DefaultFlagEncoderFactory(), vehicle).build());
 
-        tmpHopper.setElevationProvider(new SRTMProvider(DIR));
-        tmpHopper.importOrLoad();
+        hopper.setElevationProvider(new SRTMProvider(DIR));
+        hopper.importOrLoad();
 
-        GHResponse rsp = tmpHopper.route(new GHRequest(43.74056471749763, 7.4299266210693755,
+        GHResponse rsp = hopper.route(new GHRequest(43.74056471749763, 7.4299266210693755,
                 43.73790260334179, 7.427984089259056).setAlgorithm(ASTAR)
-                .setVehicle(vehicle).setWeighting(weightCalcStr));
+                .setVehicle(vehicle).setWeighting(weighting));
         PathWrapper arsp = rsp.getBest();
         assertEquals(356.5, arsp.getDistance(), .1);
         PointList pointList = arsp.getPoints();
@@ -784,16 +878,20 @@ public class GraphHopperIT {
 
     @Test
     public void testSRTMWithTunnelInterpolation() {
-        GraphHopper tmpHopper = createGraphHopper("car,foot")
-                .setOSMFile(osmFile).setStoreOnFlush(true)
-                .setCHEnabled(false).setGraphHopperLocation(tmpGraphFile);
+        final String vehicle = "foot";
+        final String weighting = "shortest";
 
-        tmpHopper.setElevationProvider(new SRTMProvider(DIR));
-        tmpHopper.importOrLoad();
+        GraphHopper hopper = createGraphHopper("car,foot")
+                .setOSMFile(MONACO)
+                .setStoreOnFlush(true)
+                .setCHEnabled(false);
 
-        GHResponse rsp = tmpHopper.route(new GHRequest(43.74056471749763, 7.4299266210693755,
+        hopper.setElevationProvider(new SRTMProvider(DIR));
+        hopper.importOrLoad();
+
+        GHResponse rsp = hopper.route(new GHRequest(43.74056471749763, 7.4299266210693755,
                 43.73790260334179, 7.427984089259056).setAlgorithm(ASTAR)
-                .setVehicle(vehicle).setWeighting(weightCalcStr));
+                .setVehicle(vehicle).setWeighting(weighting));
         PathWrapper arsp = rsp.getBest();
         // Without interpolation: 356.5
         assertEquals(351, arsp.getDistance(), .1);
@@ -811,21 +909,19 @@ public class GraphHopperIT {
 
     @Test
     public void testKremsCyclewayInstructionsWithWayTypeInfo() {
-        String tmpOsmFile = DIR + "/krems.osm.gz";
-        String tmpVehicle = "bike";
-        String tmpImportVehicles = "foot,bike";
-        String tmpWeightCalcStr = "fastest";
+        final String vehicle1 = "foot";
+        final String vehicle2 = "bike";
+        final String weighting = "fastest";
 
-        GraphHopper tmpHopper = createGraphHopper(tmpImportVehicles).
-                setOSMFile(tmpOsmFile).
+        GraphHopper hopper = createGraphHopper(vehicle1 + "," + vehicle2).
+                setOSMFile(KREMS).
                 setStoreOnFlush(true).
                 setCHEnabled(false).
-                setGraphHopperLocation(tmpGraphFile).
                 importOrLoad();
 
-        Translation tr = tmpHopper.getTranslationMap().getWithFallBack(Locale.US);
-        GHResponse rsp = tmpHopper.route(new GHRequest(48.410987, 15.599492, 48.383419, 15.659294).
-                setVehicle(tmpVehicle).setWeighting(tmpWeightCalcStr));
+        Translation tr = hopper.getTranslationMap().getWithFallBack(Locale.US);
+        GHResponse rsp = hopper.route(new GHRequest(48.410987, 15.599492, 48.383419, 15.659294).
+                setVehicle(vehicle2).setWeighting(weighting));
         assertFalse(rsp.hasErrors());
         PathWrapper arsp = rsp.getBest();
         assertEquals(6932.2, arsp.getDistance(), .1);
@@ -853,8 +949,8 @@ public class GraphHopperIT {
         assertEquals("cycleway", il.get(18).getAnnotation().getMessage());
 
         // do not return 'get off bike' for foot
-        rsp = tmpHopper.route(new GHRequest(48.410987, 15.599492, 48.411172, 15.600371).
-                setAlgorithm(ASTAR).setVehicle("foot").setWeighting(tmpWeightCalcStr));
+        rsp = hopper.route(new GHRequest(48.410987, 15.599492, 48.411172, 15.600371).
+                setAlgorithm(ASTAR).setVehicle(vehicle1).setWeighting(weighting));
         assertFalse(rsp.hasErrors());
         il = rsp.getBest().getInstructions();
         assertEquals("continue onto Obere Landstraße", il.get(0).getTurnDescription(tr));
@@ -863,62 +959,58 @@ public class GraphHopperIT {
 
     @Test
     public void testRoundaboutInstructionsWithCH() {
-        String tmpOsmFile = DIR + "/monaco.osm.gz";
-        String tmpVehicle = "car";
-        String tmpImportVehicles = "car,bike";
-        String tmpWeightCalcStr = "fastest";
+        final String vehicle = "car";
+        final String weighting = "fastest";
 
-        GraphHopper tmpHopper = createGraphHopper(tmpImportVehicles).
-                setOSMFile(tmpOsmFile).
-                setStoreOnFlush(true).
-                setGraphHopperLocation(tmpGraphFile).
-                importOrLoad();
+        GraphHopper hopper = createGraphHopper(vehicle + ",bike").
+                setOSMFile(MONACO).
+                setStoreOnFlush(true);
+        hopper.getCHPreparationHandler().setCHProfileStrings(weighting);
+        hopper.importOrLoad();
 
-        assertEquals(tmpVehicle, tmpHopper.getDefaultVehicle().toString());
+        assertEquals(vehicle, hopper.getDefaultVehicle().toString());
 
-        assertEquals(2, tmpHopper.getCHPreparationHandler().getPreparations().size());
+        assertEquals(2, hopper.getCHPreparationHandler().getPreparations().size());
 
-        GHResponse rsp = tmpHopper.route(new GHRequest(43.745084, 7.430513, 43.745247, 7.430347)
-                .setVehicle(tmpVehicle).setWeighting(tmpWeightCalcStr));
+        GHResponse rsp = hopper.route(new GHRequest(43.745084, 7.430513, 43.745247, 7.430347)
+                .setVehicle(vehicle).setWeighting(weighting));
 
         PathWrapper arsp = rsp.getBest();
         assertEquals(2, ((RoundaboutInstruction) arsp.getInstructions().get(1)).getExitNumber());
 
-        rsp = tmpHopper.route(new GHRequest(43.745968, 7.42907, 43.745832, 7.428614)
-                .setVehicle(tmpVehicle).setWeighting(tmpWeightCalcStr));
+        rsp = hopper.route(new GHRequest(43.745968, 7.42907, 43.745832, 7.428614)
+                .setVehicle(vehicle).setWeighting(weighting));
         arsp = rsp.getBest();
         assertEquals(2, ((RoundaboutInstruction) arsp.getInstructions().get(1)).getExitNumber());
 
-        rsp = tmpHopper.route(new GHRequest(43.745948, 7.42914, 43.746173, 7.428834)
-                .setVehicle(tmpVehicle).setWeighting(tmpWeightCalcStr));
+        rsp = hopper.route(new GHRequest(43.745948, 7.42914, 43.746173, 7.428834)
+                .setVehicle(vehicle).setWeighting(weighting));
         arsp = rsp.getBest();
         assertEquals(1, ((RoundaboutInstruction) arsp.getInstructions().get(1)).getExitNumber());
 
-        rsp = tmpHopper.route(new GHRequest(43.735817, 7.417096, 43.735666, 7.416587)
-                .setVehicle(tmpVehicle).setWeighting(tmpWeightCalcStr));
+        rsp = hopper.route(new GHRequest(43.735817, 7.417096, 43.735666, 7.416587)
+                .setVehicle(vehicle).setWeighting(weighting));
         arsp = rsp.getBest();
         assertEquals(2, ((RoundaboutInstruction) arsp.getInstructions().get(1)).getExitNumber());
     }
 
     @Test
     public void testCircularJunctionInstructionsWithCH() {
-        String tmpOsmFile = DIR + "/berlin-siegessaeule.osm.gz";
-        String tmpVehicle = "car";
-        String tmpImportVehicles = "car,bike";
-        String tmpWeightCalcStr = "fastest";
+        String vehicle = "car";
+        String weighting = "fastest";
 
-        GraphHopper tmpHopper = createGraphHopper(tmpImportVehicles).
-                setOSMFile(tmpOsmFile).
-                setStoreOnFlush(true).
-                setGraphHopperLocation(tmpGraphFile).
-                importOrLoad();
+        GraphHopper hopper = createGraphHopper(vehicle + ",bike").
+                setOSMFile(BERLIN).
+                setStoreOnFlush(true);
+        hopper.getCHPreparationHandler().setCHProfileStrings(weighting);
+        hopper.importOrLoad();
 
-        assertEquals(tmpVehicle, tmpHopper.getDefaultVehicle().toString());
+        assertEquals(vehicle, hopper.getDefaultVehicle().toString());
 
-        assertEquals(2, tmpHopper.getCHPreparationHandler().getPreparations().size());
+        assertEquals(2, hopper.getCHPreparationHandler().getPreparations().size());
 
-        GHResponse rsp = tmpHopper.route(new GHRequest(52.513505, 13.350443, 52.513505, 13.350245)
-                .setVehicle(tmpVehicle).setWeighting(tmpWeightCalcStr));
+        GHResponse rsp = hopper.route(new GHRequest(52.513505, 13.350443, 52.513505, 13.350245)
+                .setVehicle(vehicle).setWeighting(weighting));
 
         Instruction instr = rsp.getBest().getInstructions().get(1);
         assertTrue(instr instanceof RoundaboutInstruction);
@@ -928,46 +1020,51 @@ public class GraphHopperIT {
 
     @Test
     public void testMultipleVehiclesWithCH() {
-        String tmpOsmFile = DIR + "/monaco.osm.gz";
-        GraphHopper tmpHopper = createGraphHopper("bike,car").
-                setOSMFile(tmpOsmFile).
-                setStoreOnFlush(true).
-                setGraphHopperLocation(tmpGraphFile).
-                importOrLoad();
-        assertEquals("bike", tmpHopper.getDefaultVehicle().toString());
-        checkMultiVehiclesWithCH(tmpHopper);
-        tmpHopper.close();
+        final String vehicle1 = "bike";
+        final String vehicle2 = "car";
+        final String weighting = "fastest";
+        GraphHopper hopper = createGraphHopper(vehicle1 + "," + vehicle2).
+                setOSMFile(MONACO).
+                setStoreOnFlush(true);
+        hopper.getCHPreparationHandler().setCHProfileStrings(weighting);
+        hopper.importOrLoad();
+        assertEquals(vehicle1, hopper.getDefaultVehicle().toString());
+        checkMultiVehiclesWithCH(hopper);
+        hopper.close();
 
-        tmpHopper.clean();
+        hopper.clean();
         // new instance, try different order, resulting only in different default vehicle
-        tmpHopper = createGraphHopper("car,bike").
-                setOSMFile(tmpOsmFile).
-                setStoreOnFlush(true).
-                setGraphHopperLocation(tmpGraphFile).
-                importOrLoad();
-        assertEquals("car", tmpHopper.getDefaultVehicle().toString());
-        checkMultiVehiclesWithCH(tmpHopper);
-        tmpHopper.close();
+        hopper = createGraphHopper(vehicle2 + ", " + vehicle1).
+                setOSMFile(MONACO).
+                setStoreOnFlush(true);
+        hopper.getCHPreparationHandler().setCHProfileStrings(weighting);
+        hopper.importOrLoad();
+        assertEquals(vehicle2, hopper.getDefaultVehicle().toString());
+        checkMultiVehiclesWithCH(hopper);
+        hopper.close();
     }
 
-    private void checkMultiVehiclesWithCH(GraphHopper tmpHopper) {
-        String str = tmpHopper.getEncodingManager().toString();
-        GHResponse rsp = tmpHopper.route(new GHRequest(43.73005, 7.415707, 43.741522, 7.42826)
-                .setVehicle("car"));
+    private void checkMultiVehiclesWithCH(GraphHopper hopper) {
+        String str = hopper.getEncodingManager().toString();
+        GHResponse rsp = hopper.route(new GHRequest(43.73005, 7.415707, 43.741522, 7.42826)
+                .setVehicle("car")
+                .setWeighting("fastest"));
         PathWrapper arsp = rsp.getBest();
         assertFalse("car routing for " + str + " should not have errors:" + rsp.getErrors(), rsp.hasErrors());
         assertEquals(207, arsp.getTime() / 1000f, 1);
         assertEquals(2838, arsp.getDistance(), 1);
 
-        rsp = tmpHopper.route(new GHRequest(43.73005, 7.415707, 43.741522, 7.42826)
-                .setVehicle("bike"));
+        rsp = hopper.route(new GHRequest(43.73005, 7.415707, 43.741522, 7.42826)
+                .setVehicle("bike")
+                .setWeighting("fastest"));
         arsp = rsp.getBest();
         assertFalse("bike routing for " + str + " should not have errors:" + rsp.getErrors(), rsp.hasErrors());
         assertEquals(494, arsp.getTime() / 1000f, 1);
         assertEquals(2192, arsp.getDistance(), 1);
 
-        rsp = tmpHopper.route(new GHRequest(43.73005, 7.415707, 43.741522, 7.42826)
-                .setVehicle("foot"));
+        rsp = hopper.route(new GHRequest(43.73005, 7.415707, 43.741522, 7.42826)
+                .setVehicle("foot")
+                .setWeighting("fastest"));
         assertTrue("only bike and car were imported. foot request should fail", rsp.hasErrors());
 
         GHRequest req = new GHRequest().
@@ -989,19 +1086,18 @@ public class GraphHopperIT {
     }
 
     private void executeCHFootRoute(boolean sort) {
-        String tmpOsmFile = DIR + "/monaco.osm.gz";
-
-        GraphHopper tmpHopper = createGraphHopper("foot").
-                setOSMFile(tmpOsmFile).
+        final String vehicle = "foot";
+        final String weighting = "shortest";
+        GraphHopper hopper = createGraphHopper(vehicle).
+                setOSMFile(MONACO).
                 setStoreOnFlush(true).
-                setSortGraph(sort).
-                setGraphHopperLocation(tmpGraphFile);
-        tmpHopper.getCHPreparationHandler().setCHProfileStrings(weightCalcStr);
-        tmpHopper.importOrLoad();
+                setSortGraph(sort);
+        hopper.getCHPreparationHandler().setCHProfileStrings(weighting);
+        hopper.importOrLoad();
 
         // same query as in testMonacoWithInstructions
-        GHResponse rsp = tmpHopper.route(new GHRequest(43.727687, 7.418737, 43.74958, 7.436566).
-                setVehicle(vehicle));
+        GHResponse rsp = hopper.route(new GHRequest(43.727687, 7.418737, 43.74958, 7.436566).
+                setVehicle(vehicle).setWeighting(weighting));
 
         PathWrapper bestPath = rsp.getBest();
         // identify the number of counts to compare with none-CH foot route which had nearly 700 counts
@@ -1011,7 +1107,7 @@ public class GraphHopperIT {
         assertEquals(3437.6, bestPath.getDistance(), .1);
         assertEquals(86, bestPath.getPoints().getSize());
 
-        tmpHopper.close();
+        hopper.close();
     }
 
     @Test
@@ -1025,9 +1121,17 @@ public class GraphHopperIT {
 
     @Test
     public void testRoundTour() {
+        final String vehicle = "foot";
+        final String weighting = "fastest";
+        GraphHopper hopper = createGraphHopper(vehicle).
+                setOSMFile(MONACO).
+                setStoreOnFlush(true).
+                setCHEnabled(false).
+                importOrLoad();
+
         GHRequest rq = new GHRequest().
                 addPoint(new GHPoint(43.741069, 7.426854), 50).
-                setVehicle(vehicle).setWeighting("fastest").
+                setVehicle(vehicle).setWeighting(weighting).
                 setAlgorithm(ROUND_TRIP);
         rq.getHints().put(RoundTrip.DISTANCE, 1000);
         rq.getHints().put(RoundTrip.SEED, 0);
@@ -1043,68 +1147,70 @@ public class GraphHopperIT {
 
     @Test
     public void testPathDetails1216() {
-        GraphHopper tmpHopper = createGraphHopper("car").
-                setOSMFile(DIR + "/north-bayreuth.osm.gz").
-                setCHEnabled(false).
-                setGraphHopperLocation(tmpGraphFile);
-        tmpHopper.importOrLoad();
+        final String vehicle = "car";
+        final String weighting = "fastest";
+
+        GraphHopper hopper = createGraphHopper(vehicle).
+                setOSMFile(BAYREUTH).
+                setCHEnabled(false);
+        hopper.importOrLoad();
 
         GHRequest req = new GHRequest().
                 addPoint(new GHPoint(49.984352, 11.498802)).
                 // This is exactly between two edges with different speed values
                         addPoint(new GHPoint(49.984565, 11.499188)).
                         addPoint(new GHPoint(49.9847, 11.499612)).
-                        setVehicle("car").setWeighting("fastest").
+                        setVehicle(vehicle).setWeighting(weighting).
                         setPathDetails(Collections.singletonList(Parameters.Details.AVERAGE_SPEED));
 
-        GHResponse rsp = tmpHopper.route(req);
-
-        assertFalse(rsp.hasErrors());
+        GHResponse rsp = hopper.route(req);
+        assertFalse(rsp.getErrors().toString(), rsp.hasErrors());
     }
 
     @Test
     public void testPathDetailsSamePoint() {
-        GraphHopper tmpHopper = createGraphHopper("car").
-                setOSMFile(DIR + "/north-bayreuth.osm.gz").
-                setCHEnabled(false).
-                setGraphHopperLocation(tmpGraphFile);
-        tmpHopper.importOrLoad();
+        final String vehicle = "car";
+        final String weighting = "fastest";
+        GraphHopper hopper = createGraphHopper(vehicle).
+                setOSMFile(BAYREUTH).
+                setCHEnabled(false);
+        hopper.importOrLoad();
 
         GHRequest req = new GHRequest().
                 addPoint(new GHPoint(49.984352, 11.498802)).
                 addPoint(new GHPoint(49.984352, 11.498802)).
-                setVehicle("car").setWeighting("fastest").
+                setVehicle(vehicle).setWeighting(weighting).
                 setPathDetails(Collections.singletonList(Parameters.Details.AVERAGE_SPEED));
 
-        GHResponse rsp = tmpHopper.route(req);
+        GHResponse rsp = hopper.route(req);
 
         assertFalse(rsp.hasErrors());
     }
 
     @Test
     public void testFlexMode_631() {
-        String tmpOsmFile = DIR + "/monaco.osm.gz";
+        final String vehicle = "car";
+        final String weighting = "fastest";
+        GraphHopper hopper = createGraphHopper(vehicle).
+                setOSMFile(MONACO).
+                setStoreOnFlush(true);
 
-        GraphHopper tmpHopper = createGraphHopper("car").
-                setOSMFile(tmpOsmFile).
-                setStoreOnFlush(true).
-                setGraphHopperLocation(tmpGraphFile);
-
-        tmpHopper.getCHPreparationHandler().setEnabled(true).
-                setCHProfilesAsStrings(Collections.singletonList("fastest")).
+        hopper.getCHPreparationHandler().setEnabled(true).
+                setCHProfilesAsStrings(Collections.singletonList(weighting)).
                 setDisablingAllowed(true);
 
-        tmpHopper.getLMPreparationHandler().setEnabled(true).
-                setLMProfileStrings(Collections.singletonList("fastest|maximum=2000")).
+        hopper.getLMPreparationHandler().setEnabled(true).
+                setLMProfileStrings(Collections.singletonList(weighting + "|maximum=2000")).
                 setDisablingAllowed(true);
 
-        tmpHopper.importOrLoad();
+        hopper.importOrLoad();
         GHRequest req = new GHRequest(43.727687, 7.418737, 43.74958, 7.436566).
-                setVehicle("car");
+                setVehicle(vehicle).
+                setWeighting(weighting);
         req.getHints().put(Landmark.DISABLE, true);
         req.getHints().put(CH.DISABLE, false);
 
-        GHResponse rsp = tmpHopper.route(req);
+        GHResponse rsp = hopper.route(req);
         long chSum = rsp.getHints().getLong("visited_nodes.sum", 0);
         assertTrue("Too many visited nodes for ch mode " + chSum, chSum < 60);
         PathWrapper bestPath = rsp.getBest();
@@ -1115,7 +1221,7 @@ public class GraphHopperIT {
         req.setAlgorithm(Parameters.Algorithms.ASTAR_BI);
         req.getHints().put(Landmark.DISABLE, true);
         req.getHints().put(CH.DISABLE, true);
-        rsp = tmpHopper.route(req);
+        rsp = hopper.route(req);
         long flexSum = rsp.getHints().getLong("visited_nodes.sum", 0);
         assertTrue("Too few visited nodes for flex mode " + flexSum, flexSum > 60);
 
@@ -1126,7 +1232,7 @@ public class GraphHopperIT {
         // request hybrid mode
         req.getHints().put(Landmark.DISABLE, false);
         req.getHints().put(CH.DISABLE, true);
-        rsp = tmpHopper.route(req);
+        rsp = hopper.route(req);
 
         long hSum = rsp.getHints().getLong("visited_nodes.sum", 0);
         // hybrid is better than CH: 40 vs. 42 !
@@ -1142,23 +1248,25 @@ public class GraphHopperIT {
 
     @Test
     public void testPreparedProfileNotAvailable() {
-        GraphHopper hopper = createGraphHopper("car").
-                setOSMFile(DIR + "/monaco.osm.gz").
-                setStoreOnFlush(true).
-                setGraphHopperLocation(tmpGraphFile);
+        final String vehicle = "car";
+        final String weighting = "fastest";
+
+        GraphHopper hopper = createGraphHopper(vehicle).
+                setOSMFile(MONACO).
+                setStoreOnFlush(true);
 
         hopper.getCHPreparationHandler().setEnabled(true).
-                setCHProfilesAsStrings(Collections.singletonList("fastest")).
+                setCHProfilesAsStrings(Collections.singletonList(weighting)).
                 setDisablingAllowed(true);
 
         hopper.getLMPreparationHandler().setEnabled(true).
-                setLMProfileStrings(Collections.singletonList("fastest|maximum=2000")).
+                setLMProfileStrings(Collections.singletonList(weighting + "|maximum=2000")).
                 setDisablingAllowed(true);
 
         hopper.importOrLoad();
         // request a weighting that was not prepared
         GHRequest req = new GHRequest(43.727687, 7.418737, 43.74958, 7.436566).
-                setVehicle("car").
+                setVehicle(vehicle).
                 setWeighting("short_fastest");
 
         // try with CH
@@ -1186,21 +1294,23 @@ public class GraphHopperIT {
     @Test
     public void testDisablingLM() {
         // setup GH with LM preparation but no CH preparation
-        String osmFile = DIR + "/monaco.osm.gz";
-        GraphHopper hopper = createGraphHopper("car,bike").
-                setOSMFile(osmFile).
-                setStoreOnFlush(true).
-                setGraphHopperLocation(tmpGraphFile);
+        final String vehicle = "car";
+        final String weighting = "fastest";
+        // note that the pure presence of the bike encoder leads to 'ghost' junctions with the bike network even for
+        // cars such that the number of visited nodes depends on the bike encoder added here or not, #1910
+        GraphHopper hopper = createGraphHopper(vehicle + ",bike").
+                setOSMFile(MONACO).
+                setStoreOnFlush(true);
         hopper.getCHPreparationHandler().setEnabled(false);
         hopper.getLMPreparationHandler().setEnabled(true).
-                setLMProfileStrings(Collections.singletonList("fastest|maximum=2000")).
+                setLMProfileStrings(Collections.singletonList(weighting + "|maximum=2000")).
                 setDisablingAllowed(true);
         hopper.importOrLoad();
 
         // we can switch LM on/off
         GHRequest req = new GHRequest(43.727687, 7.418737, 43.74958, 7.436566).
-                setVehicle("car").
-                setWeighting("fastest");
+                setVehicle(vehicle).
+                setWeighting(weighting);
 
         req.getHints().put(Landmark.DISABLE, false);
         GHResponse res = hopper.route(req);
@@ -1213,86 +1323,88 @@ public class GraphHopperIT {
 
     @Test
     public void testTurnCostsOnOff() {
-        GraphHopper tmpHopper = createGraphHopper("car|turn_costs=true").
-                setOSMFile(DIR + "/moscow.osm.gz").
+        GraphHopper hopper = createGraphHopper("car|turn_costs=true").
+                setOSMFile(MOSCOW).
                 setStoreOnFlush(true).
-                setCHEnabled(false).
-                setGraphHopperLocation(tmpGraphFile);
-        tmpHopper.importOrLoad();
+                setCHEnabled(false);
+        hopper.importOrLoad();
 
         // no edge_based parameter -> use edge-based (since encoder supports it and no CH)
-        assertMoscowEdgeBased(tmpHopper, "none", false);
+        assertMoscowEdgeBased(hopper, "none", false);
         // edge_based=false -> use node-based
-        assertMoscowNodeBased(tmpHopper, "false", false);
+        assertMoscowNodeBased(hopper, "false", false);
         // edge_based=true -> use edge-based
-        assertMoscowEdgeBased(tmpHopper, "true", false);
+        assertMoscowEdgeBased(hopper, "true", false);
     }
 
     @Test
     public void testTurnCostsOnOffCH() {
-        GraphHopper tmpHopper = createGraphHopper("car|turn_costs=true").
-                setOSMFile(DIR + "/moscow.osm.gz").
+        final String weighting = "fastest";
+        GraphHopper hopper = createGraphHopper("car|turn_costs=true").
+                setOSMFile(MOSCOW).
                 setStoreOnFlush(true).
-                setCHEnabled(true).
-                setGraphHopperLocation(tmpGraphFile);
-        tmpHopper.getCHPreparationHandler().setDisablingAllowed(true);
-        tmpHopper.getCHPreparationHandler().setEdgeBasedCHMode(EdgeBasedCHMode.EDGE_AND_NODE);
-        tmpHopper.importOrLoad();
+                setCHEnabled(true);
+        hopper.getCHPreparationHandler().setCHProfileStrings(weighting);
+        hopper.getCHPreparationHandler().setDisablingAllowed(true);
+        hopper.getCHPreparationHandler().setEdgeBasedCHMode(EdgeBasedCHMode.EDGE_AND_NODE);
+        hopper.importOrLoad();
 
         // no edge_based parameter -> use edge-based (because its there)
-        assertMoscowEdgeBased(tmpHopper, "none", true);
+        assertMoscowEdgeBased(hopper, "none", true);
         // edge_based=false -> use node-based
-        assertMoscowNodeBased(tmpHopper, "false", true);
+        assertMoscowNodeBased(hopper, "false", true);
         // edge_based=true -> use edge-based
-        assertMoscowEdgeBased(tmpHopper, "true", true);
+        assertMoscowEdgeBased(hopper, "true", true);
     }
 
     @Test
     public void testCHOnOffWithTurnCosts() {
-        GraphHopper tmpHopper = createGraphHopper("car|turn_costs=true").
-                setOSMFile(DIR + "/moscow.osm.gz").
+        final String weighting = "fastest";
+        GraphHopper hopper = createGraphHopper("car|turn_costs=true").
+                setOSMFile(MOSCOW).
                 setStoreOnFlush(true).
-                setCHEnabled(true).
-                setGraphHopperLocation(tmpGraphFile);
-        tmpHopper.getCHPreparationHandler()
+                setCHEnabled(true);
+        hopper.getCHPreparationHandler()
+                .setCHProfileStrings(weighting)
                 .setEdgeBasedCHMode(EdgeBasedCHMode.EDGE_OR_NODE)
                 .setDisablingAllowed(true);
-        tmpHopper.importOrLoad();
+        hopper.importOrLoad();
 
         // with CH -> edge-based
-        GHResponse rsp1 = assertMoscowEdgeBased(tmpHopper, "true", false);
+        GHResponse rsp1 = assertMoscowEdgeBased(hopper, "true", false);
         // without CH -> also edge-based
-        GHResponse rsp2 = assertMoscowEdgeBased(tmpHopper, "true", true);
+        GHResponse rsp2 = assertMoscowEdgeBased(hopper, "true", true);
         // just a quick check that we did not run the same algorithm twice
         assertNotEquals(rsp1.getHints().get("visited_nodes.sum", "_"), rsp2.getHints().get("visited_nodes.sum", "_"));
     }
 
     @Test
     public void testNodeBasedCHOnlyButTurnCostForNonCH() {
+        final String weighting = "fastest";
         // before edge-based CH was added a common case was to use edge-based without CH and CH for node-based
-        GraphHopper tmpHopper = createGraphHopper("car|turn_costs=true").
-                setOSMFile(DIR + "/moscow.osm.gz").
+        GraphHopper hopper = createGraphHopper("car|turn_costs=true").
+                setOSMFile(MOSCOW).
                 setStoreOnFlush(true).
-                setCHEnabled(true).
-                setGraphHopperLocation(tmpGraphFile);
-        tmpHopper.getCHPreparationHandler()
+                setCHEnabled(true);
+        hopper.getCHPreparationHandler()
+                .setCHProfileStrings(weighting)
                 .setEdgeBasedCHMode(EdgeBasedCHMode.OFF)
                 .setDisablingAllowed(true);
-        tmpHopper.importOrLoad();
+        hopper.importOrLoad();
 
         // without CH -> use edge-based unless disabled explicitly
-        assertMoscowEdgeBased(tmpHopper, "none", false);
-        assertMoscowEdgeBased(tmpHopper, "true", false);
-        assertMoscowNodeBased(tmpHopper, "false", false);
+        assertMoscowEdgeBased(hopper, "none", false);
+        assertMoscowEdgeBased(hopper, "true", false);
+        assertMoscowNodeBased(hopper, "false", false);
 
         // with CH -> use node-based unless edge_based is enabled explicitly (which should give an error)
-        assertMoscowNodeBased(tmpHopper, "none", true);
-        assertMoscowNodeBased(tmpHopper, "false", true);
-        GHResponse rsp = runMoscow(tmpHopper, "true", true);
+        assertMoscowNodeBased(hopper, "none", true);
+        assertMoscowNodeBased(hopper, "false", true);
+        GHResponse rsp = runMoscow(hopper, "true", true);
         assertEquals(1, rsp.getErrors().size());
         String expected = "Cannot find matching CH profile for your request. Please check your parameters." +
                 "\nYou can try disabling CH using ch.disable=true" +
-                "\nrequested:  *|car|edge_based=true|u_turn_costs=*\navailable: [fastest|car|edge_based=false]";
+                "\nrequested:  fastest|car|edge_based=true|u_turn_costs=*\navailable: [fastest|car|edge_based=false]";
         assertTrue("unexpected error:\n" + rsp.getErrors().toString() + "\nwhen expecting an error containing:\n" + expected,
                 rsp.getErrors().toString().contains(expected));
     }
@@ -1301,39 +1413,40 @@ public class GraphHopperIT {
     public void testEdgeBasedByDefaultIfOnlyEdgeBased() {
         // when there is only one edge-based CH profile, there is no need to specify edge_based=true explicitly,
         // see #1637
-        GraphHopper tmpHopper = createGraphHopper("car|turn_costs=true").
-                setOSMFile(DIR + "/moscow.osm.gz").
+        final String weighting = "fastest";
+        GraphHopper hopper = createGraphHopper("car|turn_costs=true").
+                setOSMFile(MOSCOW).
                 setStoreOnFlush(true).
-                setCHEnabled(true).
-                setGraphHopperLocation(tmpGraphFile);
-        tmpHopper.getCHPreparationHandler().setDisablingAllowed(true);
-        tmpHopper.getCHPreparationHandler().setEdgeBasedCHMode(EdgeBasedCHMode.EDGE_OR_NODE);
-        tmpHopper.importOrLoad();
+                setCHEnabled(true);
+        hopper.getCHPreparationHandler().setCHProfileStrings(weighting);
+        hopper.getCHPreparationHandler().setDisablingAllowed(true);
+        hopper.getCHPreparationHandler().setEdgeBasedCHMode(EdgeBasedCHMode.EDGE_OR_NODE);
+        hopper.importOrLoad();
 
         // even when we omit the edge_based parameter we get edge-based CH, unless we disable it explicitly
-        assertMoscowEdgeBased(tmpHopper, "none", true);
-        assertMoscowEdgeBased(tmpHopper, "true", true);
-        GHResponse rsp = runMoscow(tmpHopper, "false", true);
+        assertMoscowEdgeBased(hopper, "none", true);
+        assertMoscowEdgeBased(hopper, "true", true);
+        GHResponse rsp = runMoscow(hopper, "false", true);
         assertTrue(rsp.hasErrors());
         assertTrue("unexpected error: " + rsp.getErrors(), rsp.getErrors().toString().contains(
                 "Cannot find matching CH profile for your request. Please check your parameters." +
                         "\nYou can try disabling CH using ch.disable=true" +
-                        "\nrequested:  *|car|edge_based=false|u_turn_costs=*\navailable: [fastest|car|edge_based=true|u_turn_costs=-1]"));
+                        "\nrequested:  fastest|car|edge_based=false|u_turn_costs=*\navailable: [fastest|car|edge_based=true|u_turn_costs=-1]"));
     }
 
-    private GHResponse assertMoscowNodeBased(GraphHopper tmpHopper, String edgeBasedParam, boolean ch) {
-        GHResponse rsp = runMoscow(tmpHopper, edgeBasedParam, ch);
+    private GHResponse assertMoscowNodeBased(GraphHopper hopper, String edgeBasedParam, boolean ch) {
+        GHResponse rsp = runMoscow(hopper, edgeBasedParam, ch);
         assertEquals(400, rsp.getBest().getDistance(), 1);
         return rsp;
     }
 
-    private GHResponse assertMoscowEdgeBased(GraphHopper tmpHopper, String edgeBasedParam, boolean ch) {
-        GHResponse rsp = runMoscow(tmpHopper, edgeBasedParam, ch);
+    private GHResponse assertMoscowEdgeBased(GraphHopper hopper, String edgeBasedParam, boolean ch) {
+        GHResponse rsp = runMoscow(hopper, edgeBasedParam, ch);
         assertEquals(1044, rsp.getBest().getDistance(), 1);
         return rsp;
     }
 
-    private GHResponse runMoscow(GraphHopper tmpHopper, String edgeBasedParam, boolean ch) {
+    private GHResponse runMoscow(GraphHopper hopper, String edgeBasedParam, boolean ch) {
         GHRequest req = new GHRequest(55.813357, 37.5958585, 55.811042, 37.594689);
         if (edgeBasedParam.equals("true") || edgeBasedParam.equals("false")) {
             req.getHints().put(Routing.EDGE_BASED, edgeBasedParam);
@@ -1341,16 +1454,24 @@ public class GraphHopperIT {
             req.getHints().remove(Routing.EDGE_BASED);
         }
         req.getHints().put(CH.DISABLE, !ch);
-        return tmpHopper.route(req);
+        req.setVehicle("car");
+        req.setWeighting("fastest");
+        return hopper.route(req);
     }
 
     @Test
     public void testEdgeBasedRequiresTurnCostSupport() {
+        String vehicle = "foot";
+        GraphHopper hopper = createGraphHopper(vehicle).
+                setOSMFile(MONACO).
+                setStoreOnFlush(true).
+                setCHEnabled(false).
+                importOrLoad();
         GHPoint p = new GHPoint(43.727687, 7.418737);
         GHPoint q = new GHPoint(43.74958, 7.436566);
         GHRequest req = new GHRequest(p, q);
         req.getHints().put(Routing.EDGE_BASED, true);
-        req.setVehicle("foot");
+        req.setVehicle(vehicle);
         GHResponse rsp = hopper.route(req);
         assertTrue(rsp.hasErrors());
         assertTrue("using edge-based for encoder without turncost support should be an error, but got:\n" + rsp.getErrors(),
@@ -1360,26 +1481,25 @@ public class GraphHopperIT {
     @Test
     public void testEncoderWithTurnCostSupport_stillAllows_nodeBasedRouting() {
         // see #1698
-        GraphHopper tmpHopper = createGraphHopper("foot,car|turn_costs=true").
-                setOSMFile(DIR + "/moscow.osm.gz").
-                setGraphHopperLocation(tmpGraphFile).
+        GraphHopper hopper = createGraphHopper("foot,car|turn_costs=true").
+                setOSMFile(MOSCOW).
                 setCHEnabled(false);
-        tmpHopper.importOrLoad();
+        hopper.importOrLoad();
         GHPoint p = new GHPoint(55.813357, 37.5958585);
         GHPoint q = new GHPoint(55.811042, 37.594689);
         GHRequest req = new GHRequest(p, q);
         req.setVehicle("foot");
-        GHResponse rsp = tmpHopper.route(req);
+        GHResponse rsp = hopper.route(req);
         assertEquals("there should not be an error, but was: " + rsp.getErrors(), 0, rsp.getErrors().size());
     }
 
     @Test
     public void testCurbsides() {
         GraphHopper h = createGraphHopper("car|turn_costs=true").
-                setOSMFile(DIR + "/north-bayreuth.osm.gz").
-                setCHEnabled(true).
-                setGraphHopperLocation(tmpGraphFile);
+                setOSMFile(BAYREUTH).
+                setCHEnabled(true);
         h.getCHPreparationHandler()
+                .setCHProfileStrings("fastest")
                 .setEdgeBasedCHMode(EdgeBasedCHMode.EDGE_OR_NODE);
         h.importOrLoad();
 
@@ -1423,10 +1543,10 @@ public class GraphHopperIT {
     @Test
     public void testForceCurbsides() {
         GraphHopper h = createGraphHopper("car|turn_costs=true").
-                setOSMFile(DIR + "/monaco.osm.gz").
-                setCHEnabled(true).
-                setGraphHopperLocation(tmpGraphFile);
+                setOSMFile(MONACO).
+                setCHEnabled(true);
         h.getCHPreparationHandler()
+                .setCHProfileStrings("fastest")
                 .setEdgeBasedCHMode(EdgeBasedCHMode.EDGE_OR_NODE);
         h.importOrLoad();
 
@@ -1452,12 +1572,12 @@ public class GraphHopperIT {
         assertCurbsidesPath(h, p, q, asList(CURBSIDE_LEFT, CURBSIDE_LEFT), 463, asList(boulevard, avenue), false);
     }
 
-    private void assertCurbsidesPath(GraphHopper tmpHopper, GHPoint source, GHPoint target, List<String> curbsides, int expectedDistance, List<String> expectedStreets) {
-        assertCurbsidesPath(tmpHopper, source, target, curbsides, expectedDistance, expectedStreets, true);
+    private void assertCurbsidesPath(GraphHopper hopper, GHPoint source, GHPoint target, List<String> curbsides, int expectedDistance, List<String> expectedStreets) {
+        assertCurbsidesPath(hopper, source, target, curbsides, expectedDistance, expectedStreets, true);
     }
 
-    private void assertCurbsidesPath(GraphHopper tmpHopper, GHPoint source, GHPoint target, List<String> curbsides, int expectedDistance, List<String> expectedStreets, boolean force) {
-        GHResponse rsp = calcCurbsidePath(tmpHopper, source, target, curbsides, force);
+    private void assertCurbsidesPath(GraphHopper hopper, GHPoint source, GHPoint target, List<String> curbsides, int expectedDistance, List<String> expectedStreets, boolean force) {
+        GHResponse rsp = calcCurbsidePath(hopper, source, target, curbsides, force);
         assertFalse(rsp.getErrors().toString(), rsp.hasErrors());
         PathWrapper path = rsp.getBest();
         List<String> streets = new ArrayList<>(path.getInstructions().size());
@@ -1470,27 +1590,26 @@ public class GraphHopperIT {
         assertEquals(expectedDistance, path.getDistance(), 1);
     }
 
-    private void assertCurbsidesPathError(GraphHopper tmpHopper, GHPoint source, GHPoint target, List<String> curbsides, String errorMessage, boolean force) {
-        GHResponse rsp = calcCurbsidePath(tmpHopper, source, target, curbsides, force);
+    private void assertCurbsidesPathError(GraphHopper hopper, GHPoint source, GHPoint target, List<String> curbsides, String errorMessage, boolean force) {
+        GHResponse rsp = calcCurbsidePath(hopper, source, target, curbsides, force);
         assertTrue(rsp.hasErrors());
         assertTrue("unexpected error. expected message containing: " + errorMessage + ", but got: " +
                 rsp.getErrors(), rsp.getErrors().toString().contains(errorMessage));
     }
 
-    private GHResponse calcCurbsidePath(GraphHopper tmpHopper, GHPoint source, GHPoint target, List<String> curbsides, boolean force) {
+    private GHResponse calcCurbsidePath(GraphHopper hopper, GHPoint source, GHPoint target, List<String> curbsides, boolean force) {
         GHRequest req = new GHRequest(source, target);
         req.getHints().put(Routing.EDGE_BASED, true);
         req.getHints().put(Routing.FORCE_CURBSIDE, force);
         req.setCurbsides(curbsides);
-        return tmpHopper.route(req);
+        return hopper.route(req);
     }
 
     @Test
     public void testCHWithFiniteUTurnCostsAndMissingWeighting() {
         GraphHopper h = createGraphHopper("car|turn_costs=true").
-                setOSMFile(DIR + "/monaco.osm.gz").
-                setCHEnabled(true).
-                setGraphHopperLocation(tmpGraphFile);
+                setOSMFile(MONACO).
+                setCHEnabled(true);
         h.getCHPreparationHandler()
                 .setCHProfileStrings("fastest|u_turn_costs=40")
                 .setEdgeBasedCHMode(EdgeBasedCHMode.EDGE_OR_NODE);
@@ -1514,9 +1633,9 @@ public class GraphHopperIT {
     @Test
     public void simplifyWithInstructionsAndPathDetails() {
         GraphHopper hopper = new GraphHopperOSM().
-                setOSMFile(DIR + "/north-bayreuth.osm.gz").
+                setOSMFile(BAYREUTH).
                 setCHEnabled(false).
-                setGraphHopperLocation(tmpGraphFile).
+                setGraphHopperLocation(GH_LOCATION).
                 forServer();
         EncodingManager em = new EncodingManager.Builder()
                 .setEnableInstructions(true)
@@ -1591,9 +1710,10 @@ public class GraphHopperIT {
         assertEquals(expected, detail.toString());
     }
 
-    private static GraphHopperOSM createGraphHopper(String vehicles) {
+    private static GraphHopperOSM createGraphHopper(String encodingManagerString) {
         GraphHopperOSM hopper = new GraphHopperOSM();
-        hopper.setEncodingManager(EncodingManager.create(vehicles));
+        hopper.setEncodingManager(EncodingManager.create(encodingManagerString));
+        hopper.setGraphHopperLocation(GH_LOCATION);
         return hopper;
     }
 
diff --git a/reader-osm/src/test/java/com/graphhopper/reader/osm/GraphHopperOSMTest.java b/reader-osm/src/test/java/com/graphhopper/reader/osm/GraphHopperOSMTest.java
index 46b4bf8a7..79ed45cec 100644
--- a/reader-osm/src/test/java/com/graphhopper/reader/osm/GraphHopperOSMTest.java
+++ b/reader-osm/src/test/java/com/graphhopper/reader/osm/GraphHopperOSMTest.java
@@ -77,35 +77,42 @@ public class GraphHopperOSMTest {
 
     @Test
     public void testLoadOSM() {
-        GraphHopper closableInstance = createGraphHopper("car").
+        String vehicle = "car";
+        String weighting = "fastest";
+        GraphHopper hopper = createGraphHopper(vehicle).
                 setStoreOnFlush(true).
                 setGraphHopperLocation(ghLoc).
                 setDataReaderFile(testOsm);
-        closableInstance.importOrLoad();
-        GHResponse rsp = closableInstance.route(new GHRequest(51.2492152, 9.4317166, 51.2, 9.4));
+        hopper.getCHPreparationHandler().setCHProfileStrings(weighting);
+        hopper.importOrLoad();
+        GHResponse rsp = hopper.route(new GHRequest(51.2492152, 9.4317166, 51.2, 9.4).
+                setVehicle(vehicle).setWeighting(weighting));
         assertFalse(rsp.hasErrors());
         assertEquals(3, rsp.getBest().getPoints().getSize());
 
-        closableInstance.close();
+        hopper.close();
 
         // no encoding manager necessary
-        closableInstance = new GraphHopperOSM().
+        hopper = new GraphHopperOSM().
                 setStoreOnFlush(true);
-        assertTrue(closableInstance.load(ghLoc));
-        rsp = closableInstance.route(new GHRequest(51.2492152, 9.4317166, 51.2, 9.4));
+        hopper.getCHPreparationHandler().setCHProfileStrings(weighting);
+        assertTrue(hopper.load(ghLoc));
+        rsp = hopper.route(new GHRequest(51.2492152, 9.4317166, 51.2, 9.4).
+                setVehicle(vehicle).setWeighting(weighting));
         assertFalse(rsp.hasErrors());
         assertEquals(3, rsp.getBest().getPoints().getSize());
 
-        closableInstance.close();
+        hopper.close();
         try {
-            rsp = closableInstance.route(new GHRequest(51.2492152, 9.4317166, 51.2, 9.4));
+            rsp = hopper.route(new GHRequest(51.2492152, 9.4317166, 51.2, 9.4)
+                    .setVehicle(vehicle).setWeighting(weighting));
             fail();
         } catch (Exception ex) {
             assertEquals("You need to create a new GraphHopper instance as it is already closed", ex.getMessage());
         }
 
         try {
-            closableInstance.getLocationIndex().findClosest(51.2492152, 9.4317166, EdgeFilter.ALL_EDGES);
+            hopper.getLocationIndex().findClosest(51.2492152, 9.4317166, EdgeFilter.ALL_EDGES);
             fail();
         } catch (Exception ex) {
             assertEquals("You need to create a new LocationIndex instance as it is already closed", ex.getMessage());
@@ -114,35 +121,40 @@ public class GraphHopperOSMTest {
 
     @Test
     public void testLoadOSMNoCH() {
-        GraphHopper gh = createGraphHopper("car").
-                setStoreOnFlush(true).setCHEnabled(false).
+        final String vehicle = "car";
+        final String weighting = "fastest";
+        GraphHopper gh = createGraphHopper(vehicle).
+                setStoreOnFlush(true).
+                setCHEnabled(false).
                 setGraphHopperLocation(ghLoc).
                 setDataReaderFile(testOsm);
         gh.importOrLoad();
 
-        assertFalse(gh.getAlgorithmFactory(new HintsMap("fastest")) instanceof CHRoutingAlgorithmFactory);
+        assertFalse(gh.getAlgorithmFactory(new HintsMap(weighting)) instanceof CHRoutingAlgorithmFactory);
 
-        GHResponse rsp = gh.route(new GHRequest(51.2492152, 9.4317166, 51.2, 9.4));
+        GHResponse rsp = gh.route(new GHRequest(51.2492152, 9.4317166, 51.2, 9.4)
+                .setVehicle(vehicle).setWeighting(weighting));
         assertFalse(rsp.hasErrors());
         assertEquals(3, rsp.getBest().getPoints().getSize());
 
         gh.close();
-        gh = createGraphHopper("car").
+        gh = createGraphHopper(vehicle).
                 setStoreOnFlush(true).
                 setCHEnabled(false);
         assertTrue(gh.load(ghLoc));
-        rsp = gh.route(new GHRequest(51.2492152, 9.4317166, 51.2, 9.4));
+        rsp = gh.route(new GHRequest(51.2492152, 9.4317166, 51.2, 9.4)
+                .setVehicle(vehicle).setWeighting(weighting));
         assertFalse(rsp.hasErrors());
         assertEquals(3, rsp.getBest().getPoints().getSize());
 
         gh.close();
 
-        gh = createGraphHopper("car").
+        gh = createGraphHopper(vehicle).
                 setGraphHopperLocation(ghLoc).
                 setDataReaderFile(testOsm).
                 init(new GraphHopperConfig().put(Parameters.CH.PREPARE + "weightings", "no"));
 
-        assertFalse(gh.getAlgorithmFactory(new HintsMap("fastest")) instanceof CHRoutingAlgorithmFactory);
+        assertFalse(gh.getAlgorithmFactory(new HintsMap(weighting)) instanceof CHRoutingAlgorithmFactory);
         gh.close();
     }
 
@@ -209,17 +221,20 @@ public class GraphHopperOSMTest {
     public void testLoadingWithDifferentCHConfig_issue471_pr1488() {
         // when there is a single CH profile we can also load GraphHopper without it
         // in #471 this was forbidden, but later it was allowed again, see #1488
-        GraphHopper gh = createGraphHopper("car").
+        final String vehicle = "car";
+        final String weighting = "fastest";
+        GraphHopper gh = createGraphHopper(vehicle).
                 setStoreOnFlush(true).
                 setGraphHopperLocation(ghLoc).
                 setDataReaderFile(testOsm);
+        gh.getCHPreparationHandler().setCHProfileStrings(weighting);
         gh.importOrLoad();
         GHResponse rsp = gh.route(new GHRequest(51.2492152, 9.4317166, 51.2, 9.4));
         assertFalse(rsp.hasErrors());
         assertEquals(3, rsp.getBest().getPoints().getSize());
         gh.close();
 
-        gh = createGraphHopper("car").
+        gh = createGraphHopper(vehicle).
                 setStoreOnFlush(true).setCHEnabled(false);
         gh.load(ghLoc);
         // no error
@@ -227,8 +242,9 @@ public class GraphHopperOSMTest {
         Helper.removeDir(new File(ghLoc));
 
         // without CH should not be loadable with CH enabled
-        gh = createGraphHopper("car").
-                setStoreOnFlush(true).setCHEnabled(false).
+        gh = createGraphHopper(vehicle).
+                setStoreOnFlush(true).
+                setCHEnabled(false).
                 setGraphHopperLocation(ghLoc).
                 setDataReaderFile(testOsm);
         gh.importOrLoad();
@@ -239,6 +255,8 @@ public class GraphHopperOSMTest {
 
         gh = createGraphHopper("car").
                 setStoreOnFlush(true);
+        gh.getCHPreparationHandler().setCHProfileStrings(weighting);
+
         try {
             gh.load(ghLoc);
             fail();
@@ -249,18 +267,19 @@ public class GraphHopperOSMTest {
 
     @Test
     public void testAllowMultipleReadingInstances() {
-        GraphHopper instance1 = createGraphHopper("car").
+        String vehicle = "car";
+        GraphHopper instance1 = createGraphHopper(vehicle).
                 setStoreOnFlush(true).
                 setGraphHopperLocation(ghLoc).
                 setDataReaderFile(testOsm);
         instance1.importOrLoad();
 
-        GraphHopper instance2 = createGraphHopper("car").
+        GraphHopper instance2 = createGraphHopper(vehicle).
                 setStoreOnFlush(true).
                 setDataReaderFile(testOsm);
         instance2.load(ghLoc);
 
-        GraphHopper instance3 = createGraphHopper("car").
+        GraphHopper instance3 = createGraphHopper(vehicle).
                 setStoreOnFlush(true).
                 setDataReaderFile(testOsm);
         instance3.load(ghLoc);
@@ -328,13 +347,17 @@ public class GraphHopperOSMTest {
 
     @Test
     public void testPrepare() {
-        instance = createGraphHopper("car").
+        final String vehicle = "car";
+        final String weighting = "shortest";
+
+        instance = createGraphHopper(vehicle).
                 setStoreOnFlush(false).
                 setGraphHopperLocation(ghLoc).
                 setDataReaderFile(testOsm);
-        instance.getCHPreparationHandler().setCHProfileStrings("shortest");
+        instance.getCHPreparationHandler().setCHProfileStrings(weighting);
         instance.importOrLoad();
         GHResponse rsp = instance.route(new GHRequest(51.2492152, 9.4317166, 51.2, 9.4).
+                setVehicle(vehicle).setWeighting(weighting).
                 setAlgorithm(DIJKSTRA_BI));
         assertFalse(rsp.hasErrors());
         assertEquals(Helper.createPointList(51.249215, 9.431716, 52.0, 9.0, 51.2, 9.4), rsp.getBest().getPoints());
@@ -343,13 +366,17 @@ public class GraphHopperOSMTest {
 
     @Test
     public void testSortedGraph_noCH() {
-        instance = createGraphHopper("car").
+        final String vehicle = "car";
+        final String weighting = "fastest";
+        instance = createGraphHopper(vehicle).
                 setCHEnabled(false).
-                setStoreOnFlush(false).setSortGraph(true).
+                setStoreOnFlush(false).
+                setSortGraph(true).
                 setGraphHopperLocation(ghLoc).
                 setDataReaderFile(testOsm);
         instance.importOrLoad();
         PathWrapper rsp = instance.route(new GHRequest(51.2492152, 9.4317166, 51.2, 9.4).
+                setVehicle(vehicle).setWeighting(weighting).
                 setAlgorithm(DIJKSTRA_BI)).getBest();
         assertFalse(rsp.hasErrors());
         assertEquals(3, rsp.getPoints().getSize());
@@ -358,6 +385,7 @@ public class GraphHopperOSMTest {
         assertEquals(new GHPoint(51.199999850988384, 9.39999970197677), rsp.getPoints().get(2));
 
         GHRequest req = new GHRequest(51.2492152, 9.4317166, 51.2, 9.4);
+        req.setVehicle(vehicle).setWeighting(weighting);
         boolean old = instance.getEncodingManager().isEnableInstructions();
         req.getHints().put("instructions", true);
         instance.route(req);
@@ -370,8 +398,12 @@ public class GraphHopperOSMTest {
 
     @Test
     public void testFootAndCar() {
+        final String vehicle1 = "car";
+        final String vehicle2 = "foot";
+        final String weighting = "fastest";
+
         // now all ways are imported
-        instance = createGraphHopper("car,foot").
+        instance = createGraphHopper(vehicle1 + "," + vehicle2).
                 setStoreOnFlush(false).
                 setCHEnabled(false).
                 setGraphHopperLocation(ghLoc).
@@ -382,7 +414,7 @@ public class GraphHopperOSMTest {
         assertEquals(8, instance.getGraphHopperStorage().getEdges());
 
         // A to D
-        GHResponse grsp = instance.route(new GHRequest(11.1, 50, 11.3, 51).setVehicle("car"));
+        GHResponse grsp = instance.route(new GHRequest(11.1, 50, 11.3, 51).setVehicle(vehicle1).setWeighting(weighting));
         assertFalse(grsp.hasErrors());
         PathWrapper rsp = grsp.getBest();
         assertEquals(3, rsp.getPoints().getSize());
@@ -392,8 +424,8 @@ public class GraphHopperOSMTest {
         assertEquals(51, rsp.getPoints().getLongitude(2), 1e-3);
         assertEquals(11.3, rsp.getPoints().getLatitude(2), 1e-3);
 
-        // A to D not allowed for foot. But the location index will choose a node close to D accessible to FOOT        
-        grsp = instance.route(new GHRequest(11.1, 50, 11.3, 51).setVehicle("foot"));
+        // A to D not allowed for foot. But the location index will choose a node close to D accessible to FOOT
+        grsp = instance.route(new GHRequest(11.1, 50, 11.3, 51).setVehicle(vehicle2).setWeighting(weighting));
         assertFalse(grsp.hasErrors());
         rsp = grsp.getBest();
         assertEquals(2, rsp.getPoints().getSize());
@@ -402,13 +434,13 @@ public class GraphHopperOSMTest {
         assertEquals(50.644, rsp.getPoints().getLongitude(1), 1e-3);
 
         // A to E only for foot
-        grsp = instance.route(new GHRequest(11.1, 50, 10, 51).setVehicle("foot"));
+        grsp = instance.route(new GHRequest(11.1, 50, 10, 51).setVehicle(vehicle2).setWeighting(weighting));
         assertFalse(grsp.hasErrors());
         rsp = grsp.getBest();
         assertEquals(2, rsp.getPoints().size());
 
         // A D E for car
-        grsp = instance.route(new GHRequest(11.1, 50, 10, 51).setVehicle("car"));
+        grsp = instance.route(new GHRequest(11.1, 50, 10, 51).setVehicle(vehicle1).setWeighting(weighting));
         assertFalse(grsp.hasErrors());
         rsp = grsp.getBest();
         assertEquals(3, rsp.getPoints().getSize());
@@ -528,6 +560,7 @@ public class GraphHopperOSMTest {
     @Test
     public void testNoNPE_ifLoadNotSuccessful() {
         instance = createGraphHopper("car").
+                setCHEnabled(false).
                 setStoreOnFlush(true);
         try {
             // loading from empty directory
@@ -542,7 +575,8 @@ public class GraphHopperOSMTest {
 
     @Test
     public void testDoesNotCreateEmptyFolderIfLoadingFromNonExistingPath() {
-        instance = createGraphHopper("car");
+        instance = createGraphHopper("car")
+                .setCHEnabled(false);
 
         assertFalse(instance.load(ghLoc));
         assertFalse(new File(ghLoc).exists());
@@ -561,6 +595,7 @@ public class GraphHopperOSMTest {
         GHTmp tmp = new GHTmp();
         try {
             tmp.setDataReaderFile(testOsm);
+            tmp.setCHEnabled(false);
             tmp.importData();
             fail();
         } catch (IllegalStateException ex) {
@@ -569,6 +604,7 @@ public class GraphHopperOSMTest {
 
         // missing graph location
         instance = new GraphHopperOSM();
+        instance.setCHEnabled(false);
         try {
             instance.importOrLoad();
             fail();
@@ -579,6 +615,7 @@ public class GraphHopperOSMTest {
         // missing OSM file to import
         instance = createGraphHopper("car").
                 setStoreOnFlush(true).
+                setCHEnabled(false).
                 setGraphHopperLocation(ghLoc);
         try {
             instance.importOrLoad();
@@ -591,6 +628,7 @@ public class GraphHopperOSMTest {
         // missing encoding manager          
         instance = new GraphHopperOSM().
                 setStoreOnFlush(true).
+                setCHEnabled(false).
                 setGraphHopperLocation(ghLoc).
                 setDataReaderFile(testOsm3);
         try {
@@ -603,6 +641,7 @@ public class GraphHopperOSMTest {
         // Import is possible even if no storeOnFlush is specified BUT here we miss the OSM file
         instance = createGraphHopper("car").
                 setStoreOnFlush(false).
+                setCHEnabled(false).
                 setGraphHopperLocation(ghLoc);
         try {
             instance.importOrLoad();
@@ -616,17 +655,20 @@ public class GraphHopperOSMTest {
     @Test
     public void testFootOnly() {
         // now only footable ways are imported => no A D C and B D E => the other both ways have pillar nodes!
-        instance = createGraphHopper("foot").
+        final String vehicle = "foot";
+        final String weighting = "fastest";
+        instance = createGraphHopper(vehicle).
                 setStoreOnFlush(false).
                 setGraphHopperLocation(ghLoc).
                 setDataReaderFile(testOsm3);
+        instance.getCHPreparationHandler().setCHProfileStrings(weighting);
         instance.importOrLoad();
 
         assertEquals(2, instance.getGraphHopperStorage().getNodes());
         assertEquals(2, instance.getGraphHopperStorage().getAllEdges().length());
 
         // A to E only for foot
-        GHResponse grsp = instance.route(new GHRequest(11.1, 50, 11.19, 52).setVehicle("foot"));
+        GHResponse grsp = instance.route(new GHRequest(11.1, 50, 11.19, 52).setVehicle(vehicle).setWeighting(weighting));
         assertFalse(grsp.hasErrors());
         PathWrapper rsp = grsp.getBest();
         // the last points snaps to the edge
@@ -635,11 +677,15 @@ public class GraphHopperOSMTest {
 
     @Test
     public void testVia() {
+        final String vehicle = "car";
+        final String weighting = "fastest";
         instance = new GraphHopperOSM().setStoreOnFlush(true).
                 init(new GraphHopperConfig().
                         put("datareader.file", testOsm3).
                         put("prepare.min_network_size", "1").
-                        put("graph.flag_encoders", "car")).
+                        put("graph.flag_encoders", vehicle).
+                        put("prepare.ch.weightings", weighting)
+                ).
                 setGraphHopperLocation(ghLoc);
         instance.importOrLoad();
 
@@ -647,14 +693,14 @@ public class GraphHopperOSMTest {
         GHPoint first = new GHPoint(11.1, 50);
         GHPoint second = new GHPoint(12, 51);
         GHPoint third = new GHPoint(11.2, 51.9);
-        GHResponse rsp12 = instance.route(new GHRequest().addPoint(first).addPoint(second));
+        GHResponse rsp12 = instance.route(new GHRequest().addPoint(first).addPoint(second).setVehicle(vehicle).setWeighting(weighting));
         assertFalse("should find 1->2", rsp12.hasErrors());
         assertEquals(147930.5, rsp12.getBest().getDistance(), .1);
-        GHResponse rsp23 = instance.route(new GHRequest().addPoint(second).addPoint(third));
+        GHResponse rsp23 = instance.route(new GHRequest().addPoint(second).addPoint(third).setVehicle(vehicle).setWeighting(weighting));
         assertFalse("should find 2->3", rsp23.hasErrors());
         assertEquals(176608.9, rsp23.getBest().getDistance(), .1);
 
-        GHResponse grsp = instance.route(new GHRequest().addPoint(first).addPoint(second).addPoint(third));
+        GHResponse grsp = instance.route(new GHRequest().addPoint(first).addPoint(second).addPoint(third).setVehicle(vehicle).setWeighting(weighting));
         assertFalse("should find 1->2->3", grsp.hasErrors());
         PathWrapper rsp = grsp.getBest();
         assertEquals(rsp12.getBest().getDistance() + rsp23.getBest().getDistance(), rsp.getDistance(), 1e-6);
@@ -667,14 +713,14 @@ public class GraphHopperOSMTest {
     public void testGetPathsDirectionEnforcement1() {
         // Test enforce start direction
         // Note: This Test does not pass for CH enabled    
-        instance = createSquareGraphInstance(false);
+        instance = createSquareGraphInstance();
 
         // Start in middle of edge 4-5 
         GHPoint start = new GHPoint(0.0015, 0.002);
         // End at middle of edge 2-3
         GHPoint end = new GHPoint(0.002, 0.0005);
 
-        GHRequest req = new GHRequest().addPoint(start, 180.).addPoint(end);
+        GHRequest req = new GHRequest().addPoint(start, 180.).addPoint(end).setVehicle("car").setWeighting("fastest");
         GHResponse response = new GHResponse();
         List<Path> paths = instance.calcPaths(req, response);
         assertFalse(response.hasErrors());
@@ -684,14 +730,14 @@ public class GraphHopperOSMTest {
     @Test
     public void testGetPathsDirectionEnforcement2() {
         // Test enforce south start direction and east end direction
-        instance = createSquareGraphInstance(false);
+        instance = createSquareGraphInstance();
 
         // Start in middle of edge 4-5 
         GHPoint start = new GHPoint(0.0015, 0.002);
         // End at middle of edge 2-3
         GHPoint end = new GHPoint(0.002, 0.0005);
 
-        GHRequest req = new GHRequest().addPoint(start, 180.).addPoint(end, 90.);
+        GHRequest req = new GHRequest().addPoint(start, 180.).addPoint(end, 90.).setVehicle("car").setWeighting("fastest");
         GHResponse response = new GHResponse();
         List<Path> paths = instance.calcPaths(req, response);
         assertFalse(response.hasErrors());
@@ -707,7 +753,7 @@ public class GraphHopperOSMTest {
 
     @Test
     public void testGetPathsDirectionEnforcement3() {
-        instance = createSquareGraphInstance(false);
+        instance = createSquareGraphInstance();
 
         // Start in middle of edge 4-5 
         GHPoint start = new GHPoint(0.0015, 0.002);
@@ -716,7 +762,7 @@ public class GraphHopperOSMTest {
         // Via Point betweeen 8-7
         GHPoint via = new GHPoint(0.0005, 0.001);
 
-        GHRequest req = new GHRequest().addPoint(start).addPoint(via, 0.).addPoint(end);
+        GHRequest req = new GHRequest().addPoint(start).addPoint(via, 0.).addPoint(end).setVehicle("car").setWeighting("fastest");
         GHResponse response = new GHResponse();
         List<Path> paths = instance.calcPaths(req, response);
         assertFalse(response.hasErrors());
@@ -726,7 +772,7 @@ public class GraphHopperOSMTest {
     @Test
     public void testGetPathsDirectionEnforcement4() {
         // Test straight via routing
-        instance = createSquareGraphInstance(false);
+        instance = createSquareGraphInstance();
 
         // Start in middle of edge 4-5 
         GHPoint start = new GHPoint(0.0015, 0.002);
@@ -734,7 +780,7 @@ public class GraphHopperOSMTest {
         GHPoint end = new GHPoint(0.002, 0.0005);
         // Via Point betweeen 8-3
         GHPoint via = new GHPoint(0.0015, 0.001);
-        GHRequest req = new GHRequest().addPoint(start).addPoint(via).addPoint(end);
+        GHRequest req = new GHRequest().addPoint(start).addPoint(via).addPoint(end).setVehicle("car").setWeighting("fastest");
         req.getHints().put(Routing.PASS_THROUGH, true);
         GHResponse response = new GHResponse();
         List<Path> paths = instance.calcPaths(req, response);
@@ -747,7 +793,7 @@ public class GraphHopperOSMTest {
     @Test
     public void testGetPathsDirectionEnforcement5() {
         // Test independence of previous enforcement for subsequent pathes
-        instance = createSquareGraphInstance(false);
+        instance = createSquareGraphInstance();
 
         // Start in middle of edge 4-5 
         GHPoint start = new GHPoint(0.0015, 0.002);
@@ -755,7 +801,7 @@ public class GraphHopperOSMTest {
         GHPoint end = new GHPoint(0.002, 0.0005);
         // First go south and than come from west to via-point at 7-6. Then go back over previously punished (11)-4 edge
         GHPoint via = new GHPoint(0.000, 0.0015);
-        GHRequest req = new GHRequest().addPoint(start, 0.).addPoint(via, 3.14 / 2).addPoint(end);
+        GHRequest req = new GHRequest().addPoint(start, 0.).addPoint(via, 3.14 / 2).addPoint(end).setVehicle("car").setWeighting("fastest");
         req.getHints().put(Routing.PASS_THROUGH, true);
         GHResponse response = new GHResponse();
         List<Path> paths = instance.calcPaths(req, response);
@@ -767,14 +813,14 @@ public class GraphHopperOSMTest {
     @Test
     public void testGetPathsDirectionEnforcement6() {
         // Test if query results at tower nodes are ignored
-        instance = createSquareGraphInstance(false);
+        instance = createSquareGraphInstance();
 
         // QueryPoints directly on TowerNodes 
         GHPoint start = new GHPoint(0, 0);
         GHPoint via = new GHPoint(0.002, 0.000);
         GHPoint end = new GHPoint(0.002, 0.002);
 
-        GHRequest req = new GHRequest().addPoint(start, 90.).addPoint(via, 270.).addPoint(end, 270.);
+        GHRequest req = new GHRequest().addPoint(start, 90.).addPoint(via, 270.).addPoint(end, 270.).setVehicle("car").setWeighting("fastest");
         GHResponse response = new GHResponse();
         List<Path> paths = instance.calcPaths(req, response);
         assertFalse(response.hasErrors());
@@ -782,7 +828,7 @@ public class GraphHopperOSMTest {
         assertArrayEquals(new int[]{2, 3, 4}, paths.get(1).calcNodes().toArray());
     }
 
-    private GraphHopper createSquareGraphInstance(boolean withCH) {
+    private GraphHopper createSquareGraphInstance() {
         CarFlagEncoder carEncoder = new CarFlagEncoder();
         EncodingManager encodingManager = EncodingManager.create(carEncoder);
         Weighting weighting = new FastestWeighting(carEncoder);
@@ -819,9 +865,8 @@ public class GraphHopperOSMTest {
         g.edge(7, 8, 110, true);
 
         GraphHopper tmp = new GraphHopperOSM().
-                setCHEnabled(withCH).
+                setCHEnabled(false).
                 setEncodingManager(encodingManager);
-        tmp.getCHPreparationHandler().setCHProfileStrings("fastest");
         tmp.setGraphHopperStorage(g);
         tmp.postProcessing();
 
@@ -833,20 +878,26 @@ public class GraphHopperOSMTest {
         HashMap<String, Long> shortcutCountMap = new HashMap<>();
         // try all parallelization modes        
         for (int threadCount = 1; threadCount < 6; threadCount++) {
-            EncodingManager em = EncodingManager.create(Arrays.asList(new CarFlagEncoder(), new MotorcycleFlagEncoder(),
-                    new MountainBikeFlagEncoder(), new RacingBikeFlagEncoder(), new FootFlagEncoder()));
-
-            GraphHopper tmpGH = new GraphHopperOSM().
+            EncodingManager em = EncodingManager.create(Arrays.asList(
+                    new CarFlagEncoder(),
+                    new MotorcycleFlagEncoder(),
+                    new MountainBikeFlagEncoder(),
+                    new RacingBikeFlagEncoder(),
+                    new FootFlagEncoder()));
+
+            GraphHopper hopper = new GraphHopperOSM().
                     setStoreOnFlush(false).
                     setEncodingManager(em).
                     setGraphHopperLocation(ghLoc).
                     setDataReaderFile(testOsm);
-            tmpGH.getCHPreparationHandler().setPreparationThreads(threadCount);
+            hopper.getCHPreparationHandler()
+                    .setCHProfileStrings("fastest")
+                    .setPreparationThreads(threadCount);
 
-            tmpGH.importOrLoad();
+            hopper.importOrLoad();
 
-            assertEquals(5, tmpGH.getCHPreparationHandler().getPreparations().size());
-            for (PrepareContractionHierarchies pch : tmpGH.getCHPreparationHandler().getPreparations()) {
+            assertEquals(5, hopper.getCHPreparationHandler().getPreparations().size());
+            for (PrepareContractionHierarchies pch : hopper.getCHPreparationHandler().getPreparations()) {
                 assertTrue("Preparation wasn't run! [" + threadCount + "]", pch.isPrepared());
 
                 String name = pch.getCHProfile().toFileName();
@@ -857,14 +908,14 @@ public class GraphHopperOSMTest {
                     assertEquals((long) singleThreadShortcutCount, pch.getShortcuts());
 
                 String keyError = Parameters.CH.PREPARE + "error." + name;
-                String valueError = tmpGH.getGraphHopperStorage().getProperties().get(keyError);
+                String valueError = hopper.getGraphHopperStorage().getProperties().get(keyError);
                 assertTrue("Properties for " + name + " should NOT contain error " + valueError + " [" + threadCount + "]", valueError.isEmpty());
 
                 String key = Parameters.CH.PREPARE + "date." + name;
-                String value = tmpGH.getGraphHopperStorage().getProperties().get(key);
+                String value = hopper.getGraphHopperStorage().getProperties().get(key);
                 assertFalse("Properties for " + name + " did NOT contain finish date [" + threadCount + "]", value.isEmpty());
             }
-            tmpGH.close();
+            hopper.close();
         }
     }
 
@@ -873,24 +924,28 @@ public class GraphHopperOSMTest {
         HashMap<String, Integer> landmarkCount = new HashMap<>();
         // try all parallelization modes
         for (int threadCount = 1; threadCount < 6; threadCount++) {
-            EncodingManager em = EncodingManager.create(Arrays.asList(new CarFlagEncoder(), new MotorcycleFlagEncoder(),
-                    new MountainBikeFlagEncoder(), new RacingBikeFlagEncoder(), new FootFlagEncoder()));
-
-            GraphHopper tmpGH = new GraphHopperOSM().
+            EncodingManager em = EncodingManager.create(Arrays.asList(
+                    new CarFlagEncoder(),
+                    new MotorcycleFlagEncoder(),
+                    new MountainBikeFlagEncoder(),
+                    new RacingBikeFlagEncoder(),
+                    new FootFlagEncoder()));
+
+            GraphHopper hopper = new GraphHopperOSM().
                     setStoreOnFlush(false).
                     setCHEnabled(false).
                     setEncodingManager(em).
                     setGraphHopperLocation(ghLoc).
                     setDataReaderFile(testOsm);
-            tmpGH.getLMPreparationHandler().
+            hopper.getLMPreparationHandler().
                     addLMProfileAsString("fastest").
                     setEnabled(true).
                     setPreparationThreads(threadCount);
 
-            tmpGH.importOrLoad();
+            hopper.importOrLoad();
 
-            assertEquals(5, tmpGH.getLMPreparationHandler().getPreparations().size());
-            for (PrepareLandmarks prepLM : tmpGH.getLMPreparationHandler().getPreparations()) {
+            assertEquals(5, hopper.getLMPreparationHandler().getPreparations().size());
+            for (PrepareLandmarks prepLM : hopper.getLMPreparationHandler().getPreparations()) {
                 assertTrue("Preparation wasn't run! [" + threadCount + "]", prepLM.isPrepared());
 
                 String name = prepLM.getLMProfile().getName();
@@ -901,14 +956,14 @@ public class GraphHopperOSMTest {
                     assertEquals((int) singleThreadShortcutCount, prepLM.getSubnetworksWithLandmarks());
 
                 String keyError = Parameters.Landmark.PREPARE + "error." + name;
-                String valueError = tmpGH.getGraphHopperStorage().getProperties().get(keyError);
+                String valueError = hopper.getGraphHopperStorage().getProperties().get(keyError);
                 assertTrue("Properties for " + name + " should NOT contain error " + valueError + " [" + threadCount + "]", valueError.isEmpty());
 
                 String key = Parameters.Landmark.PREPARE + "date." + name;
-                String value = tmpGH.getGraphHopperStorage().getProperties().get(key);
+                String value = hopper.getGraphHopperStorage().getProperties().get(key);
                 assertFalse("Properties for " + name + " did NOT contain finish date [" + threadCount + "]", value.isEmpty());
             }
-            tmpGH.close();
+            hopper.close();
         }
     }
 
diff --git a/reader-osm/src/test/java/com/graphhopper/reader/osm/OSMReaderTest.java b/reader-osm/src/test/java/com/graphhopper/reader/osm/OSMReaderTest.java
index b063f2cd4..c200a105d 100644
--- a/reader-osm/src/test/java/com/graphhopper/reader/osm/OSMReaderTest.java
+++ b/reader-osm/src/test/java/com/graphhopper/reader/osm/OSMReaderTest.java
@@ -945,16 +945,21 @@ public class OSMReaderTest {
                     throw new RuntimeException(e);
                 }
             }
-        }.setEncodingManager(new EncodingManager.Builder().add(new CarFlagEncoder()).add(new BikeFlagEncoder()).build()).
-                setGraphHopperLocation(dir).setCHEnabled(false).
-                importOrLoad();
-
-        GHResponse response = gh.route(new GHRequest(51.2492152, 9.4317166, 52.133, 9.1).setPathDetails(Arrays.asList(RoadClass.KEY)));
+        }.setEncodingManager(EncodingManager.create("car,bike")).
+                setGraphHopperLocation(dir)
+                .setCHEnabled(false).
+                        importOrLoad();
+
+        GHResponse response = gh.route(new GHRequest(51.2492152, 9.4317166, 52.133, 9.1)
+                .setVehicle("car").setWeighting("fastest")
+                .setPathDetails(Arrays.asList(RoadClass.KEY)));
         List<PathDetail> list = response.getBest().getPathDetails().get(RoadClass.KEY);
         assertEquals(3, list.size());
         assertEquals(RoadClass.MOTORWAY.toString(), list.get(0).getValue());
 
-        response = gh.route(new GHRequest(51.2492152, 9.4317166, 52.133, 9.1).setPathDetails(Arrays.asList(Toll.KEY)));
+        response = gh.route(new GHRequest(51.2492152, 9.4317166, 52.133, 9.1)
+                .setVehicle("car").setWeighting("fastest")
+                .setPathDetails(Arrays.asList(Toll.KEY)));
         Throwable ex = response.getErrors().get(0);
         assertTrue(ex.getMessage(), ex.getMessage().contains("You requested the details [toll]"));
     }
diff --git a/reader-osm/src/test/java/com/graphhopper/routing/RoutingAlgorithmWithOSMIT.java b/reader-osm/src/test/java/com/graphhopper/routing/RoutingAlgorithmWithOSMIT.java
index 9c991ecf0..5489c318a 100644
--- a/reader-osm/src/test/java/com/graphhopper/routing/RoutingAlgorithmWithOSMIT.java
+++ b/reader-osm/src/test/java/com/graphhopper/routing/RoutingAlgorithmWithOSMIT.java
@@ -619,7 +619,8 @@ public class RoutingAlgorithmWithOSMIT {
         final EncodingManager encodingManager = EncodingManager.create("car");
         final GraphHopper hopper = new GraphHopperOSM().
                 setStoreOnFlush(true).
-                setEncodingManager(encodingManager).setCHEnabled(false).
+                setEncodingManager(encodingManager).
+                setCHEnabled(false).
                 setWayPointMaxDistance(0).
                 setDataReaderFile(DIR + "/monaco.osm.gz").
                 setGraphHopperLocation(graphFile).