Refactory DefaultCommandHandlerProvider.