fix const error in api test