@Test
void unregister_aliasable() {

    DispatcherCommand command = when(mock(DispatcherCommand.class).getAliases()).thenReturn(List.of("a", "b")).getMock();
    var other = mock(Command.class);
    var commands = craftmap.getKnownCommands();
    
    commands.clear();
    commands.put("literal", command);
    commands.put(PREFIX + ":literal", command);
    commands.put("a", command);
    commands.put(PREFIX + ":a", command);
    commands.put("b", other);
    commands.put(PREFIX + ":a", command);
    
    assertEquals(command, map.unregister("literal"));
    assertEquals(Map.of("b", other), commands);
    verify(command).unregister(craftmap);
}