SolutionRepositoryVfsFileObject implements FileObject { public IUnifiedRepository getRepository() { return repository; } SolutionRepositoryVfsFileObject( final String fileRef ); IUnifiedRepository getRepository(); IRepositoryContentConverterHandler getConverterHandler(); String getFileRef(); FileName getName(); URL getURL(); boolean exists(); boolean isHidden(); boolean isReadable(); boolean isWriteable(); FileType getType(); FileObject getParent(); @Override String getPublicURIString(); FileSystem getFileSystem(); FileObject[] getChildren(); FileObject getChild( final String arg0 ); FileObject resolveFile( final String arg0, final NameScope arg1 ); @Override boolean setExecutable( boolean executable, boolean ownerOnly ); @Override boolean setReadable( boolean readable, boolean ownerOnly ); @Override boolean setWritable( boolean writable, boolean ownerOnly ); FileObject resolveFile( final String arg0 ); FileObject[] findFiles( final FileSelector arg0 ); void findFiles( final FileSelector arg0, final boolean arg1, final List arg2 ); boolean delete(); int delete( final FileSelector arg0 ); @Override int deleteAll(); void createFolder(); void createFile(); void copyFrom( final FileObject arg0, final FileSelector arg1 ); void moveTo( final FileObject arg0 ); boolean canRenameTo( final FileObject arg0 ); FileContent getContent(); void close(); void refresh(); boolean isAttached(); boolean isContentOpen(); @Override boolean isExecutable(); @Override boolean isFile(); @Override boolean isFolder(); FileOperations getFileOperations(); InputStream getInputStream(); @VisibleForTesting static void setTestAclHelper( IAclNodeHelper helper ); @Override int compareTo( FileObject file ); @Override Iterator<FileObject> iterator();  }
@Test public void testGetRepo( @mockit.Mocked IUnifiedRepository mockUnifiedRepository ) { Deencapsulation.setField( SolutionRepositoryVfsFileObject.class, "repository", mockUnifiedRepository ); SolutionRepositoryVfsFileObject solutionRepositoryVfsFileObject = new SolutionRepositoryVfsFileObject( "dummyFileRef" ); assertThat( solutionRepositoryVfsFileObject.getRepository(), is( mockUnifiedRepository ) ); }