Forensic Medicine

Testamentary capacity is ?