DNN-5990 Changed method to retrieve results for a search in the tests