Fix API Tests-compatible with machine api changes