adjusted findKeysTest to work with results in different order