@Test
public void testBigQueryRateLimited() {

  // Check success case.
  assertThat(errorExtractor.rateLimited(bigqueryRateLimited)).isTrue();
  assertThat(errorExtractor.rateLimited(new IOException(bigqueryRateLimited))).isTrue();
  assertThat(errorExtractor.rateLimited(new IOException(new IOException(bigqueryRateLimited))))
      .isTrue();
  // Check failure cases.
  assertThat(errorExtractor.rateLimited(notRateLimited)).isFalse();
}