public void testDuplicateJSController() throws Exception {
DefDescriptor<ControllerDef> descriptor = DefDescriptorImpl
.getInstance("js://test.testDuplicateJSController",
ControllerDef.class);
Source<?> source = getJavascriptSourceLoader().getSource(descriptor);
Definition controller = parser.parse(descriptor, source);
assertTrue(controller instanceof JavascriptControllerDef);
JavascriptControllerDef obj = (JavascriptControllerDef) controller;
Map<String, JavascriptActionDef> controllerActions = obj
.getActionDefs();
assertTrue(controllerActions.containsKey("functionName"));