Add code for testing complex policies. Event sending randomization