@Test
public void testAuthenticate() throws Exception {
RedmineAuthProvider redmine = newRedmineAuthentication();
redmine.setTestingCurrentUserAsJson(JSON);
UserModel userModel = redmine.authenticate("RedmineAdminId", "RedmineAPIKey".toCharArray());
assertThat(userModel.getName(), is("redmineadminid"));
assertThat(userModel.getDisplayName(), is("baz foo"));
assertThat(userModel.emailAddress, is("baz@example.com"));
assertNotNull(userModel.cookie);
}