API tests should tearDown in the correct order

Change-Id: I1305aeb27b6fe229f7c26fa5acb8555919a62bdf