expectLastCall().anyTimes();
}
@SuppressWarnings("unchecked")
private void setupMockHistory(String tokenToReturn)
{
<BUG>expect(mockHistory.addValueChangeHandler(and(capture(capturedHistoryValueChangeHandler), isA(ValueChangeHandler.class)))).andReturn(createMock(HandlerRegistration.class)).anyTimes();
</BUG>
expect(mockHistory.getToken()).andReturn(tokenToReturn).anyTimes();
expect(mockHistory.getHistoryToken()).andReturn(HistoryToken.fromTokenString(tokenToReturn)).anyTimes();
mockHistory.fireCurrentHistoryState();

expectLastCall().anyTimes();
}
@SuppressWarnings("unchecked")
private void setupMockHistory(String tokenToReturn)
{
expect(mockHistory.addValueChangeHandler(and(capture(capturedHistoryValueChangeHandler), isA(ValueChangeHandler.class)))).andReturn(mockHandlerRegistration()).anyTimes();
expect(mockHistory.getToken()).andReturn(tokenToReturn).anyTimes();
expect(mockHistory.getHistoryToken()).andReturn(HistoryToken.fromTokenString(tokenToReturn)).anyTimes();
mockHistory.fireCurrentHistoryState();
