historyStep = (Step) historySteps.get(historySteps.size() - 1);
historyStep = (Step) historySteps.get(0);
    public void testBasicCommonAction() throws Exception {        URL url = getClass().getResource("/samples/common-actions.xml");        long id = workflow.initialize(url.toString(), 50, null);        assertEquals("Unexpected workflow state", WorkflowEntry.ACTIVATED, workflow.getEntryState(id));        //verify that a common action can be called        workflow.doAction(id, 100, null);        List historySteps = workflow.getHistorySteps(id);        Step historyStep = (Step) historySteps.get(0);        assertEquals("Unexpected old status set", "Restarted", historyStep.getStatus());        //now let's move to step 2        workflow.doAction(id, 1, null);        //now let's check if we can call a non-specified common action        try {            workflow.doAction(id, 100, null);            fail("Should not be able to call non-explicitly specified common-action");        } catch (InvalidActionException e) {        }        //now test -1 stepId stuff.        workflow.doAction(id, 101, null);        historySteps = workflow.getHistorySteps(id);        historyStep = (Step) historySteps.get(historySteps.size() - 1);        assertEquals("Unexpected old status set", "Finished", historyStep.getStatus());    }