code: private void validateCommandResult(DockerCommand command, TestContext context) {
          if (log.isDebugEnabled()) {
              log.debug("Starting Docker command result validation");
          }
  
          if (StringUtils.hasText(expectedCommandResult)) {
              if (command.getCommandResult() == null) {
                  throw new ValidationException("Missing Docker command result");
              }
  
              try {
                  String commandResultJson = jsonMapper.writeValueAsString(command.getCommandResult());
                  JsonMessageValidationContext validationContext = new JsonMessageValidationContext();
                  jsonTextMessageValidator.validateMessage(new DefaultMessage(commandResultJson), new DefaultMessage(expectedCommandResult), context, validationContext);
                  log.info("Docker command result validation successful - all values OK!");
              } catch (JsonProcessingException e) {
                  throw new CitrusRuntimeException(e);
              }
          }
  
          if (command.getResultCallback() != null) {
              command.getResultCallback().doWithCommandResult(command.getCommandResult(), context);
          }
      }
docs: Validate command results.
  @param command
  @param context