@Test
public void testQuotaExceeded() {

  // Check success case.
  assertThat(errorExtractor.quotaExceeded(quotaExceeded)).isTrue();
  assertThat(errorExtractor.quotaExceeded(new IOException(quotaExceeded))).isTrue();
  assertThat(errorExtractor.quotaExceeded(new IOException(new IOException(quotaExceeded))))
      .isTrue();
  // Check failure cases.
  assertThat(errorExtractor.quotaExceeded(statusOk)).isFalse();
  assertThat(errorExtractor.quotaExceeded(new IOException())).isFalse();
  assertThat(errorExtractor.quotaExceeded(new IOException(new IOException()))).isFalse();
  assertThat(errorExtractor.quotaExceeded(null)).isFalse();
}