AMBARI-5405 Cover main app with unit tests, second patch. (atkach)