Fix unit tests with api samples

Change-Id: I170145275bc758448d8e71d7a2de770ee0bc2a20