TST/API: Fix broken tests and deprecated API usage

Some of the code was making calls to methods that no longer exist and/or
accessing private member variables.