func (sc CommandHandlerWhen) ThenError(err error) CommandHandlerThen {
	return CommandHandlerThen{
		CommandHandlerWhen: sc,
		wantError:          true,
		thenError:          err,
	}
}
ThenError sets a negative expectation on the scenario outcome,
to produce an error value that is similar to the one provided in input.

Error assertion happens using errors.Is(), so the error returned
by the Command Handler is unwrapped until the cause error to match
the provided expectation.
package scenario
import (
	"context"
	"testing"
	"github.com/stretchr/testify/assert"
	"github.com/get-eventually/go-eventually"
	"github.com/get-eventually/go-eventually/aggregate"
	"github.com/get-eventually/go-eventually/command"
	"github.com/get-eventually/go-eventually/eventstore"
	"github.com/get-eventually/go-eventually/eventstore/inmemory"
)
type CommandHandlerInit struct{}
func CommandHandler() CommandHandlerInit { return CommandHandlerInit{} }
func (sc CommandHandlerInit) Given(events ...eventstore.Event) CommandHandlerGiven {
	return CommandHandlerGiven{given: events}
}
func (sc CommandHandlerInit) When(cmd eventually.Command) CommandHandlerWhen {
	return CommandHandlerWhen{when: cmd}
}
type CommandHandlerGiven struct {
	given []eventstore.Event
}
func (sc CommandHandlerGiven) When(cmd eventually.Command) CommandHandlerWhen {
	return CommandHandlerWhen{
		CommandHandlerGiven: sc,
		when:                cmd,
	}
}
type CommandHandlerWhen struct {
	CommandHandlerGiven
	when eventually.Command
}
func (sc CommandHandlerWhen) Then(events ...eventstore.Event) CommandHandlerThen {
	return CommandHandlerThen{
		CommandHandlerWhen: sc,
		then:               events,
	}
}