/**
* Tests to verify the APIs on Action to mark actions as storable.
*/
public void testStorable() throws Exception {
ControllerDef controller = getJavaController("java://org.auraframework.impl.java.controller.TestController");
Action freshAction = controller.createAction("getString", null);
assertTrue("Expected an instance of JavaAction", freshAction instanceof JavaAction);
JavaAction action = (JavaAction) freshAction;
assertFalse("Actions should not be storable by default.", action.isStorable());
action.run();
assertFalse("isStorabel should not change values after action execution.", action.isStorable());
Action storableAction = controller.createAction("getString", null);
action = (JavaAction) storableAction;
action.setStorable();
assertTrue("Failed to mark a action as storable.", action.isStorable());
action.run();
assertTrue("Storable action was unmarked during execution", action.isStorable());