| | |
| | | /** |
| | | * Default is a self-signed certificate. |
| | | */ |
| | | @Test() |
| | | @Test |
| | | public void testGetDefault() { |
| | | final Certificate cert = new Certificate(); |
| | | assertThat(cert.getType()).isEqualTo(CertificateType.SELF_SIGNED); |
| | |
| | | assertThat(cert.getKeyStorePin()).isEmpty(); |
| | | } |
| | | |
| | | @Test() |
| | | @Test |
| | | public void testValidateDefaultCertificate() throws ConfigException { |
| | | final Certificate cert = new Certificate(); |
| | | cert.validate(); |
| | |
| | | * @throws IOException |
| | | * If an exception occurs when creating the temp keystore. |
| | | */ |
| | | @Test() |
| | | @Test |
| | | public void testValidateJKSCertificate() throws ConfigException, IOException { |
| | | final Certificate cert = new Certificate(); |
| | | cert.setType(CertificateType.JKS); |