test that deletion commands remove the key when structure is empty