### Question:
PersistenceDelegator { public Client getClient(EntityMetadata m) { if (m == null) { throw new KunderaException("Entitymatadata should not be null"); } String persistenceUnit = m.getPersistenceUnit(); return getClient(persistenceUnit); } 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 testGetClient() { PersonnelDTO dto = new PersonnelDTO(); EntityMetadata entityMetadata = KunderaMetadataManager.getEntityMetadata(((EntityManagerFactoryImpl)emf).getKunderaMetadataInstance(), dto.getClass()); PersistenceDelegator pd = ((EntityManagerImpl) em).getPersistenceDelegator(); Client c = pd.getClient(entityMetadata); Assert.assertNotNull(c); Assert.assertTrue(c instanceof CoreTestClient); }