Assign keys and values to variables before doing assertion.