use of com.jayway.jsonpath.ParseContext in project spring-data-commons by spring-projects.
the class ProjectionIntegrationTests method jacksonSerializationDoesNotExposeDecoratedClass.
// DATACMNS-909
@Test
public void jacksonSerializationDoesNotExposeDecoratedClass() throws Exception {
ProxyProjectionFactory factory = new ProxyProjectionFactory();
SampleProjection projection = factory.createProjection(SampleProjection.class);
ParseContext context = JsonPath.using(new ConfigurationBuilder().options(Option.SUPPRESS_EXCEPTIONS).build());
DocumentContext json = context.parse(new ObjectMapper().writeValueAsString(projection));
assertThat(json.read("$.decoratedClass", String.class)).isNull();
}
Aggregations