Add a test script for the API