[Misc] Fix Quality profile failure due to previous commit of yesterday (I had fixed a deprecated API call which added a few lines of code and since there were not tests at all on this part, it caused the breakage). Converted AutomaticWatchModeListenerTest to new Mockito test and added tests to it.