public void setUp() throws Exception {
webClient = new WebClient();
// NicelyResynchronizingAjaxController changes XHR calls from asynchronous
// to synchronous, saving the test from needing to wait or sleep for XHR
// completion.
webClient.setAjaxController(new NicelyResynchronizingAjaxController());
webClient.setHTMLParserListener(HTMLParserListener.LOG_REPORTER);
alertHandler = new CollectingAlertHandler();
webClient.setAlertHandler(alertHandler);
token = createToken("canonical", "john.doe");