Removed getInstance from test
remove usage of deprecated marked functions (cherry picked from commit 3dac61c)