Move common tests into shared example group
Remove line break as well when deleting keys