private void saveDefaults() {
    try {
      Configuration defaultConfiguration = Configuration.defaultConfiguration();
      jsonProvider = defaultConfiguration.jsonProvider();
      mappingProvider = defaultConfiguration.mappingProvider();
      options = defaultConfiguration.getOptions();
      restoreDefaults = true;
    } catch (NoClassDefFoundError ignore) {
      restoreDefaults = false;
    }
  }
JUnit Rule that configures json-path to use the {@code JacksonJsonProvider}

<p>
UseJacksonForJsonPathRule can be used in tests that need to use json-path-assert:

<pre>
{@literal @}ClassRule
public static UseJacksonForJsonPathRule useJacksonForJsonPathRule = new UseJacksonForJsonPathRule();

{@literal @}Test
public void hasAssertionsUsingJsonPathMatchers() {
  ...
  assertThat(json, isJson());
  assertThat(json, hasJsonPath("$.result"));
}
</pre>
geode-junit/src/main/java/org/apache/geode/test/junit/rules/UseJacksonForJsonPathRule.java