use of com.hubspot.rosetta.beans.NestedStoredAsJsonBean in project Rosetta by HubSpot.
the class StoredAsJsonTest method testNestedStoredAsJsonBeans.
@Test
@Ignore
public void testNestedStoredAsJsonBeans() throws JsonProcessingException {
InnerBean innerBean = new InnerBean();
innerBean.setStringProperty("value");
StoredAsJsonBean storedAsJsonBean = new StoredAsJsonBean();
storedAsJsonBean.setAnnotatedField(innerBean);
NestedStoredAsJsonBean top = new NestedStoredAsJsonBean();
top.setAnnotatedField(storedAsJsonBean);
JsonNode node = Rosetta.getMapper().valueToTree(top);
assertThat(Rosetta.getMapper().treeToValue(node, NestedStoredAsJsonBean.class)).isEqualTo(top);
}
Aggregations