public static ErrorDetail createErrorDetail(String idempotentId, String title, Exception e, boolean canSkip) {
    return ErrorDetail.builder()
        .setId(idempotentId)
        .setTitle(title)
        .setException(Throwables.getStackTraceAsString(e))
        .setCanSkip(canSkip).build();
  }
@Test
  public void test_createErrorDetail() {
    String id = "testId";
    String title = "testTitle";
    Exception exception =  new IOException();
    boolean canSkip = false;

    ErrorDetail expected = ErrorDetail.builder()
        .setId(id)
        .setTitle(title)
        .setException(Throwables.getStackTraceAsString(exception))
        .setCanSkip(canSkip)
        .build();

    ErrorDetail result = GoogleErrorLogger.createErrorDetail(
        id,
        title,
        exception,
        canSkip
    );

    assertThat(result).isEqualTo(expected);
  }