Router implements PValueChangeHandler<String> { public void go(String sceneID) { if (!scenes.containsKey(sceneID)) { log.warn("scene {} not found in the router {}", sceneID, name); } else { UIContext.get().getHistory().newItem(sceneID, true); } } Router(String name); void push(Scene scene); void go(String sceneID); @Override void onValueChange(PValueChangeEvent<String> event); void setLayout(PSimplePanel layout);  }
@Test public void testBadRoute() { final Router router = new Router("testBadRoute"); router.go("fake"); assertNotEquals("fake", UIContext.get().getHistory().getToken()); }