MongoClassValidator implements ClassVisitor { void validateViewClass() { validateView = true; validator.validate(); } MongoClassValidator(Class<?> entityClass); @Override void visitClass(Class<?> objectClass, String path); @Override void visitField(Field field, String parentPath); @Override void visitEnum(Class<?> enumClass);  }
@Test void validateViewClass() { new MongoClassValidator(TestView.class).validateViewClass(); }