when(user.getName()).thenReturn("bob");
when(user.hasCredential(eq(keyPassword), eq("secret"))).thenReturn(Boolean.TRUE);
when(m_userAdmin.getUser(eq(keyUsername), eq("bob"))).thenReturn(user);
User result = processor.authenticate(m_userAdmin, m_servletRequest);
assert result != null : "Expected a valid user to be returned!";
assert "bob".equals(user.getName()) : "Expected user bob to be returned!";
}