diff --git a/gui-server/src/test/java/org/onap/policy/gui/server/GuiServerAppMainTest.java b/gui-server/src/test/java/org/onap/policy/gui/server/GuiServerAppMainTest.java
new file mode 100644
index 0000000..d0f6598
--- /dev/null
+++ b/gui-server/src/test/java/org/onap/policy/gui/server/GuiServerAppMainTest.java
@@ -0,0 +1,41 @@
+/*-
+ * ============LICENSE_START=======================================================
+ *  Copyright (C) 2022 Nordix Foundation.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.gui.server;
+
+import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
+
+import org.junit.jupiter.api.Test;
+
+/**
+ * In this test, we check that application can start via main() method.
+ */
+class GuiServerAppMainTest {
+
+    @Test
+    void whenMainIsCalled_thenNoExceptions() {
+        String[] args = {
+            "--server.port=0", // use random available port
+            "--clamp.url=https://clamp-backend:8443/",
+            "--clamp.disable-ssl-validation=true"
+        };
+        assertDoesNotThrow(() -> GuiServerApplication.main(args));
+    }
+}
diff --git a/gui-server/src/test/java/org/onap/policy/gui/server/config/ClampRestTemplateConfig6Test.java b/gui-server/src/test/java/org/onap/policy/gui/server/config/ClampRestTemplateConfig6Test.java
new file mode 100644
index 0000000..d1d3072
--- /dev/null
+++ b/gui-server/src/test/java/org/onap/policy/gui/server/config/ClampRestTemplateConfig6Test.java
@@ -0,0 +1,57 @@
+/*-
+ * ============LICENSE_START=======================================================
+ *  Copyright (C) 2022 Nordix Foundation.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.gui.server.config;
+
+import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
+
+import org.junit.jupiter.api.Test;
+import org.onap.policy.gui.server.test.util.hello.HelloWorldApplication;
+import org.springframework.beans.factory.BeanCreationException;
+import org.springframework.beans.factory.config.AutowireCapableBeanFactory;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.context.ApplicationContext;
+import org.springframework.test.util.ReflectionTestUtils;
+
+/**
+ * In this test, server.ssl.trust-store is unset while SSL validation is enabled.
+ * An BeanCreationException should be thrown on application startup.
+ */
+@SpringBootTest(
+    classes = { HelloWorldApplication.class }
+)
+class ClampRestTemplateConfig6Test {
+
+    @Test
+    void expectExceptionWithNoTrustStore(ApplicationContext context) {
+        // Manually autowire the bean so we can test PostConstruct logic.
+        ClampRestTemplateConfig restTemplateConfig = new ClampRestTemplateConfig();
+        AutowireCapableBeanFactory factory = context.getAutowireCapableBeanFactory();
+        factory.autowireBean(restTemplateConfig);
+
+        // Enable SSL validation, but provide no trust store.
+        ReflectionTestUtils.setField(restTemplateConfig, "disableSslValidation", false);
+
+        // Expect exception when creating bean.
+        assertThatExceptionOfType(BeanCreationException.class)
+            .isThrownBy(() -> factory.initializeBean(restTemplateConfig, "clampRestTemplate"))
+            .withMessageContaining("server.ssl.trust-store must be set");
+    }
+}
diff --git a/gui-server/src/test/java/org/onap/policy/gui/server/filters/ClientSslHeaderFilterTest.java b/gui-server/src/test/java/org/onap/policy/gui/server/filters/ClientSslHeaderFilterTest.java
index 5fc026d..fb56fbc 100644
--- a/gui-server/src/test/java/org/onap/policy/gui/server/filters/ClientSslHeaderFilterTest.java
+++ b/gui-server/src/test/java/org/onap/policy/gui/server/filters/ClientSslHeaderFilterTest.java
@@ -27,12 +27,14 @@
 import static org.junit.jupiter.api.Assertions.assertTrue;
 import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.doNothing;
+import static org.mockito.Mockito.doThrow;
 import static org.mockito.Mockito.mock;
 import static org.onap.policy.gui.server.filters.ClientSslHeaderFilter.SSL_CERT_HEADER_NAME;
 import static org.onap.policy.gui.server.filters.ClientSslHeaderFilter.X509_ATTRIBUTE_NAME;
 import static org.onap.policy.gui.server.util.X509CertificateEncoder.urlDecodeCert;
 
 import java.io.IOException;
+import java.security.cert.CertificateEncodingException;
 import java.security.cert.X509Certificate;
 import java.util.Collections;
 import java.util.Enumeration;
@@ -118,6 +120,29 @@
     }
 
     /*
+     * If there is a CertificateEncodingException, the filter should not set
+     * the X-SSL-Cert header.
+     */
+    @Test
+    void testInvalidClientCert_noHeader() throws Exception {
+        // Create an invalid cert.
+        X509Certificate invalidCert = mock(X509Certificate.class);
+        doThrow(CertificateEncodingException.class).when(invalidCert).getEncoded();
+
+        // Create a request with an invalid client SSL cert.
+        MockHttpServletRequest inRequest = new MockHttpServletRequest();
+        inRequest.setAttribute(X509_ATTRIBUTE_NAME, new X509Certificate[] { invalidCert });
+
+        // Apply the filter.
+        HttpServletRequest outRequest = applyRequestFilter(inRequest);
+
+        // The modified request should not contain a cert header.
+        assertFalse(containsCertHeader(outRequest.getHeaderNames()));
+        assertNull(outRequest.getHeader(SSL_CERT_HEADER_NAME));
+        assertEquals(Collections.emptyEnumeration(), outRequest.getHeaders(SSL_CERT_HEADER_NAME));
+    }
+
+    /*
      * This test is needed to prevent a security vulnerability where a
      * malicious user does not authenticate using client cert, but defines the
      * X-SSL-Cert header themselves, thus gaining access without having the
