CachingContentStoreImpl extends ContentStoreImpl { @Override public List<String> getSpaces() throws ContentStoreException { log.debug("enter: getSpaces()"); if (null == this.spaces) { log.debug("populating cache."); this.spaces = super.getSpaces(); } return this.spaces; } CachingContentStoreImpl(String baseURL,
                                   StorageProviderType type,
                                   String storeId,
                                   Boolean writable,
                                   RestHttpHelper restHelper); @Override List<String> getSpaces();  }
@Test public void testGetSpaces() throws Exception { contentStore.getSpaces(); contentStore.getSpaces(); EasyMock.verify(restHttpHelper); }