AP_ID cleanups for tests