add test for createWithToken