use of org.springframework.aop.framework.ProxyFactory in project spring-data-mongodb by spring-projects.
the class MappingMongoConverterUnitTests method shouldWriteCglibProxiedClassTypeInformationCorrectly.
// DATAMONGO-1001, DATAMONGO-1509
@Test
public void shouldWriteCglibProxiedClassTypeInformationCorrectly() {
ProxyFactory factory = new ProxyFactory();
factory.setTargetClass(GenericType.class);
factory.setProxyTargetClass(true);
GenericType<?> proxied = (GenericType<?>) factory.getProxy();
org.bson.Document document = new org.bson.Document();
converter.write(proxied, document);
assertTypeHint(document, GenericType.class);
}
Aggregations