PlaceHistoryHandler { public PlaceRequest getPerspectiveFromPlace(final PlaceRequest place) { return BookmarkableUrlHelper.getPerspectiveFromPlace(place); } PlaceHistoryHandler(); void handleCurrentHistory(); HandlerRegistration initialize(final PlaceManager placeManager,
                                          final EventBus eventBus,
                                          final PlaceRequest defaultPlaceRequest); String getCurrentBookmarkableURLStatus(); PlaceRequest getPerspectiveFromPlace(final PlaceRequest place); void registerOpen(Activity activity,
                             PlaceRequest place); void registerClose(Activity activity,
                              PlaceRequest place); void flush(); String getToken(); void registerOpenDock(@Observes UberfireDocksInteractionEvent event); void registerCloseDock(@Observes UberfireDocksInteractionEvent event);  }
@Test public void testPerspectiveFromUrlSimple() { PlaceRequest req = new DefaultPlaceRequest("perspective"); PlaceRequest place = BookmarkableUrlHelper.getPerspectiveFromPlace(req); assertNotNull(place); assertEquals("perspective", place.getIdentifier()); assertSame(place, req); }
@Test public void testPerspectiveFromUrlWithHistory() { final String REQUEST = "perspective|secreenOne,~screenTwo$screenThree"; PlaceRequest req = new DefaultPlaceRequest(REQUEST); PlaceRequest place = BookmarkableUrlHelper.getPerspectiveFromPlace(req); assertNotNull(place); assertEquals("perspective", place.getIdentifier()); assertNotSame(place, req); }