public function it_determines_the_command_name_from_message_name_call_if_event_has_one()
{
$handleCommandStrategy = new HandleCommandStrategy();
$customCommand = new CustomMessageWithName("I am an event with a messageName() method");
$closure = function ($command) {
return $this->determineCommandName($command);
};
$determineCommandName = $closure->bindTo($handleCommandStrategy, $handleCommandStrategy);
$this->assertSame('CustomMessageWithSomeOtherName', $determineCommandName($customCommand));
}