static Builder newBuilder() {
    return new AutoValue_HttpEventPublisher.Builder();
  }
@Test
  public void invalidRootCaTest() {
    CertificateException thrown =
        assertThrows(
            CertificateException.class,
            () -> {
              HttpEventPublisher.newBuilder()
                  .withUrl("https://example.com")
                  .withToken("test-token")
                  .withDisableCertificateValidation(false)
                  .withRootCaCertificate("invalid_ca".getBytes(StandardCharsets.UTF_8))
                  .withEnableGzipHttpCompression(true)
                  .build();
            });

    assertThat(thrown.getMessage(), containsString("parse certificate"));
  }