add factory tests