### Question:
SearchTemplate extends AbstractTwitterOperations implements SearchOperations { public SavedSearch createSavedSearch(String query) { requireUserAuthorization(); MultiValueMap<String, Object> data = new LinkedMultiValueMap<String, Object>(); data.set("query", query); return restTemplate.postForObject(buildUri("saved_searches/create.json"), data, SavedSearch.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 createSavedSearch() { mockServer.expect(requestTo("https: .andExpect(method(POST)) .andExpect(content().string("query=%23twitter")) .andRespond(withSuccess(jsonResource("saved-search"), APPLICATION_JSON)); SavedSearch savedSearch = twitter.searchOperations().createSavedSearch("#twitter"); assertEquals(26897775, savedSearch.getId()); assertEquals("#springsocial", savedSearch.getQuery()); assertEquals("#springsocial", savedSearch.getName()); assertEquals(0, savedSearch.getPosition()); mockServer.verify(); }