### Question:
HibernateGenericDAO extends HibernatePersistentObjectDAO<Generic> implements GenericDAO { @Override public void initialize(Generic generic) { refresh(generic); for (String attribute : generic.getAttributes().keySet()) { if (generic.getValue(attribute) != null) generic.getValue(attribute).toString(); } } HibernateGenericDAO(); @Override boolean delete(long genericId, int code); @Override Generic findByAlternateKey(String type, String subtype, Long qualifier, long tenantId); @Override List<Generic> findByTypeAndSubtype(String type, String subtype, Long qualifier, Long tenantId); @Override void initialize(Generic generic); @Override boolean store(Generic entity);  }### Answer:
@Test public void testInitialize() { Generic generic = dao.findById(1); Assert.assertNotNull(generic); Assert.assertEquals(new Long(0), generic.getInteger1()); dao.initialize(generic); Assert.assertEquals(1, generic.getAttributes().size()); Assert.assertEquals("val1", generic.getValue("att1")); }