@Test
public void testAccessDenied() {

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