add integration tests for starting and stopping