Improved test

Removed needless delete lines, added log lines and shared ensureGreen calls