Fix API in tests