*/
public void testCreateActionMapping() {
PackageConfig packageConfig = config.getPackageConfig(PACKAGE_NAME);
com.opensymphony.xwork2.config.entities.ActionConfig actionConfig =
(com.opensymphony.xwork2.config.entities.ActionConfig) packageConfig.getActionConfigs().get("action1");
ActionMapping mapping = factory.createActionMapping(actionConfig);
assertNotNull(mapping);
assertNotNull(mapping.findForward("result1"));
assertNotNull(mapping.findForwardConfig("result2"));
ForwardConfig[] configs = mapping.findForwardConfigs();
assertNotNull(configs);
assertEquals(2, configs.length);
String[] forwards = mapping.findForwards();
assertNotNull(forwards);
assertEquals(2, forwards.length);
ActionForward fwd = mapping.findForward("result1");
assertNotNull(fwd);
assertEquals("result1", fwd.getName());
assertNotNull(mapping.findException(NullPointerException.class));
assertNotNull(mapping.findExceptionConfig("java.lang.IllegalStateException"));
ExceptionConfig[] exceptionConfigs = mapping.findExceptionConfigs();
assertNotNull(exceptionConfigs);
assertEquals(3, exceptionConfigs.length);
ModuleConfig moduleConfig = mapping.getModuleConfig();
assertNotNull(moduleConfig);
// For now, the path will be null if the ActionMapping was created on its own (as opposed to from a
// WrapperModuleConfig, which knows the path).
assertNull(mapping.getPath());
// These methods are currently not implemented -- replace as functionality is added.
assertNYI(mapping, "getInputForward", null);
assertNYI(mapping, "getForward", null);
assertNYI(mapping, "getInclude", null);