Add test for index and for create