### Question:
CommandManager implements Reloadable { public void runCommandsOnRegister(Player player) { executeCommands(player, onRegisterCommands.getAdaptedItems(player)); } @Inject  CommandManager(@DataFolder File dataFolder, BukkitService bukkitService, GeoIpService geoIpService,
                   CommandMigrationService commandMigrationService); void runCommandsOnJoin(Player player); void runCommandsOnRegister(Player player); void runCommandsOnLogin(Player player, List<String> otherAccounts); void runCommandsOnSessionLogin(Player player); void runCommandsOnFirstLogin(Player player, List<String> otherAccounts); void runCommandsOnUnregister(Player player); void runCommandsOnLogout(Player player); @Override void reload();  }### Answer:
@Test public void shouldExecuteCommandsOnRegister() { copyJarFileAsCommandsYml(TEST_FILES_FOLDER + "commands.complete.yml"); initManager(); manager.runCommandsOnRegister(player); verify(bukkitService).dispatchCommand(any(Player.class), eq("me I just registered")); verify(bukkitService).dispatchConsoleCommand("log Bobby (127.0.0.3, Syldavia) registered"); verifyNoMoreInteractions(bukkitService); }
@Test public void shouldExecuteCommandsOnRegisterWithIncompleteConfig() { copyJarFileAsCommandsYml(TEST_FILES_FOLDER + "commands.incomplete.yml"); initManager(); manager.runCommandsOnRegister(player); verifyZeroInteractions(bukkitService, geoIpService); }