stop using deprecated APIs from bot
updated test logic