@Test
public void testGetLastStageId() {

  RequestStageContainer requestStages = new RequestStageContainer(1L, null, null, null);
  assertEquals(-1, requestStages.getLastStageId());
  Stage stage1 = createNiceMock(Stage.class);
  Stage stage2 = createNiceMock(Stage.class);
  List<Stage> listStages = new ArrayList<Stage>();
  listStages.add(stage1);
  listStages.add(stage2);
  expect(stage2.getStageId()).andReturn(22L);
  replay(stage1, stage2);
  requestStages = new RequestStageContainer(1L, listStages, null, null);
  assertEquals(22, requestStages.getLastStageId());
}