Tests for all api methods. Add the corrent way to stop the application with Ctrl+Z