@Test public void testTagSelectorWithGroups() { final Set<String> tags = new HashSet<>(); when(airshipChannel.getTags()).then(new Answer<Set<String>>() { @Override public Set<String> answer(InvocationOnMock invocation) throws Throwable { return tags; } }); Audience audience = Audience.newBuilder() .setTagSelector(TagSelector.tag("expected tag", "expected group")) .build(); Map<String, Set<String>> tagGroups = new HashMap<>(); assertFalse(AudienceChecks.checkAudience(context, audience, tagGroups)); tagGroups.put("expected group", tagSet("expected tag")); assertTrue(AudienceChecks.checkAudience(context, audience, tagGroups)); }
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);  }