### Question:
WithoutJsonPath extends TypeSafeDiagnosingMatcher<ReadContext> { public WithoutJsonPath(JsonPath jsonPath) { this.jsonPath = jsonPath; } WithoutJsonPath(JsonPath jsonPath); @Override void describeTo(Description description);  }### Answer:
@Test public void shouldMatchNonExistingJsonPath() { assertThat(JSON, withoutJsonPath(compile("$.not_there"))); assertThat(JSON, withoutJsonPath("$.not_there")); }
@Test public void shouldNotMatchExistingJsonPath() { assertThat(JSON, not(withoutJsonPath(compile("$.name")))); assertThat(JSON, not(withoutJsonPath("$.name"))); assertThat(JSON, not(withoutJsonPath("$.flag"))); assertThat(JSON, not(withoutJsonPath("$.empty_array"))); assertThat(JSON, not(withoutJsonPath("$.empty_object"))); assertThat(JSON, not(withoutJsonPath("$.none"))); }
@Test public void shouldBeDescriptive() { assertThat(withoutJsonPath("$.name"), hasToString(equalTo("without json path \"$['name']\""))); }