added api unit tests