@Test
public void testSerializeNullRequired() throws B2JsonException {

    RequiredObject obj = new RequiredObject(null);
    thrown.expect(B2JsonException.class);
    thrown.expectMessage("required field a cannot be null");
    b2Json.toJson(obj);
}