@Test
public void testPermissionFilterTakesOverNullInputFilter()
	throws Exception {

	long userId = RandomTestUtil.randomLong();
	whenIndexerIsPermissionAware(true);
	whenPermissionCheckerGetUser(_user);
	whenPermissionCheckerGetUserBag(_userBag);
	whenUserGetUserId(userId);
	BooleanFilter booleanFilter = null;
	BooleanFilter permissionBooleanFilter =
		_searchPermissionChecker.getPermissionBooleanFilter(
			0, null, userId, null, booleanFilter, new SearchContext());
	Assert.assertNotNull(permissionBooleanFilter);
}