### Question:
SearchTemplate extends AbstractTwitterOperations implements SearchOperations { public List<SavedSearch> getSavedSearches() { requireUserAuthorization(); return restTemplate.getForObject(buildUri("saved_searches/list.json"), SavedSearchList.class); } SearchTemplate(RestTemplate restTemplate, boolean isAuthorizedForUser, boolean isAuthorizedForApp); SearchResults search(String query); SearchResults search(String query, int resultsPerPage); SearchResults search(String query, int resultsPerPage, long sinceId, long maxId); SearchResults search(SearchParameters searchParameters); List<SavedSearch> getSavedSearches(); SavedSearch getSavedSearch(long searchId); SavedSearch createSavedSearch(String query); void deleteSavedSearch(long searchId); Trends getLocalTrends(long whereOnEarthId); Trends getLocalTrends(long whereOnEarthId, boolean excludeHashtags);  }### Answer:
@Test public void getSavedSearches() { mockServer.expect(requestTo("https: .andExpect(method(GET)) .andRespond(withSuccess(jsonResource("saved-searches"), APPLICATION_JSON)); List<SavedSearch> savedSearches = twitter.searchOperations().getSavedSearches(); assertEquals(2, savedSearches.size()); SavedSearch search1 = savedSearches.get(0); assertEquals(26897775, search1.getId()); assertEquals("#springsocial", search1.getQuery()); assertEquals("#springsocial", search1.getName()); assertEquals(0, search1.getPosition()); SavedSearch search2 = savedSearches.get(1); assertEquals(56897772, search2.getId()); assertEquals("#twitter", search2.getQuery()); assertEquals("#twitter", search2.getName()); assertEquals(1, search2.getPosition()); }