List<OpenSearchQuery> queryArray = openSearchDescriptor.getQuery();
if (urlArray == null || urlArray.size() == 0) {
assertFalse("Open Search Query is not defined", true);
} else {
OpenSearchQuery openSearchQuery = queryArray.get(0);
assertEquals("Expected and actual values of Count are not same ",
COUNT,
openSearchQuery.getCount().toString());
assertEquals("Expected and actual values of Input Encoding are not same ",
ENCODING,
openSearchQuery.getInputEncoding());
assertEquals("Expected and actual values of Language are not same ",
LANG,
openSearchQuery.getLanguage());
assertEquals("Expected and actual values of Output Encoding are not same ",
ENCODING,
openSearchQuery.getOutputEncoding());
assertEquals("Expected and actual values of QueryRole are not same ",
OpenSearchQuery.QueryRole.example.toString(),
openSearchQuery.getRole());
assertEquals("Expected and actual values of SearchTerms are not same ",
SEARCH_TERM,
openSearchQuery.getSearchTerms());
assertEquals("Expected and actual values of Start Index are not same ",
START_INDEX,
openSearchQuery.getStartIndex().toString());
assertEquals("Expected and actual values of StartPage are not same ",
START_PAGE,
openSearchQuery.getStartPage().toString());
assertEquals("Expected and actual values of Title are not same ",
TITLE,
openSearchQuery.getTitle());
assertEquals("Expected and actual values of TotalResults are not same ",
TOTAL_RESULT,
openSearchQuery.getTotalResults().toString());
}
}