RepositoryUtils { public RepositoryFile getFolder( final String path, final boolean createIfNotExist, final boolean createParents, final String versionMessage ) { return getFolder( path, null, createIfNotExist, createParents, versionMessage ); } RepositoryUtils( final IUnifiedRepository repository ); IUnifiedRepository getRepository(); RepositoryFile getFolder( final String path, final boolean createIfNotExist, final boolean createParents,
      final String versionMessage ); RepositoryFile getFolder( final String path, final RepositoryFileAcl acl, final boolean createIfNotExist,
      final boolean createParents, final String versionMessage ); RepositoryFile getFile( final String path, final IRepositoryFileData data, final boolean createIfNotExist,
      final boolean createParents, final String versionMessage ); RepositoryFile saveFile( final String filePath, final IRepositoryFileData data, final boolean create,
      final boolean overwrite, final boolean createParentDirs, final boolean versioned, final String versionMessage );  }
@Test public void testGetFolder() throws Exception { final MockUnifiedRepository repository = new MockUnifiedRepository( new SpringSecurityCurrentUserProvider() ); final RepositoryUtils repositoryUtils = new RepositoryUtils( repository ); RepositoryFile test = repositoryUtils.getFolder( "/public/one/two/three", true, true, null ); assertNotNull( test ); assertEquals( "The folder name is invalid", "three", test.getName() ); assertEquals( "The path is invalid", "/public/one/two/three", test.getPath() ); assertTrue( "The folder should be defined as a folder", test.isFolder() ); RepositoryFile one = repositoryUtils.getFolder( "/public/one", false, false, null ); assertNotNull( one ); RepositoryFile two = repositoryUtils.getFolder( "/public/one/two", false, false, null ); assertNotNull( two ); }