More unit tests for APITest.