Removing warnings of "assigned but unused variable" in test