Begin to write api factory tests