@Test
public void test33getServicePoliciesIfUpdated() throws Exception {

	XXServiceDao xServiceDao = Mockito.mock(XXServiceDao.class);
	XXServiceVersionInfoDao xServiceVersionInfoDao = Mockito.mock(XXServiceVersionInfoDao.class);
	XXService xService = new XXService();
	xService.setAddedByUserId(Id);
	xService.setCreateTime(new Date());
	xService.setDescription("Hdfs service");
	xService.setGuid("serviceguid");
	xService.setId(Id);
	xService.setIsEnabled(true);
	xService.setName("Hdfs");
	xService.setPolicyUpdateTime(new Date());
	xService.setPolicyVersion(1L);
	xService.setType(1L);
	xService.setUpdatedByUserId(Id);
	xService.setUpdateTime(new Date());
	XXServiceVersionInfo xServiceVersionInfo = new XXServiceVersionInfo();
	xServiceVersionInfo.setServiceId(Id);
	xServiceVersionInfo.setPolicyVersion(1L);
	xServiceVersionInfo.setPolicyUpdateTime(new Date());
	xServiceVersionInfo.setTagVersion(1L);
	xServiceVersionInfo.setTagUpdateTime(new Date());
	String serviceName = "HDFS_1";
	Long lastKnownVersion = 1l;
	Mockito.when(daoManager.getXXService()).thenReturn(xServiceDao);
	Mockito.when(daoManager.getXXServiceVersionInfo()).thenReturn(xServiceVersionInfoDao);
	Mockito.when(xServiceDao.findByName(serviceName)).thenReturn(xService);
	Mockito.when(xServiceVersionInfoDao.findByServiceName(serviceName)).thenReturn(xServiceVersionInfo);
	ServicePolicies dbServicePolicies = serviceDBStore
			.getServicePoliciesIfUpdated(serviceName, lastKnownVersion, true);
	Assert.assertNull(dbServicePolicies);
}