Fix api.prepare_test

Change-Id: I02c65f1f555a7b74fa2d4a7e4567c4a1eff699b4