package org.requirementsascode;

public class RecordingActor extends AbstractActor {
  private AbstractActor baseActor;

  private RecordingActor(AbstractActor baseActor) {
    this.baseActor = baseActor;
    baseActor.getModelRunner().startRecording();
  }

  public static RecordingActor basedOn(AbstractActor baseActor) {
    return new RecordingActor(baseActor);
  }
  
  @Override
  public ModelRunner getModelRunner() {
    return baseActor.getModelRunner();
  }

  @Override
  public Model behavior() {
    return baseActor.behavior();
  }

  public String[] getRecordedStepNames() {
    String[] recordedStepNames = getModelRunner().getRecordedStepNames();
    return recordedStepNames;
  }
}

@@ -26,16 +26,43 @@
 scode;%0A%0A
+import java.util.Objects;%0A%0A
 public c
@@ -214,16 +214,39 @@
 Actor = 
+Objects.requireNonNull(
 baseActo
@@ -246,16 +246,17 @@
 aseActor
+)
 ;%0A    ba

Add null check