use of com.google.cloud.security.privateca.v1.CertificateTemplate in project java-security-private-ca by googleapis.
the class SnippetsIT method testCreateCertificateTemplate.
@Test
public void testCreateCertificateTemplate() throws IOException {
// Check that the Certificate template has been created as part of the setup.
try (CertificateAuthorityServiceClient certificateAuthorityServiceClient = CertificateAuthorityServiceClient.create()) {
String certificateTemplate = certificateAuthorityServiceClient.getCertificateTemplate(CertificateTemplateName.of(PROJECT_ID, LOCATION, CERTIFICATE_TEMPLATE_NAME).toString()).getName();
assertThat(certificateTemplate).contains(String.format("projects/%s/locations/%s/", PROJECT_ID, LOCATION));
}
}
Aggregations