Added helper test and refactored other tests