final IProject project = project1.getWorkspaceProject();
final IProjectDescription description = project.getDescription();
final IProject[] refs = new IProject[] { project2.getWorkspaceProject() };
description.setReferencedProjects(refs);
project.setDescription(description, null);
final IErlModule module = createModule(project2, "abc.erl",
"-module(abc).\n-export(f/0)\nf() ->\n {abc, ok}.\n");
createModule(project1, "bbc.erl",
"-module(bbc).\n-export(f/0)\nf() ->\n {abc, ok}.\n");
// when
// looking for module with prefix, it should be found
final List<String> moduleNames = modelUtilService.findUnitsWithPrefix("a",
project1, false, false);
// then
// we should find it
assertNotNull(moduleNames);
assertEquals(1, moduleNames.size());
assertEquals(module.getModuleName(), moduleNames.get(0));
}