@Test
public void testOmitNullOnPrimitive() throws B2JsonException {

    thrown.expectMessage("Field OmitNullBadTestClass.omitNullInt declared with 'omitNull = true' but is a primitive type");
    final OmitNullBadTestClass bad = new OmitNullBadTestClass(123);
    B2Json.toJsonOrThrowRuntime(bad);
}