### Question:
UIEERepositoryDirectory extends UIRepositoryDirectory implements IAclObject, java.io.Serializable { @Override public boolean hasAccess( RepositoryFilePermission perm ) throws KettleException { if ( hasAccess == null ) { hasAccess = new HashMap<RepositoryFilePermission, Boolean>(); } if ( hasAccess.get( perm ) == null ) { hasAccess.put( perm, new Boolean( aclService.hasAccess( getObjectId(), perm ) ) ); } return hasAccess.get( perm ).booleanValue(); } UIEERepositoryDirectory();  UIEERepositoryDirectory( RepositoryDirectoryInterface rd, UIRepositoryDirectory uiParent, Repository rep ); void getAcls( UIRepositoryObjectAcls acls, boolean forceParentInheriting ); void getAcls( UIRepositoryObjectAcls acls ); void setAcls( UIRepositoryObjectAcls security ); void delete( boolean deleteHomeDirectories ); void setName( String name, boolean renameHomeDirectories ); @Override void clearAcl(); @Override boolean hasAccess( RepositoryFilePermission perm );  }### Answer:
@Test public void testAccess() throws Exception { when( mockAclService.hasAccess( mockObjectId, RepositoryFilePermission.READ ) ).thenReturn( true ); when( mockAclService.hasAccess( mockObjectId, RepositoryFilePermission.WRITE ) ).thenReturn( false ); assertTrue( uiPurRepDir.hasAccess( RepositoryFilePermission.READ ) ); assertFalse( uiPurRepDir.hasAccess( RepositoryFilePermission.WRITE ) ); }