unit tests for phone & automode logic