AliasedDirectoryResource implements Resource { public File getRootDirectory() { return this.rootDirectory; } AliasedDirectoryResource();  AliasedDirectoryResource(File rootDirectory, String alias); @Override URL getResource(String location); @Override InputStream getResourceAsStream(String location); @Override Stream<String> getAllLocations(); String getAlias(); File getRootDirectory(); void setAlias(String alias); void setRootDirectory(File rootDirectory);  }
@Test void testGetRootDirectory() { AliasedDirectoryResource resource = new AliasedDirectoryResource(); resource.setRootDirectory(new File("src/main/java")); resource.setAlias("/alias"); assertNotNull(resource.getRootDirectory()); }