@Test
public void test30getPolicyFromEventTime() throws Exception {

	HttpServletRequest request = Mockito.mock(HttpServletRequest.class);
	String strdt = new Date().toString();
	String userName="Admin";
	Set<String> userGroupsList = new HashSet<String>();
	userGroupsList.add("group1");
	userGroupsList.add("group2");
	Mockito.when(request.getParameter("eventTime")).thenReturn(strdt);
	Mockito.when(request.getParameter("policyId")).thenReturn("1");
	Mockito.when(request.getParameter("versionNo")).thenReturn("1");
	RangerPolicy policy=new RangerPolicy();
	Map<String, RangerPolicyResource> resources=new HashMap<String, RangerPolicy.RangerPolicyResource>();
	policy.setService("services");
	policy.setResources(resources);
	Mockito.when(svcStore.getPolicyFromEventTime(strdt, 1l)).thenReturn(policy);
	Mockito.when(bizUtil.isAdmin()).thenReturn(false);
	Mockito.when(bizUtil.getCurrentUserLoginId()).thenReturn(userName);
	Mockito.when(restErrorUtil.createRESTException(Mockito.anyInt(), Mockito.anyString(), Mockito.anyBoolean()))
			.thenThrow(new WebApplicationException());
	thrown.expect(WebApplicationException.class);

	RangerPolicy dbRangerPolicy = serviceREST
			.getPolicyFromEventTime(request);
	Assert.assertNull(dbRangerPolicy);
	Mockito.verify(request).getParameter("eventTime");
	Mockito.verify(request).getParameter("policyId");
	Mockito.verify(request).getParameter("versionNo");
}