@Test
public void testCheckClientId() {

  // Empty allowed list or client Id.
  assertFalse(GoogleAuth.checkClientId(CLIENT_ID1, ImmutableList.<String>of(), true));
  assertFalse(GoogleAuth.checkClientId(CLIENT_ID1, null, true));
  assertFalse(GoogleAuth.checkClientId("", CLIENT_ID_LIST, true));
  assertFalse(GoogleAuth.checkClientId(null, CLIENT_ID_LIST, true));
  // ["*"]
  assertTrue(
      GoogleAuth.checkClientId(CLIENT_ID1, GoogleAuth.SKIP_CLIENT_ID_CHECK_LIST, true));
  assertFalse(
      GoogleAuth.checkClientId(CLIENT_ID1, GoogleAuth.SKIP_CLIENT_ID_CHECK_LIST, false));
  // In or not in whitelist.
  assertTrue(GoogleAuth.checkClientId(CLIENT_ID1, CLIENT_ID_LIST, true));
  assertFalse(GoogleAuth.checkClientId(CLIENT_ID2, CLIENT_ID_LIST, true));
}