Fixes required to get java api-lib unit test running