### Question:
MemoryRepositoryResolver implements RepositoryResolver { public static @VisibleForTesting void removeContext(@NonNull String context) { MemoryContext ctx = CONTEXTS.remove(context); if (ctx != null) { ctx.clear(); } }  static @VisibleForTesting void removeContext(@NonNull String context); static void removeAllContexts(); @Override boolean canHandle(@NonNull URI repoURI); @Override boolean canHandleURIScheme(String scheme); @Override boolean repoExists(@NonNull URI repoURI); @Override URI buildRepoURI(@NonNull URI rootRepoURI, @NonNull String repoName); URI createRootURI(@NonNull String contextName); @Override URI getRootURI(@NonNull URI repoURI); @Override List<String> listRepoNamesUnderRootURI(@NonNull URI rootRepoURI); @Override String getName(@NonNull URI repoURI); @Override void initialize(@NonNull URI repoURI); @Override Repository open(@NonNull URI repositoryURI); @Override Repository open(@NonNull URI repositoryURI, @NonNull Hints hints); @Override boolean delete(@NonNull URI repositoryLocation); @Override ConfigDatabase resolveConfigDatabase(@NonNull URI repoURI,
            @NonNull Context repoContext, boolean rootUri); @Override ObjectDatabase resolveObjectDatabase(@NonNull URI repoURI, Hints hints); @Override IndexDatabase resolveIndexDatabase(@NonNull URI repoURI, Hints hints); @Override RefDatabase resolveRefDatabase(@NonNull URI repoURI, Hints hints); @Override ConflictsDatabase resolveConflictsDatabase(@NonNull URI repoURI, Hints hints);  }### Answer:
public @Test void testRemoveContext() { MemoryContext c1 = MemoryRepositoryResolver.getOrCreateContext(context1); MemoryContext c2 = MemoryRepositoryResolver.getOrCreateContext(context2); assertNotNull(c1); assertSame(c1, MemoryRepositoryResolver.getOrCreateContext(context1)); assertNotNull(c2); MemoryRepositoryResolver.removeContext(context1); assertFalse(MemoryRepositoryResolver.getContext(context1).isPresent()); assertSame(c2, MemoryRepositoryResolver.getOrCreateContext(context2)); }