@nicolaasmatthijs a SearchQuery makes sense for a "general" search, not necessarily for all searches (e.g., relatedcontent). I think we discussed before having additional methods such as `generalSearch`, `librarySearch`, `membersSearch`, etc... in the respective RestAPI modules.

We could do the following:

1. Set up the specific searches in their own RestAPI modules which delegate to RestAPI.Search.search
2. The SearchTestsUtil.searchAll method could have the following signature:

a) First parameter is optionally a function, if not, fall back to the core RestAPI.Search.search method
b) Following parameters are the parameters to the function given in the first parameter (or similarly the RestAPI.Search.search method)
c) The last parameter is the callback to be invoked when search completes

So a general search would look something like:

`SearchTestsUtil.searchAll(RestAPI.Search.generalSearch, restContext, 'Test', {'resourceTypes': 'content'}, function(err, results) {...`

As long as the search model is the same for all search types, this would be possible, and lets you have better control over the signature for the different modules. It should also be backward compatible with all the current search invocations.

What do you think?