CommandEnvelope extends AbstractMessageEnvelope<CommandId, Command, CommandContext> implements SignalEnvelope<CommandId, Command, CommandContext> { @Override public CommandContext context() { return outerObject().context(); } private  CommandEnvelope(Command command); static CommandEnvelope of(Command command); Command command(); @Override TenantId tenantId(); @Override CommandId id(); @Override CommandMessage message(); @Override CommandClass messageClass(); @Override ActorContext actorContext(); @Override Origin asMessageOrigin(); @Override CommandContext context(); TypeName messageTypeName();  }
@Test @DisplayName("obtain command context") void getCommandContext() { Command command = outerObject(); CommandEnvelope envelope = toEnvelope(command); assertThat(envelope.context()) .isEqualTo(command.context()); assertThat(envelope.context()) .isSameInstanceAs(envelope.context()); }