added api test script to lib