code: private void validateCommandResult(ZooCommand command, TestContext context) {
          Message commandResult = getCommandResult(command);
  
          extractVariables(commandResult, context);
  
          if (log.isDebugEnabled()) {
              log.debug("Validating Zookeeper response");
          }
  
          if (StringUtils.hasText(expectedCommandResult)) {
              assertResultExists(commandResult);
              JsonMessageValidationContext validationContext = new JsonMessageValidationContext();
              jsonTextMessageValidator.validateMessage(commandResult, new DefaultMessage(expectedCommandResult), context, validationContext);
          }
  
          if (jsonPathMessageValidationContext != null) {
              assertResultExists(commandResult);
              jsonPathMessageValidator.validateMessage(commandResult, null, context, jsonPathMessageValidationContext);
          }
  
          log.info("Zookeeper command result validation successful - all values OK!");
  
          if (command.getResultCallback() != null) {
              command.getResultCallback().doWithCommandResult(command.getCommandResult(), context);
          }
      }
docs: Validate command results.
  
  @param command
  @param context