What are the primary differences between functional and non-functional testing, and when would you prioritize one over the other?