@Test
public void testGetAttribute() throws Exception {

  HttpSession session = createNiceMock(HttpSession.class);
  AmbariSessionManager sessionManager =
      createMockBuilder(AmbariSessionManager.class).addMockedMethod("getHttpSession").createMock();
  expect(sessionManager.getHttpSession()).andReturn(session);
  expect(session.getAttribute("foo")).andReturn("bar");
  replay(session, sessionManager);
  assertEquals("bar", sessionManager.getAttribute("foo"));
  verify(session, sessionManager);
}