@Test public void return_the_fallback_when_running_in_development_mode() throws Exception { ActorSystem system = ActorSystem.create("MySystem"); URI fallback = new URI("/fallback"); LocationCache cache = new LocationCache(); ConnectionContext cc = ConnectionContext.create(system); Timeout timeout = new Timeout(Duration.create(5, "seconds")); assertEquals( Await.result( LocationService.getInstance().lookupWithContext("/whatever", fallback, cache, cc), timeout.duration()), Option.some(fallback)); }
@Override public Option<Integer> squareNowPlease(int i) { return Option.some(cal(i)); }
public Option<Integer> squareNowPlease(int i) { return Option.some(i * i); }