}
// TODO : move to ViewEntityEntity test.
private static void setPersistenceEntities(ViewInstanceEntity viewInstanceDefinition) {
ViewEntity viewDefinition = viewInstanceDefinition.getViewEntity();
Collection<ViewEntityEntity> entities = new HashSet<ViewEntityEntity>();
ViewConfig viewConfig = viewDefinition.getConfiguration();
for (EntityConfig entityConfiguration : viewConfig.getPersistence().getEntities()) {
ViewEntityEntity viewEntityEntity = new ViewEntityEntity();
viewEntityEntity.setId(1L);
viewEntityEntity.setViewName(viewDefinition.getName());
viewEntityEntity.setViewInstanceName(viewInstanceDefinition.getName());
viewEntityEntity.setClassName(entityConfiguration.getClassName());
viewEntityEntity.setIdProperty(entityConfiguration.getIdProperty());
viewEntityEntity.setViewInstance(viewInstanceDefinition);