Essays on Testing Non-Monotone Relationships