Minor fixes to TestCase::callApi