### Question:
JsonAssert { public static JsonAsserter with(String json) { return new JsonAsserterImpl(JsonPath.parse(json).json()); }  static JsonAsserter with(String json); static JsonAsserter with(Reader reader); static JsonAsserter with(InputStream is); static CollectionMatcher collectionWithSize(Matcher<? super Integer> sizeMatcher); static Matcher<Map<String, ?>> mapContainingKey(Matcher<String> keyMatcher); static Matcher<? super Map<?, V>> mapContainingValue(Matcher<? super V> valueMatcher); static Matcher<Collection<Object>> emptyCollection();  }### Answer:
@Test(expected = AssertionError.class) public void has_path() throws Exception { with(JSON).assertNotDefined("$.store.bicycle[?(@.color == 'red' )]"); }
@Test(expected = AssertionError.class) public void failed_error_message() throws Exception { with(JSON).assertThat("$.store.book[0].category", endsWith("foobar")); }
@Test public void a_document_can_be_expected_not_to_contain_a_path() throws Exception { with(JSON).assertNotDefined("$.store.bicycle.cool"); }
@Test public void a_value_can_asserted_to_be_null() throws Exception { with(JSON).assertNull("$.store.bicycle.nullValue"); }
@Test public void ends_with_evalueates() throws Exception { with(JSON).assertThat("$.store.book[0].category", endsWith("nce")); }
@Test public void a_path_can_be_asserted_with_matcher() throws Exception { with(JSON).assertThat("$.store.bicycle.color", equalTo("red")) .assertThat("$.store.bicycle.price", equalTo(19.95D)); }
@Test public void list_content_can_be_asserted_with_nested_matcher() throws Exception { with(JSON).assertThat("$..book[*]", hasItems(hasEntry("author", "Nigel Rees"), hasEntry("author", "Evelyn Waugh"))); }
@Test public void a_path_can_be_asserted_equal_to() throws Exception { with(JSON).assertEquals("$.store.book[0].title", "Sayings of the Century") .assertThat("$.store.book[0].title", equalTo("Sayings of the Century")); with(JSON).assertEquals("$['store']['book'][0].['title']", "Sayings of the Century") .assertThat("$['store'].book[0].title", equalTo("Sayings of the Century")); }
@Test public void path_including_wildcard_path_followed_by_another_path_concatenates_results_to_list() throws Exception { with(getResourceAsStream("lotto.json")).assertThat("lotto.winners[*].winnerId", hasItems(23, 54)); }
@Test public void testNotDefined() throws Exception { JsonAsserter asserter = JsonAssert.with("{\"foo\":\"bar\"}"); asserter.assertNotDefined("$.xxx"); }
@Test(expected = AssertionError.class) public void assert_that_invalid_path_is_thrown() { JsonAsserter asserter = JsonAssert.with("{\"foo\":\"bar\"}"); asserter.assertEquals("$foo", "bar"); }
@Test public void testAssertEqualsInteger() throws Exception { with(getResourceAsStream("lotto.json")).assertEquals("lotto.winners[0].winnerId", 23); }
@Test(expected = AssertionError.class) public void testAssertEqualsIntegerInvalidExpected() throws Exception { with(getResourceAsStream("lotto.json")).assertEquals("lotto.winners[0].winnerId", 24); }
@Test(expected = AssertionError.class) public void testAssertEqualsIntegerInvalidField() throws Exception { with(getResourceAsStream("lotto.json")).assertEquals("lotto.winners[0].winnerId1", 24); }