DummyApprovalRequest nonExecutableRequest = new DummyApprovalRequest(reqadmincert,null,caid,SecConst.EMPTY_ENDENTITYPROFILE,false);
DummyApprovalRequest nonExecutableRequest = new DummyApprovalRequest(reqadmin,null,caid,SecConst.EMPTY_ENDENTITYPROFILE,false);
	public void testIsApproved() throws Exception {		DummyApprovalRequest nonExecutableRequest = new DummyApprovalRequest(reqadmincert,null,caid,SecConst.EMPTY_ENDENTITYPROFILE,false);		pub.addApprovalRequest(reqadmin, nonExecutableRequest);						int status = pub.isApproved(reqadmin, nonExecutableRequest.generateApprovalId());		assertTrue(status == 2);				Approval approval1 = new Approval("ap1test");		pub.approve(admin1, nonExecutableRequest.generateApprovalId(), approval1);				status = pub.isApproved(reqadmin, nonExecutableRequest.generateApprovalId());		assertTrue(status == 1);				Approval approval2 = new Approval("ap2test");		pub.approve(admin2, nonExecutableRequest.generateApprovalId(), approval2);				status = pub.isApproved(reqadmin, nonExecutableRequest.generateApprovalId());		assertTrue(status == ApprovalDataVO.STATUS_APPROVED);						// Test that the approval exipres as it should		Thread.sleep(5000);				try{		  status = pub.isApproved(reqadmin, nonExecutableRequest.generateApprovalId());		  fail("A ApprovalRequestExpiredException should be thrown here");		}catch(ApprovalRequestExpiredException e){}				status = pub.isApproved(reqadmin, nonExecutableRequest.generateApprovalId());		assertTrue(status == ApprovalDataVO.STATUS_EXPIREDANDNOTIFIED);				Collection result = pub.findApprovalDataVO(admin1, nonExecutableRequest.generateApprovalId());					ApprovalDataVO next = (ApprovalDataVO) result.iterator().next();				pub.removeApprovalRequest(admin1, next.getId());	}