Use API types in tests

Change-Id: I04519504e440c27e7d1fc7be4a5d6fa385a61f39