@Test public void testLocationOptIn() { Audience requiresOptedIn = Audience.newBuilder() .setLocationOptIn(true) .build(); Audience requiresOptedOut = Audience.newBuilder() .setLocationOptIn(false) .build(); assertFalse(AudienceChecks.checkAudience(context, requiresOptedIn)); assertTrue(AudienceChecks.checkAudience(context, requiresOptedOut)); when(locationClient.isOptIn()).thenReturn(true); assertTrue(AudienceChecks.checkAudience(context, requiresOptedIn)); assertFalse(AudienceChecks.checkAudience(context, requiresOptedOut)); }
public static boolean checkAudience(@NonNull Context context, @Nullable Audience audience) { return checkAudience(context, audience, null); }
AudienceChecks { public static boolean checkAudience(@NonNull Context context, @Nullable Audience audience) { return checkAudience(context, audience, null); } }
AudienceChecks { public static boolean checkAudience(@NonNull Context context, @Nullable Audience audience) { return checkAudience(context, audience, null); }  }
AudienceChecks { public static boolean checkAudience(@NonNull Context context, @Nullable Audience audience) { return checkAudience(context, audience, null); }  static boolean checkAudience(@NonNull Context context, @Nullable Audience audience); static boolean checkAudience(@NonNull Context context, @Nullable Audience audience, @Nullable Map<String, Set<String>> tagGroups); }
AudienceChecks { public static boolean checkAudience(@NonNull Context context, @Nullable Audience audience) { return checkAudience(context, audience, null); }  static boolean checkAudience(@NonNull Context context, @Nullable Audience audience); static boolean checkAudience(@NonNull Context context, @Nullable Audience audience, @Nullable Map<String, Set<String>> tagGroups);  }