adding test for api method