public static function create($commandToHandlerMap)
    {
        $handlerMiddleware = new CommandHandlerMiddleware(
            new ClassNameExtractor(),
            new InMemoryLocator($commandToHandlerMap),
            new HandleInflector()
        );

        $lockingMiddleware = new LockingMiddleware();

        return new CommandBus([$lockingMiddleware, $handlerMiddleware]);
    }