using API in behaviour test