Fix contexts in api-mock