ParticleType implements WordType<Particle> { @Override public <S> CompletableFuture<Suggestions> listSuggestions(CommandContext<S> context, SuggestionsBuilder builder) { for (var particles : PARTICLES.prefixedKeys(builder.getRemaining())) { builder.suggest(particles); } return builder.buildFuture(); }  @Override Particle parse(StringReader reader); @Override CompletableFuture<Suggestions> listSuggestions(CommandContext<S> context, SuggestionsBuilder builder); @Override List<String> getExamples();  }
@Test void listSuggestions() { SuggestionsBuilder builder = when(mock(SuggestionsBuilder.class).getRemaining()).thenReturn("block").getMock(); type.listSuggestions(null, builder); verify(builder).suggest("block_crack"); verify(builder).suggest("block_dust"); }