whenCommand
open override fun whenCommand(command: Any, header: Header, ownerId: String, block: ExpectDsl<S>.() -> Unit)
Executes a command and defines expectations for the result.
This method processes the given command through the aggregate and allows specification of expected outcomes using the ExpectDsl.
Parameters
command
the command to execute
header
message header for the command
ownerId
the owner identifier for the command
block
the expectation definition using ExpectDsl