test_class.declarator: clock = Clock.fixed(Instant.now(), ZoneId.systemDefault())
test_class.modifier: private final
test_class.original_string: private final Clock clock = Clock.fixed(Instant.now(), ZoneId.systemDefault());
test_class.type: Clock
test_class.var_name: clock
test_class.declarator: controllerAdvice
test_class.modifier: private
test_class.original_string: private ExceptionHandlingControllerAdvice controllerAdvice;
test_class.type: ExceptionHandlingControllerAdvice
test_class.var_name: controllerAdvice
test_class.file: api/src/test/java/engineering/everest/lhotse/api/rest/ExceptionHandlingControllerAdviceTest.java
test_class.identifier: ExceptionHandlingControllerAdviceTest
test_case.body: @Test
      void willMapExecutionExceptions_WhenCauseIsNotAnExpectedValidationException() {
          var exception = new ExecutionException("outer exception", new RuntimeException("general case"));
          var expectedResponse = ApiErrorResponse.builder()
                  .status(BAD_REQUEST)
                  .message("outer exception")
                  .timeStamp(Instant.now(clock))
                  .build();
  
          assertEquals(new ResponseEntity<>(expectedResponse, new HttpHeaders(), BAD_REQUEST), controllerAdvice.handleExecutionException(exception));
      }
test_case.class_method_signature: ExceptionHandlingControllerAdviceTest.willMapExecutionExceptions_WhenCauseIsNotAnExpectedValidationException()
test_case.full_signature: @Test void willMapExecutionExceptions_WhenCauseIsNotAnExpectedValidationException()
test_case.identifier: willMapExecutionExceptions_WhenCauseIsNotAnExpectedValidationException
test_case.invocations: build timeStamp message status builder now assertEquals handleExecutionException
test_case.modifiers: @Test
test_case.parameters: ()
test_case.return: void
test_case.signature: void willMapExecutionExceptions_WhenCauseIsNotAnExpectedValidationException()
focal_class.declarator: clock
focal_class.modifier: private final
focal_class.original_string: private final Clock clock;
focal_class.type: Clock
focal_class.var_name: clock
focal_class.file: api/src/main/java/engineering/everest/lhotse/api/rest/ExceptionHandlingControllerAdvice.java
focal_class.identifier: ExceptionHandlingControllerAdvice
focal_class.class_method_signature: ExceptionHandlingControllerAdvice.ExceptionHandlingControllerAdvice(Clock clock)
focal_class.full_signature: public  ExceptionHandlingControllerAdvice(Clock clock)
focal_class.identifier: ExceptionHandlingControllerAdvice
focal_class.modifiers: public
focal_class.parameters: (Clock clock)
focal_class.signature:  ExceptionHandlingControllerAdvice(Clock clock)
focal_class.class_method_signature: ExceptionHandlingControllerAdvice.handleNotFoundException(AggregateNotFoundException exception)
focal_class.full_signature: @ExceptionHandler(AggregateNotFoundException.class) public ResponseEntity<Object> handleNotFoundException(AggregateNotFoundException exception)
focal_class.identifier: handleNotFoundException
focal_class.modifiers: @ExceptionHandler(AggregateNotFoundException.class) public
focal_class.parameters: (AggregateNotFoundException exception)
focal_class.return: ResponseEntity<Object>
focal_class.signature: ResponseEntity<Object> handleNotFoundException(AggregateNotFoundException exception)
focal_class.class_method_signature: ExceptionHandlingControllerAdvice.handleRuntimeException(RuntimeException exception)
focal_class.full_signature: @ExceptionHandler(RuntimeException.class) public ResponseEntity<Object> handleRuntimeException(RuntimeException exception)
focal_class.identifier: handleRuntimeException
focal_class.modifiers: @ExceptionHandler(RuntimeException.class) public
focal_class.parameters: (RuntimeException exception)
focal_class.return: ResponseEntity<Object>
focal_class.signature: ResponseEntity<Object> handleRuntimeException(RuntimeException exception)
focal_class.class_method_signature: ExceptionHandlingControllerAdvice.handleExecutionException(ExecutionException exception)
focal_class.full_signature: @ExceptionHandler(ExecutionException.class) public ResponseEntity<Object> handleExecutionException(ExecutionException exception)
focal_class.identifier: handleExecutionException
focal_class.modifiers: @ExceptionHandler(ExecutionException.class) public
focal_class.parameters: (ExecutionException exception)
focal_class.return: ResponseEntity<Object>
focal_class.signature: ResponseEntity<Object> handleExecutionException(ExecutionException exception)
focal_class.class_method_signature: ExceptionHandlingControllerAdvice.handleRemoteCommandExecutionException(RemoteCommandExecutionException exception)
focal_class.full_signature: @ExceptionHandler(RemoteCommandExecutionException.class) public ResponseEntity<Object> handleRemoteCommandExecutionException(RemoteCommandExecutionException exception)
focal_class.identifier: handleRemoteCommandExecutionException
focal_class.modifiers: @ExceptionHandler(RemoteCommandExecutionException.class) public
focal_class.parameters: (RemoteCommandExecutionException exception)
focal_class.return: ResponseEntity<Object>
focal_class.signature: ResponseEntity<Object> handleRemoteCommandExecutionException(RemoteCommandExecutionException exception)
focal_class.class_method_signature: ExceptionHandlingControllerAdvice.handleMethodArgumentNotValid(MethodArgumentNotValidException exception,
                                                                    HttpHeaders headers,
                                                                    HttpStatus status,
                                                                    WebRequest request)
focal_class.full_signature: @Override protected ResponseEntity<Object> handleMethodArgumentNotValid(MethodArgumentNotValidException exception,
                                                                    HttpHeaders headers,
                                                                    HttpStatus status,
                                                                    WebRequest request)
focal_class.identifier: handleMethodArgumentNotValid
focal_class.modifiers: @Override protected
focal_class.parameters: (MethodArgumentNotValidException exception,
                                                                    HttpHeaders headers,
                                                                    HttpStatus status,
                                                                    WebRequest request)
focal_class.return: ResponseEntity<Object>
focal_class.signature: ResponseEntity<Object> handleMethodArgumentNotValid(MethodArgumentNotValidException exception,
                                                                    HttpHeaders headers,
                                                                    HttpStatus status,
                                                                    WebRequest request)
focal_class.class_method_signature: ExceptionHandlingControllerAdvice.createResponseBody(String message, HttpStatus badRequest)
focal_class.full_signature: private ApiErrorResponse createResponseBody(String message, HttpStatus badRequest)
focal_class.identifier: createResponseBody
focal_class.modifiers: private
focal_class.parameters: (String message, HttpStatus badRequest)
focal_class.return: ApiErrorResponse
focal_class.signature: ApiErrorResponse createResponseBody(String message, HttpStatus badRequest)
focal_class.superclass: extends ResponseEntityExceptionHandler
focal_method.body: @ExceptionHandler(ExecutionException.class)
      public ResponseEntity<Object> handleExecutionException(ExecutionException exception) {
          var cause = exception.getCause();
          var message = cause instanceof IllegalArgumentException || cause instanceof IllegalStateException
                  ? cause.getMessage()
                  : exception.getMessage();
          return new ResponseEntity<>(createResponseBody(message, BAD_REQUEST), new HttpHeaders(), BAD_REQUEST);
      }
focal_method.class_method_signature: ExceptionHandlingControllerAdvice.handleExecutionException(ExecutionException exception)
focal_method.full_signature: @ExceptionHandler(ExecutionException.class) public ResponseEntity<Object> handleExecutionException(ExecutionException exception)
focal_method.identifier: handleExecutionException
focal_method.invocations: getCause getMessage getMessage createResponseBody
focal_method.modifiers: @ExceptionHandler(ExecutionException.class) public
focal_method.parameters: (ExecutionException exception)
focal_method.return: ResponseEntity<Object>
focal_method.signature: ResponseEntity<Object> handleExecutionException(ExecutionException exception)