Have created a function of the minimum required and test code.

Create test code before writing the actual code.
Fix function name
Add process to get authToken when authToken is empty.
Fix method of process
Fix function type.

Because I will replace updateAuthTokenIfNeeded() from openSession() in mainThreadOneProc().
Add a function of "ArmZabbixAPI::updateAuthTokenIfNeeded".

This function used in the testing phase.
Fix name of function call. And to clarify how to test.
Fix when openSession() function failed, return false.
Add debug message.And change to use updateAuthTokenIfNeeded().
Add empty class inherited HatoholException.

This empty class use to exception handling in mainThreadOneProc().
Add handling process when exception occur.
Add a comment about support processing of exception handling in the future.
Fix type to catch when exception occurs.
Add debug message when authToken is null.
Change contents of debug message.
Fix content of debug message.
Fix type of exception catch.
Delete unnecessary space.
Add get authToken by condition.
Fix give multiple roles in a function.
And add a function return only authToken.