A new method for constructing exact tests without making any assumptions