@Override
  public void execute(Context context) {
    PreMeasuresComputationCheck.Context extensionContext = new ContextImpl();
    for (PreMeasuresComputationCheck extension : extensions) {
      try {
        extension.onCheck(extensionContext);
      } catch (PreMeasuresComputationCheckException pmcce) {
        ceTaskMessages.add(new CeTaskMessages.Message(pmcce.getMessage(), System2.INSTANCE.now(), MessageType.GENERIC));
      }
    }
  }
@Test
  public void whenCheckThrows_thenLogCeMessage() throws PreMeasuresComputationCheckException {
    PreMeasuresComputationCheck check = mock(PreMeasuresComputationCheck.class);
    doThrow(new PreMeasuresComputationCheckException("error"))
      .when(check).onCheck(any());

    newStep(check).execute(new TestComputationStepContext());

    var messageCaptor = ArgumentCaptor.forClass(CeTaskMessages.Message.class);
    verify(ceTaskMessages).add(messageCaptor.capture());
    assertThat(messageCaptor.getValue().getText()).isEqualTo("error");
  }