Shut down test API properly.