Two Methods of Constructing Exact Tests, with Applications to Tests of Goodness of Fit, Normality, Serial Independence and Randomness of a Series of Events