@Test
public void testItemAlreadyExists() {

  // Check success cases.
  assertThat(errorExtractor.itemAlreadyExists(alreadyExists)).isTrue();
  assertThat(errorExtractor.itemAlreadyExists(new IOException(alreadyExists))).isTrue();
  assertThat(errorExtractor.itemAlreadyExists(new IOException(new IOException(alreadyExists))))
      .isTrue();
  // Check failure cases.
  assertThat(errorExtractor.itemAlreadyExists(statusOk)).isFalse();
  assertThat(errorExtractor.itemAlreadyExists(new IOException(statusOk))).isFalse();
}