using the api in tests