Added Singelton to unit test

To support more then one testcase i have added a singelton to the ApiTest