### Question:
EhcacheWebServiceEndpoint { @WebMethod public List getKeys(String cacheName) throws IllegalStateException, CacheException { net.sf.ehcache.Cache cache = lookupCache(cacheName); return cache.getKeys(); }  @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 testGetKeys() throws NoSuchCacheException_Exception, CacheException_Exception, IllegalStateException_Exception { for (int i = 0; i < 1000; i++) { Element element = new Element(); element.setKey(i); element.setValue(("value" + i).getBytes()); cacheService.put("sampleCache1", element); } List keys = cacheService.getKeys("sampleCache1"); assertEquals(1000, keys.size()); keys = cacheService.getKeysWithExpiryCheck("sampleCache1"); assertEquals(1000, keys.size()); keys = cacheService.getKeysNoDuplicateCheck("sampleCache1"); assertEquals(1000, keys.size()); }