### Question:
EhcacheWebServiceEndpoint { @WebMethod public Cache getCache(String cacheName) throws CacheException { Ehcache ehcache = manager.getCache(cacheName); if (ehcache != null) { return new Cache(ehcache); } else { return null; } }  @WebMethod String ping(); @WebMethod Cache getCache(String cacheName); @WebMethod void addCache(String cacheName); @WebMethod void removeCache(String cacheName); @WebMethod String[] cacheNames(); @WebMethod Status getStatus(String cacheName); @WebMethod void put(String cacheName, Element element); @WebMethod Element get(String cacheName, String key); @WebMethod List getKeys(String cacheName); @WebMethod boolean remove(String cacheName, String key); @WebMethod List getKeysWithExpiryCheck(String cacheName); @WebMethod List getKeysNoDuplicateCheck(String cacheName); @WebMethod Element getQuiet(String cacheName, Object key); @WebMethod void putQuiet(String cacheName, Element element); @WebMethod boolean removeQuiet(String cacheName, String key); @WebMethod void removeAll(String cacheName); @WebMethod int getSize(String cacheName); @WebMethod Statistics getStatistics(String cacheName); @WebMethod void load(String cacheName, String key); @WebMethod void loadAll(String cacheName, Collection<String> keys); @WebMethod HashMap getAllWithLoader(String cacheName, Collection keys); @WebMethod Element getWithLoader(String cacheName, String key);  }### Answer:
@Test public void testGetCache() throws CacheException_Exception, NoSuchCacheException_Exception { Cache cache = cacheService.getCache("doesnotexist"); assertNull(cache); cache = cacheService.getCache("sampleCache1"); assertEquals("sampleCache1", cache.getName()); assertEquals("rest/sampleCache1", cache.getUri()); assertTrue(cache.getDescription().indexOf("sampleCache1") != -1); }