@Test
public void testHandleUsernameToken() throws Exception {

	UserDetailsService userDetailsService = createMock(UserDetailsService.class);
	callbackHandler.setUserDetailsService(userDetailsService);
	expect(userDetailsService.loadUserByUsername("Ernie")).andReturn(user).anyTimes();
	replay(userDetailsService);
	callbackHandler.handleUsernameToken(passwordCallback);
	Assert.assertEquals("Bert", passwordCallback.getPassword());
	verify(userDetailsService);
}