### Question:
ContentMapperCacheWrapper extends AbstractCacheWrapper implements IContentMapperCacheWrapper { @Override public String getPageCode(String dataId) { ContentPageMapper contentPageMapper = this.get(CONTENT_MAPPER_CACHE_KEY, ContentPageMapper.class); if (null != contentPageMapper) { return contentPageMapper.getPageCode(dataId); } return null; }  @Override void initCache(IPageManager pageManager); @Override String getPageCode(String dataId);  }### Answer:
@Test public void testGetPageCode() throws Throwable { ContentPageMapper contentPageMapper = new ContentPageMapper(); contentPageMapper.add("ART12", "temp_page"); contentPageMapper.add("NEW56", "wring_page"); Mockito.when(valueWrapper.get()).thenReturn(contentPageMapper); Mockito.when(cache.get(Mockito.anyString())).thenReturn(valueWrapper); Mockito.when(cacheManager.getCache(Mockito.anyString())).thenReturn(this.cache); String pageCode = this.cacheWrapper.getPageCode("ART12"); Assert.assertNotNull(pageCode); Assert.assertEquals("temp_page", pageCode); }