### Question:
PersistenceDelegator { Query createQuery(String jpaQuery) { return getQueryInstance(jpaQuery, false, null); } PersistenceDelegator(final KunderaMetadata kunderaMetadata, final PersistenceCache pc); void persist(Object e); E findById(final Class<E> entityClass, final Object primaryKey); List<E> find(Class<E> entityClass, Object... primaryKeys); List<E> find(Class<E> entityClass, Map<String, String> embeddedColumnMap); void remove(Object e); E merge(E e); void detach(Object entity); Client getClient(EntityMetadata m); Client getClient(final String persistenceUnit); EntityEventDispatcher getEventDispatcher(); boolean isOpen(); void refresh(Object entity); boolean isTransactionInProgress(); PersistenceCache getPersistenceCache(); KunderaMetadata getKunderaMetadata();  }### Answer:
@Test public void testCreateQueryWithNull() { PersistenceDelegator pd = ((EntityManagerImpl) em).getPersistenceDelegator(); try { pd.createQuery(null); Assert.fail("Should have gone to catch block!"); } catch (QueryHandlerException qhex) { Assert.assertEquals("Query String should not be null ", qhex.getMessage()); } }