Add tests to bindEntityEvents and unbindEntityEvents

Tests for #1035