Fixed java api unit test failures.

Change-Id: I902d03f63e52eced193fd6ee1f03d8f52d454e2c
Merge " Fixed java api unit test failures."