@Test
public void testDiscardingNonIgnoredFieldIsIllegal() throws B2JsonException {

    thrown.expect(B2JsonException.class);
    thrown.expectMessage("DiscardingNonIgnoredFieldIsIllegal's field 'c' cannot be discarded: it's REQUIRED.  only non-existent or IGNORED fields can be discarded.");
    final String jsonWithExtra = "{\n" +
            "  \"a\": 41,\n" +
            "  \"b\": \"hello\",\n" +
            "  \"c\": 7" +
            "}";
    b2Json.fromJson(jsonWithExtra, DiscardingNonIgnoredFieldIsIllegal.class);
}