ConfigRepositoryImpl extends HibernateDaoSupport implements ConfigRepository { @Override public void merge(ApplicationConfig applicationConfig) { getHibernateTemplate().merge(applicationConfig); }  @Override @SuppressWarnings("unchecked") List<ApplicationConfig> find(); @Override ApplicationConfig find(String application); @Override void persist(ApplicationConfig applicationConfig); @Override void merge(ApplicationConfig applicationConfig); @Override void remove(ApplicationConfig applicationConfig);  }
@Test public void testInvalidApplicationConfig() { ApplicationConfig config = new ApplicationConfig(); try { configRepository.merge(config); fail("persisted config without application name"); } catch (RuntimeException e) { } }