### Question:
PluginConfigurationHibernateDao extends GenericDao<PluginConfiguration> implements PluginConfigurationDao { @Override public void saveOrUpdate(PluginConfiguration entity) { for (PluginProperty property: entity.getProperties()) { property.setPluginConfiguration(entity); } super.saveOrUpdate(entity); } PluginConfigurationHibernateDao(SessionFactory sessionFactory); @Override PluginConfiguration get(String name); @Override void saveOrUpdate(PluginConfiguration entity); @Override void updateProperties(List<PluginProperty> properties);  }### Answer:
@Test(expectedExceptions = org.hibernate.exception.ConstraintViolationException.class) public void saveOrUpdateWithNullValuesShouldNotSavePlugin() { PluginConfiguration pluginConfiguration = PersistedObjectsFactory.getDefaultPluginConfiguration(); pluginConfiguration.setName(null); pluginConfigurationDao.saveOrUpdate(pluginConfiguration); session.flush(); }