Adding more unit tests for api and application instance resources