Make case in upsert consistent and improve verification a bit in test for PHOENIX-841