If Spark.getInstance() was public you could pass a Service into your route initializer. At runtime, that could be the shared Spark.getInstance, and in a test, that could be a custom instance. Likewise, if Service had a getRoutes() method, you could lookup a Route in a test case, and call .handle(..) on it directly.
If Spark.getInstance() was public you could pass a Service into your route initializer. At runtime, that could be the shared Spark.getInstance, and in a test, that could be a custom instance. Likewise, if Service had a getRoutes() method, you could lookup a Route in a test case, and call .handle(..) on it directly.