RouteTokenFormatter implements TokenFormatter { @Override public List<PlaceRequest> toPlaceRequestHierarchy(String historyToken) throws TokenFormatException { List<PlaceRequest> result = new ArrayList<>(); result.add(toPlaceRequest(historyToken)); return result; } @Inject  RouteTokenFormatter(UrlUtils urlUtils,
                        PlaceTokenRegistry tokenRegistry); @Override String toPlaceToken(PlaceRequest placeRequest); @Override String toHistoryToken(List<PlaceRequest> placeRequestHierarchy); @Override PlaceRequest toPlaceRequest(String placeToken); @Override List<PlaceRequest> toPlaceRequestHierarchy(String historyToken);  }
@Test public void testToPlaceRequestHierarchy() { tokenFormatter = spy(tokenFormatter); String historyToken = "token"; tokenFormatter.toPlaceRequestHierarchy(historyToken); verify(tokenFormatter).toPlaceRequest(historyToken); }