Router implements PValueChangeHandler<String> { public void push(Scene scene) { scenes.put(scene.getToken(), scene); scene.addLifeCycleListener(listener); } Router(String name); void push(Scene scene); void go(String sceneID); @Override void onValueChange(PValueChangeEvent<String> event); void setLayout(PSimplePanel layout);  }
@Test public void testHistoryChangedWithoutLayout() { final Router router = new Router("testHistoryChangedWithoutLayout"); AbstractScene scene = new AbstractScene("id", "name", "token") { @Override public PWidget buildGUI() { return Element.newPLabel("tests"); } }; router.push(scene); UIContext.get().getHistory().newItem("token", true); assertFalse(scene.isStarted()); }