use of com.hubspot.rosetta.beans.PolymorphicBeanASubTypeA in project Rosetta by HubSpot.
the class StoredAsJsonTest method testSerializingOptionalStoredAsJsonSubtypeBean.
@Test
public void testSerializingOptionalStoredAsJsonSubtypeBean() {
OptionalStoredAsJsonBean bean = new OptionalStoredAsJsonBean(java.util.Optional.of(new PolymorphicBeanASubTypeA()));
JsonNode node = Rosetta.getMapper().valueToTree(bean);
assertThat(node.get("bean")).isNotNull();
assertThat(node.get("bean").textValue()).contains("beanType");
}
Aggregations