The Table Spread - 5:106
"Believers, when death comes to one of you, let two just witnesses be present from among you at the time of the will. And if death comes to you while you are traveling, two of you who are not of you. If you are in doubt, detain the witnesses after the prayer and say in the name of Allah: "We will not exchange our testimony for anything, not even relatives, nor conceal the testimony of Allah. Otherwise, we shall be among the sinners."
Allah holds responsible those who swear deliberately:
The Table Spread/5:89
Allah does not hold you responsible for the oaths you take at random. But He holds you responsible for what you swear knowingly. If you break your oath, the punishment is to feed or clothe ten poor out of what you usually feed your family, or to release a slave. Whoever cannot find it should fast for three days. This is the punishment for your oaths that you knowingly took. Keep your oaths. This is how Allah explains His verses so that you may respond well.