### Question:
Actions { public boolean perform(Class actionClass, Object... args) throws ArgumentsValidationException { Action action = getAction(actionClass); if (action != null && action.isEnabled()) { if (action.validate(args)) { Gdx.app.debug("Controller", ClassReflection.getSimpleName(actionClass) + prettyPrintArgs(args)); logAction(action.getClass(), args); if (action instanceof ModelAction) { modelActions.perform((ModelAction) action, args); } else if (action instanceof EditorAction) { editorActions.perform((EditorAction) action, args); } if (action.isTrackable()) { controller.getTracker().actionPerformed(actionClass, true); } return true; } else { if (action.isTrackable()) { controller.getTracker().actionPerformed(actionClass, false); } throw new ArgumentsValidationException(actionClass, args); } } else { Gdx.app.debug("Actions", "Action with class " + actionClass + (action == null ? " does not exist." : " is disabled.")); } return false; } Actions(Controller controller); T getAction(Class<T> actionClass); boolean perform(Class actionClass, Object... args); void addActionListener(Class actionClass, ActionListener listener); boolean isEnabled(Class actionClass); Array<TimestampedEditorAction> getLoggedActions(int nActions);  }### Answer:
@Test public void testValidationOfSingleAndMultipleArguments() { try { actions.perform(EmptyValidArguments.class); actions.perform(TwoArgumentsAction.class, "", true); actions.perform(MultipleValidArguments.class, "", true); actions.perform(MultipleValidArguments.class); actions.perform(MultipleValidArguments.class, 50); } catch (ArgumentsValidationException e) { fail("Error testing validation of the list of arguments " + e.getMessage()); } }
@Test public void testAction() { try { actions.perform(MockEditorAction.class, 50); assertEquals(resultPerformMethod, 50); } catch (ArgumentsValidationException e) { fail(e.getMessage()); } }
@Test public void testInvalidArguments() { try { actions.perform(MockEditorAction.class, "ñor"); fail("Exception should be launched"); } catch (ArgumentsValidationException e) { } }