@Test
public void testGetSessionAttributes() throws Exception {

  Map<String, Object> attributes = new HashMap<String, Object>();
  attributes.put("foo", "bar");
  Cluster cluster = createMock(Cluster.class);
  ClustersImpl clusters =
      createMockBuilder(ClustersImpl.class).addMockedMethod("findCluster", String.class).createMock();
  expect(clusters.findCluster("c1")).andReturn(cluster);
  expect(cluster.getSessionAttributes()).andReturn(attributes);
  replay(clusters, cluster);
  assertEquals(attributes, clusters.getSessionAttributes("c1"));
  verify(clusters, cluster);
}