### Question:
DefaultWidgetMarketplaceService implements WidgetMarketplaceService { @Override public SearchResult<Widget> getWidgetsByFreeTextSearch(String searchTerm, int offset, int pageSize) throws Exception{ if (getStoreUrl() == null) throw new Exception("External marketplace URL not configured"); String encodedSearchTerm = searchTerm; String url = getStoreUrl() + SEARCH; url = url.replace("${SEARCHTERM}", encodedSearchTerm); url = url.replace("${OFFSET}", String.valueOf(offset)); url = url.replace("${LIMIT}", String.valueOf(pageSize)); SearchResult<Widget> result = executeQuery(url); result.setOffset(offset); result.setPageSize(pageSize); return result; } @Autowired  DefaultWidgetMarketplaceService(RemoteWidgetResolverService widgetResolverService, PortalPreferenceService pps); @Override SearchResult<Widget> getWidgetsByFreeTextSearch(String searchTerm,
            int offset, int pageSize); @Override SearchResult<Widget> getWidgetsByCategory(String category, int offset,
            int pageSize); @SuppressWarnings("unchecked") @Override List<String> getCategories(); @Override Widget getWidget(String id); @Override Widget addWidget(Widget widget); @Override Widget resolveWidgetMetadata(String url, String type);  }### Answer:
@Ignore @Test public void getSearchResults() throws Exception{ SearchResult<Widget> results = service.getWidgetsByFreeTextSearch("wookie", 0, 10); for (Widget widget: results.getResultSet()){ System.out.println(widget.getTitle()); } System.out.println(results.getTotalResults() + " total results"); }