use of com.hubspot.rosetta.beans.NullPolymorphicBean in project Rosetta by HubSpot.
the class StoredAsJsonTest method testNullPolymorphicStoredAsJsonBean.
@Test
public void testNullPolymorphicStoredAsJsonBean() {
PolymorphicStoredAsJsonBean bean = new PolymorphicStoredAsJsonBean();
bean.setAnnotatedField(new NullPolymorphicBean());
JsonNode node = Rosetta.getMapper().valueToTree(bean);
assertThat(node.get("annotatedField")).isNotNull();
assertThat(node.get("annotatedField").isNull()).isTrue();
}
Aggregations