@Test
public void test15searchUsers() {

	Query query = Mockito.mock(Query.class);
	EntityManager entityManager = Mockito.mock(EntityManager.class);
	SearchCriteria searchCriteria = new SearchCriteria();
	searchCriteria.setDistinct(true);
	searchCriteria.setGetChildren(true);
	searchCriteria.setGetCount(true);
	searchCriteria.setMaxRows(12);
	searchCriteria.setOwnerId(userId);
	searchCriteria.setStartIndex(1);
	searchCriteria.setSortBy("userId");
	searchCriteria.setSortType("asc");
	Long count = 1l;
	Mockito.when(daoManager.getEntityManager()).thenReturn(entityManager);
	Mockito.when(entityManager.createQuery(Mockito.anyString())).thenReturn(query);
	Mockito.when(query.getSingleResult()).thenReturn(count);
	VXPortalUserList dbVXPortalUserList = userMgr.searchUsers(searchCriteria);
	Assert.assertNotNull(dbVXPortalUserList);
	searchCriteria.setSortBy("loginId");
	dbVXPortalUserList = userMgr.searchUsers(searchCriteria);
	Assert.assertNotNull(dbVXPortalUserList);
	searchCriteria.setSortBy("emailAddress");
	dbVXPortalUserList = userMgr.searchUsers(searchCriteria);
	Assert.assertNotNull(dbVXPortalUserList);
	searchCriteria.setSortBy("firstName");
	dbVXPortalUserList = userMgr.searchUsers(searchCriteria);
	Assert.assertNotNull(dbVXPortalUserList);
	searchCriteria.setSortBy("lastName");
	dbVXPortalUserList = userMgr.searchUsers(searchCriteria);
	Assert.assertNotNull(dbVXPortalUserList);
	searchCriteria.setSortBy("source");
	searchCriteria.setSortType("");
	dbVXPortalUserList = userMgr.searchUsers(searchCriteria);
	Assert.assertNotNull(dbVXPortalUserList);
	searchCriteria.setSortBy("");
	searchCriteria.setSortType("desc");
	dbVXPortalUserList = userMgr.searchUsers(searchCriteria);
	Assert.assertNotNull(dbVXPortalUserList);
}