completed Api unittests