add test with api