### Question:
SnippetCompletion implements Completion { @Nullable @Override public String tryResolve(@Nonnull String label) { return Optional.ofNullable(snippets.getInformationFor(label)) .map(string -> string.replaceAll("[${\\d:}]", "")) .orElse(null); } @Inject  SnippetCompletion(@Named("Snippets") CompletionStorage snippets); @Nonnull @Override Collection<String> getCompletionSource(MyDocumentModel document); @Nullable @Override String tryResolve(@Nonnull String label); @Nonnull @Override String getSortOrderPrefix(); @Nonnull @Override CompletionItem customize(@Nonnull CompletionItem item); @Nonnull @Override CompletionItemKind getKind();  }### Answer:
@Test void testTryResolvePositive() { assertEquals(DOCUMENTATION_TEXT, provider.tryResolve(LABEL)); }
@Test void testTryResolveNegative() { assertNull(provider.tryResolve("non-existing string")); }
@Test void testTryResolveNull() { assertNull(provider.tryResolve(null)); }