when(user.getName()).thenReturn("bob");
when(user.hasCredential(eq("password"), eq("secret"))).thenReturn(Boolean.TRUE);
when(m_userAdmin.getUser(eq("username"), eq("bob"))).thenReturn(user);
User result = new BasicHttpAuthenticationProcessor().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!";
}