given

open fun given(vararg events: Any): WhenStage<S>

Sets up the aggregate by replaying the given domain events.

This method initializes the aggregate state by applying the provided events in order, simulating previous command executions.

Return

a WhenStage for specifying the command to execute

Parameters

events

the domain events to replay on the aggregate