MaterialType implements WordType<Material> { @Override public <S> CompletableFuture<Suggestions> listSuggestions(CommandContext<S> context, SuggestionsBuilder builder) { for (var material : MATERIALS.prefixedKeys(builder.getRemaining())) { builder.suggest(material); } return builder.buildFuture(); }  @Override Material parse(StringReader reader); @Override CompletableFuture<Suggestions> listSuggestions(CommandContext<S> context, SuggestionsBuilder builder); @Override List<String> getExamples();  }
@Test void listSuggestions() { type.listSuggestions(null, when(builder.getRemaining()).thenReturn("cactu").getMock()); verify(builder).suggest("cactus"); }