code: public void extractVariables(Message message, TestContext context) {
          if (CollectionUtils.isEmpty(headerMappings)) { return; }
  
          for (Entry<String, String> entry : headerMappings.entrySet()) {
              String headerElementName = entry.getKey();
              String targetVariableName = entry.getValue();
  
              if (message.getHeader(headerElementName) == null) {
                  throw new UnknownElementException("Could not find header element " + headerElementName + " in received header");
              }
  
              context.setVariable(targetVariableName, message.getHeader(headerElementName).toString());
          }
      }
docs: Reads header information and saves new test variables.