Document doc = new Document(d);
SourceModule module = (SourceModule) AbstractModule.createModuleFromDoc("", null, doc, nature, true);
Module ast = (Module) module.getAst();
assertEquals(1, ast.body.length);
ICompletionState emptyCompletionState = CompletionStateFactory.getEmptyCompletionState("args", nature,
new CompletionCache());
Definition[] defs = (Definition[]) module.findDefinition(emptyCompletionState, 2, 7, nature);
assertEquals(1, defs.length);
assertEquals(1, defs[0].line);