GpsHelper { static void updateClientMetadata(final Context context, final Object adInfo) { String advertisingId = reflectedGetAdvertisingId(adInfo, null); boolean isLimitAdTrackingEnabled = reflectedIsLimitAdTrackingEnabled(adInfo, false); ClientMetadata clientMetadata = ClientMetadata.getInstance(context); clientMetadata.setAdvertisingInfo(advertisingId, isLimitAdTrackingEnabled); }  static boolean isLimitAdTrackingEnabled(Context context); static void fetchAdvertisingInfoAsync(final Context context, final GpsHelperListener gpsHelperListener); @Deprecated static void setClassNamesForTesting(); static final int GOOGLE_PLAY_SUCCESS_CODE; static final String ADVERTISING_ID_KEY; static final String IS_LIMIT_AD_TRACKING_ENABLED_KEY; }
@Test public void updateClientMetadata_whenPassingInValidAdInfoObject_shouldUpdateClientMetadata() throws Exception { MethodBuilderFactory.setInstance(new MethodBuilderFactory()); verifyCleanClientMetadata(context); GpsHelper.updateClientMetadata(context, adInfo); verifyClientMetadata(context, adInfo); }