### Question:
GitRepository implements Repository { @Override public CompletableFuture<Map<String, Entry<?>>> find( Revision revision, String pathPattern, Map<FindOption<?>, ?> options) { final ServiceRequestContext ctx = context(); return CompletableFuture.supplyAsync(() -> { failFastIfTimedOut(this, logger, ctx, "find", revision, pathPattern, options); return blockingFind(revision, pathPattern, options); }, repositoryWorker); } @VisibleForTesting  GitRepository(Project parent, File repoDir, Executor repositoryWorker,
                  long creationTimeMillis, Author author);   GitRepository(Project parent, File repoDir, GitRepositoryFormat format, Executor repositoryWorker,
                  long creationTimeMillis, Author author, @Nullable RepositoryCache cache);   GitRepository(Project parent, File repoDir, Executor repositoryWorker, @Nullable RepositoryCache cache); @Override Project parent(); @Override String name(); GitRepositoryFormat format(); boolean needsMigration(GitRepositoryFormat preferredFormat); @Override Revision normalizeNow(Revision revision); @Override RevisionRange normalizeNow(Revision from, Revision to); @Override CompletableFuture<Map<String, Entry<?>>> find(
            Revision revision, String pathPattern, Map<FindOption<?>, ?> options); @Override CompletableFuture<List<Commit>> history(
            Revision from, Revision to, String pathPattern, int maxCommits); @Override CompletableFuture<Map<String, Change<?>>> diff(Revision from, Revision to, String pathPattern); @Override CompletableFuture<Map<String, Change<?>>> previewDiff(Revision baseRevision,
                                                                 Iterable<Change<?>> changes); @Override CompletableFuture<Revision> commit(
            Revision baseRevision, long commitTimeMillis, Author author, String summary,
            String detail, Markup markup, Iterable<Change<?>> changes); @Override CompletableFuture<Revision> findLatestRevision(Revision lastKnownRevision, String pathPattern); @Override CompletableFuture<Revision> watch(Revision lastKnownRevision, String pathPattern); void cloneTo(File newRepoDir); void cloneTo(File newRepoDir, BiConsumer<Integer, Integer> progressListener); void cloneTo(File newRepoDir, GitRepositoryFormat format); void cloneTo(File newRepoDir, GitRepositoryFormat format,
                        BiConsumer<Integer, Integer> progressListener); @Override String toString();  }### Answer:
@Test void testFindNone() { assertThat(repo.find(HEAD, "/non-existent").join()).isEmpty(); assertThat(repo.find(HEAD, "non-existent").join()).isEmpty(); }
@Test void testFind_invalidPathPattern() { final String pattern = "a'\"><img src=1 onerror=alert(document.domain)>"; assertThatThrownBy(() -> repo.find(HEAD, pattern).join()) .isInstanceOf(CompletionException.class) .hasCauseInstanceOf(IllegalArgumentException.class); }