Is it OK to test (tempt) God? | Answering the Atheist

Inquiry:
Is it OK to test (or tempt) God? Deuteronomy 6:16; Matthew 4:7; and Luke 4:12 reveal that we should not test God, but Judges 6:36-40, 1 Kings 18:36-38, and 2 Kings 29:8-11 all show that it is OK to test God. Is there a contradiction?