Update DiscouragedFunctionsUnitTest to check for warnings