SlingFolderVirtualPage implements Page { @Override public String getName() { return resource.getName(); } SlingFolderVirtualPage(Resource resource); @Override String getDescription(); @SuppressWarnings({ "unchecked", "null" }) @Override AdapterType adaptTo(Class<AdapterType> type); @Override boolean canUnlock(); @Override Page getAbsoluteParent(int level); @Override Resource getContentResource(); @Override Resource getContentResource(String path); @Override int getDepth(); @Override Locale getLanguage(boolean ignoreContent); @Override Locale getLanguage(); @Override Calendar getLastModified(); @Override String getLastModifiedBy(); @Override String getLockOwner(); @Override String getName(); @Override String getNavigationTitle(); @Override Calendar getOffTime(); @Override Calendar getOnTime(); @Override PageManager getPageManager(); @Override String getPageTitle(); @Override Page getParent(); @Override Page getParent(int level); @Override String getPath(); @Override ValueMap getProperties(); @Override ValueMap getProperties(String path); @Override Tag[] getTags(); @Override Template getTemplate(); @Override String getTitle(); @Override String getVanityUrl(); @Override boolean hasChild(String name); @Override boolean hasContent(); @Override boolean isHideInNav(); @Override boolean isLocked(); @Override boolean isValid(); @Override Iterator<Page> listChildren(); @Override Iterator<Page> listChildren(final Filter<Page> filter); @Override Iterator<Page> listChildren(final Filter<Page> filter, final boolean deep); @Override void lock(); @Override long timeUntilValid(); @Override void unlock(); @Override Calendar getDeleted(); @Override String getDeletedBy();  }
@Test void testGetName() { when(resource.getName()).thenReturn("name1"); assertEquals("name1", underTest.getName()); }