Add unit test for item_udpater

To test item_updater easier, mocking utils is necessary.
So add a UtilsInterface to make the mocking eaiser.

Due to the fact that there is templated member functions that could not
be virtual, adding an extra "Impl" virtual function makes it possible to
simulates the mock of templated functions.
See
https://stackoverflow.com/questions/7968023/c-virtual-template-method
for details.

However, using std::any in with googlemock has an issue on GCC9, see
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90415
for details.

So this commit uses std::experimental::any as a workaround.

With the mocked utils, it's easy to test item_updater in different
cases.

This commit adds the test cases for creating PSU objects, when:
* There is no PSU present
* There is one PSU present
* There are two PSUs present with the same version;
* There are two PSUs present with different versions.

Tested: Verify the unit tests passes.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: I5d74ab26b344c5c40bc141f97b8aca42e74ee88e
10 files changed