api unittest fixed