Question: If the testament was written by the deceased, he or she has done so before he or she died. 
Answer: yes