scope.addModule(moduleB);
final ErlSearchQuery query = new ErlSearchQuery(ref, scope, "");
query.run(new NullProgressMonitor());
// then
// it should be found in module b
final ErlangSearchResult searchResult = (ErlangSearchResult) query
.getSearchResult();
assertEquals(nFoundExpected, searchResult.getMatchCount());
final List<ErlangSearchElement> result = searchResult.getResult();
if (limitTo == LimitTo.REFERENCES) {
// f is only referred in moduleB, but declarations matches in any
// module as long as arity and name are equal
assertFalse(hasModule(moduleA, result));
} else {