unit tests for some helpers