code: public static Type detect(final String payload) {
          final Matcher m = ROOT_NAME.matcher(payload);
          if (m.find() && m.groupCount() >= 1) {
              final String root = m.group(1);
              try {
                  return Type.valueOf(CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, root));
              } catch (IllegalArgumentException e) {
                  log.warn("Enable to detect notification type, no type for {}", root);
                  return null;
              }
          }
          log.warn("Enable to detect notification type");
          return null;
      }
docs: Detect notification type based on the xml root name.
  
  @param payload
  @return notification type or null if root name is not found or if there
  is no type corresponding to the root name