Get rid of the warnings from test output

Fix the deprecated code and add a logger.

Change-Id: I7f71ff97e7b58030e829a5429140dfb4361b6053