MDL-43395 wip updates to review comments from Tim

* Make method protected
* Don't use !empty
* Add some more test cases