added api request handler unit tests