dtoImpl.setIntId(1);
dtoImpl.setSimpleEnum(null);
// Make it json and pull it back out.
Gson gson = new GsonBuilder().serializeNulls().create();
String serialized = dtoImpl.toJson();
assertEquals(dtoToJson(gson, dtoImpl), serialized);
ComplicatedDto dto = ComplicatedDtoImpl.fromJsonString(serialized);
assertEquals(1, dto.getIntId());
assertNull(dto.getSimpleEnum());