Update testcase by removing tests depending on deprecated calls

Updated samples by removing calls to deprecated APIs