public static org.apache.pinot.common.utils.regex.Pattern compile(String regex) {
    // un-initialized factory will use java.util.regex to avoid requiring initialization in tests
    if (_regexClass == null) {
      return new JavaUtilPattern(regex);
    }
    switch (_regexClass) {
      case RE2J:
        return new Re2jPattern(regex);
      case JAVA_UTIL:
      default:
        return new JavaUtilPattern(regex);
    }
  }
@Test
  public void testNonInitializedPatternFactory() {
    Pattern pattern = PatternFactory.compile("pattern");
    Assert.assertTrue(pattern instanceof JavaUtilPattern);
  }