"ex.newMethod(c,d)";
Document doc = new Document(d);
IModule module = AbstractModule.createModuleFromDoc("", null, doc, nature, true);
Definition[] defs = (Definition[]) module.findDefinition(
CompletionStateFactory.getEmptyCompletionState("ex", nature, new CompletionCache()), 3, 3, nature);
assertEquals(1, defs.length);
assertEquals("ex", ((AssignDefinition) defs[0]).target);
assertEquals("assist.ExistingClass", defs[0].value);
assertSame(module, defs[0].module);
defs = (Definition[]) module.findDefinition(
CompletionStateFactory.getEmptyCompletionState("assist.ExistingClass", nature, new CompletionCache()),
2, 6, nature);
assertEquals(1, defs.length);
assertEquals("ExistingClass", defs[0].value);
assertNotSame(module, defs[0].module);
assertEquals("testAssist.assist", defs[0].module.getName());