tests for writing to api terminal