	@Test
	public void testIsDocumentExists() {

		try {
			entityManager.getTransaction().begin();
			documentDTO = documentResourceFacadeImp.addDocument(documentDTO);
			entityManager.getTransaction().commit();
			Long id = documentDTO.getDocumentID();
			boolean result = documentResourceFacadeImp.isDocumentExists(id);
			assertEquals(true, result);

			entityManager.getTransaction().begin();
			documentResourceFacadeImp.deleteDocument(documentDTO);
			entityManager.getTransaction().commit();
			documentDTO = null;
			boolean result2 = documentResourceFacadeImp.isDocumentExists(id);
			assertEquals(false, result2);
		} catch (PropertyNotSetException ex) {
			logger.error("PropertyNotSetException while checking whether document exist or not "+ex.getMessage());
			fail("testIsDocumentExists failed");
		}
	}