Competency Testing in Medical and Psychiatric Practice: Legal and Psychological Concepts and Dilemmas