Added helper functions to unit test spec