JGitFileSystemImpl implements JGitFileSystem { @Override public Set<String> supportedFileAttributeViews() { checkClosed(); return SUPPORTED_ATTR_VIEWS; } JGitFileSystemImpl(final JGitFileSystemProvider provider,
                              final Map<String, String> fullHostNames,
                              final Git git,
                              final JGitFileSystemLock lock,
                              final String name,
                              final CredentialsProvider credential,
                              JGitFileSystemsEventsManager fsEventsManager,
                              Map<FileSystemHooks, ?> fsHooks); @Override String id(); @Override String getName(); @Override Git getGit(); @Override CredentialsProvider getCredential(); @Override FileSystemProvider provider(); @Override boolean isOpen(); @Override boolean isReadOnly(); @Override String getSeparator(); @Override Iterable<Path> getRootDirectories(); @Override Iterable<FileStore> getFileStores(); @Override Set<String> supportedFileAttributeViews(); @Override Path getPath(final String first,
                        final String... more); @Override PathMatcher getPathMatcher(final String syntaxAndPattern); @Override UserPrincipalLookupService getUserPrincipalLookupService(); @Override WatchService newWatchService(); @Override void close(); @Override void checkClosed(); @Override boolean equals(Object o); @Override String toString(); @Override int hashCode(); @Override void publishEvents(final Path watchableRoot,
                              final List<WatchEvent<?>> elist); @Override void dispose(); @Override boolean isOnBatch(); @Override void setState(String state); @Override CommitInfo buildCommitInfo(final String defaultMessage,
                                      final CommentedOption op); @Override void setBatchCommitInfo(final String defaultMessage,
                                   final CommentedOption op); @Override void setHadCommitOnBatchState(final Path path,
                                         final boolean hadCommitOnBatchState); @Override void setHadCommitOnBatchState(final boolean value); @Override boolean isHadCommitOnBatchState(final Path path); @Override void setBatchCommitInfo(CommitInfo batchCommitInfo); @Override CommitInfo getBatchCommitInfo(); @Override int incrementAndGetCommitCount(); @Override void resetCommitCount(); @Override int getNumberOfCommitsSinceLastGC(); @Override FileSystemState getState(); @Override void lock(); @Override void unlock(); JGitFileSystemLock getLock(); @Override void addPostponedWatchEvents(List<WatchEvent<?>> postponedWatchEvents); @Override List<WatchEvent<?>> getPostponedWatchEvents(); @Override void clearPostponedWatchEvents(); @Override boolean hasPostponedEvents(); @Override boolean hasBeenInUse(); @Override void notifyExternalUpdate(); @Override void notifyPostCommit(int exitCode); @Override void checkBranchAccess(final ReceiveCommand command,
                                  final User user); @Override void filterBranchAccess(final UploadPack uploadPack,
                                   final User user); @Override void setPublicURI(Map<String, String> fullHostNames);  }
@Test public void testSupportedFileAttributeViews() throws IOException, GitAPIException { final JGitFileSystemProvider fsProvider = mock(JGitFileSystemProvider.class); final Git git = setupGit(); final JGitFileSystemImpl fileSystem = new JGitFileSystemImpl(fsProvider, null, git, createFSLock(git), "my-repo", CredentialsProvider.getDefault(), null, null); assertThat(fileSystem.isReadOnly()).isFalse(); assertThat(fileSystem.getSeparator()).isEqualTo("/"); assertThat(fileSystem.getName()).isEqualTo("my-repo"); assertThat(fileSystem.supportedFileAttributeViews()).isNotEmpty().hasSize(2).contains("basic", "version"); }