### Question:
HibernateUtil { public static void shutdown() { getSessionFactory().close(); sessionFactory = null; }  static synchronized SessionFactory getSessionFactory(); static Session openNewSession(); static void store(Object entity); static void delete(Object entity); static void update(Object entity); static Object retrieve(Class<?> clazz, Serializable id); static List<?> executeNamedQuery(String queryName); static List<?> queryCriteria(Class<?> persistentClass, Criterion... criterionArray); static void shutdown(); static void clear();  }### Answer:
@Test public void testShutdown() { SessionFactory originalSessionFactory = HibernateUtil.getSessionFactory(); assertFalse(originalSessionFactory.isClosed()); HibernateUtil.shutdown(); SessionFactory newOpenSessionFactory = HibernateUtil.getSessionFactory(); assertTrue(originalSessionFactory.isClosed()); assertNotSame(newOpenSessionFactory, originalSessionFactory); }