public static <T extends Serializable> ItemImportResult<T> error(
      Exception exception, Long sizeInBytes) {
    Preconditions.checkNotNull(exception);
    return new ItemImportResult<>(null, sizeInBytes, Status.ERROR, exception);
  }
@Test
  public void testErrorWithNoException() {
    assertThrows(NullPointerException.class, () -> {
      ItemImportResult.error(null, 10L);
    });
  }