diff --git a/certServiceClient/src/main/java/org/onap/aaf/certservice/client/configuration/EnvsForCsr.java b/certServiceClient/src/main/java/org/onap/aaf/certservice/client/configuration/EnvsForCsr.java
index 5a1d33b..06225d6 100644
--- a/certServiceClient/src/main/java/org/onap/aaf/certservice/client/configuration/EnvsForCsr.java
+++ b/certServiceClient/src/main/java/org/onap/aaf/certservice/client/configuration/EnvsForCsr.java
@@ -52,7 +52,7 @@
         return readEnv(CsrConfigurationEnvs.SANS);
     }
 
-    private Optional<String> readEnv(CsrConfigurationEnvs envName) {
+    Optional<String> readEnv(CsrConfigurationEnvs envName) {
         return envProvider.readEnvVariable(envName.toString());
     }
 }
diff --git a/certServiceClient/src/main/java/org/onap/aaf/certservice/client/configuration/EnvsForTls.java b/certServiceClient/src/main/java/org/onap/aaf/certservice/client/configuration/EnvsForTls.java
index b2f782c..55b536a 100644
--- a/certServiceClient/src/main/java/org/onap/aaf/certservice/client/configuration/EnvsForTls.java
+++ b/certServiceClient/src/main/java/org/onap/aaf/certservice/client/configuration/EnvsForTls.java
@@ -41,7 +41,7 @@
         return readEnv(TlsConfigurationEnvs.TRUSTSTORE_PASSWORD);
     }
 
-    private Optional<String> readEnv(TlsConfigurationEnvs envName) {
+    Optional<String> readEnv(TlsConfigurationEnvs envName) {
         return envProvider.readEnvVariable(envName.toString());
     }
 }
diff --git a/certServiceClient/src/test/java/org/onap/aaf/certservice/client/configuration/EnvsForCsrTest.java b/certServiceClient/src/test/java/org/onap/aaf/certservice/client/configuration/EnvsForCsrTest.java
new file mode 100644
index 0000000..8e0f5bb
--- /dev/null
+++ b/certServiceClient/src/test/java/org/onap/aaf/certservice/client/configuration/EnvsForCsrTest.java
@@ -0,0 +1,194 @@
+/*
+ * ============LICENSE_START=======================================================
+ * aaf-certservice-client
+ * ================================================================================
+ * Copyright (C) 2020 Nokia. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.aaf.certservice.client.configuration;
+
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.mockito.Mockito;
+
+import java.util.Optional;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.mockito.Mockito.when;
+
+class EnvsForCsrTest {
+    private static final String TEST_ENV = "testEnv";
+    private EnvsForCsr envsForCsr;
+
+    @BeforeEach
+    public void setUp() {
+        envsForCsr = Mockito.spy(EnvsForCsr.class);
+    }
+
+    @Test
+    void shouldReturnSystemEnvCommonNameVariableWhenItWasDefined() {
+        // given
+        when(envsForCsr.readEnv(CsrConfigurationEnvs.COMMON_NAME)).thenReturn(Optional.of(TEST_ENV));
+
+        // when
+        final Optional<String> testEnv = envsForCsr.getCommonName();
+
+        // then
+        assertThat(testEnv.isPresent()).isTrue();
+        assertThat(testEnv.get()).isEqualTo(TEST_ENV);
+    }
+
+    @Test
+    public void shouldReportThatSystemEnvCommonNameVariableIsNotPresentWhenItWasNotDefined() {
+        // when
+        final Optional<String> testEnv = envsForCsr.getCommonName();
+
+        // then
+        assertThat(testEnv.isPresent()).isFalse();
+    }
+
+    @Test
+    void shouldReturnSystemEnvOrganizationVariableWhenItWasDefined() {
+        // given
+        when(envsForCsr.readEnv(CsrConfigurationEnvs.ORGANIZATION)).thenReturn(Optional.of(TEST_ENV));
+
+        // when
+        final Optional<String> testEnv = envsForCsr.getOrganization();
+
+        // then
+        assertThat(testEnv.isPresent()).isTrue();
+        assertThat(testEnv.get()).isEqualTo(TEST_ENV);
+    }
+
+    @Test
+    public void shouldReportThatSystemEnvOrganizationVariableIsNotPresentWhenItWasNotDefined() {
+        // when
+        final Optional<String> testEnv = envsForCsr.getOrganization();
+
+        // then
+        assertThat(testEnv.isPresent()).isFalse();
+    }
+
+    @Test
+    void shouldReturnSystemEnvOUVariableWhenItWasDefined() {
+        // given
+        when(envsForCsr.readEnv(CsrConfigurationEnvs.ORGANIZATION_UNIT)).thenReturn(Optional.of(TEST_ENV));
+
+        // when
+        final Optional<String> testEnv = envsForCsr.getOrganizationUnit();
+
+        // then
+        assertThat(testEnv.isPresent()).isTrue();
+        assertThat(testEnv.get()).isEqualTo(TEST_ENV);
+    }
+
+    @Test
+    public void shouldReportThatSystemEnvOUVariableIsNotPresentWhenItWasNotDefined() {
+        // when
+        final Optional<String> testEnv = envsForCsr.getOrganizationUnit();
+
+        // then
+        assertThat(testEnv.isPresent()).isFalse();
+    }
+
+    @Test
+    void shouldReturnSystemEnvLocationVariableWhenItWasDefined() {
+        // given
+        when(envsForCsr.readEnv(CsrConfigurationEnvs.LOCATION)).thenReturn(Optional.of(TEST_ENV));
+
+        // when
+        final Optional<String> testEnv = envsForCsr.getLocation();
+
+        // then
+        assertThat(testEnv.isPresent()).isTrue();
+        assertThat(testEnv.get()).isEqualTo(TEST_ENV);
+    }
+
+    @Test
+    public void shouldReportThatSystemEnvLocationVariableIsNotPresentWhenItWasNotDefined() {
+        // when
+        final Optional<String> testEnv = envsForCsr.getLocation();
+
+        // then
+        assertThat(testEnv.isPresent()).isFalse();
+    }
+
+    @Test
+    void shouldReturnSystemEnvStateVariableWhenItWasDefined() {
+        // given
+        when(envsForCsr.readEnv(CsrConfigurationEnvs.STATE)).thenReturn(Optional.of(TEST_ENV));
+
+        // when
+        final Optional<String> testEnv = envsForCsr.getState();
+
+        // then
+        assertThat(testEnv.isPresent()).isTrue();
+        assertThat(testEnv.get()).isEqualTo(TEST_ENV);
+    }
+
+    @Test
+    public void shouldReportThatSystemEnvStateVariableIsNotPresentWhenItWasNotDefined() {
+        // when
+        final Optional<String> testEnv = envsForCsr.getState();
+
+        // then
+        assertThat(testEnv.isPresent()).isFalse();
+    }
+
+    @Test
+    void shouldReturnSystemEnvCountryVariableWhenItWasDefined() {
+        // given
+        when(envsForCsr.readEnv(CsrConfigurationEnvs.COUNTRY)).thenReturn(Optional.of(TEST_ENV));
+
+        // when
+        final Optional<String> testEnv = envsForCsr.getCountry();
+
+        // then
+        assertThat(testEnv.isPresent()).isTrue();
+        assertThat(testEnv.get()).isEqualTo(TEST_ENV);
+    }
+
+    @Test
+    public void shouldReportThatSystemEnvCountryVariableIsNotPresentWhenItWasNotDefined() {
+        // when
+        final Optional<String> testEnv = envsForCsr.getCountry();
+
+        // then
+        assertThat(testEnv.isPresent()).isFalse();
+    }
+
+    @Test
+    void shouldReturnSystemEnvSANSVariableWhenItWasDefined() {
+        // given
+        when(envsForCsr.readEnv(CsrConfigurationEnvs.SANS)).thenReturn(Optional.of(TEST_ENV));
+
+        // when
+        final Optional<String> testEnv = envsForCsr.getSubjectAlternativesName();
+
+        // then
+        assertThat(testEnv.isPresent()).isTrue();
+        assertThat(testEnv.get()).isEqualTo(TEST_ENV);
+    }
+
+    @Test
+    public void shouldReportThatSystemEnvSANSVariableIsNotPresentWhenItWasNotDefined() {
+        // when
+        final Optional<String> testEnv = envsForCsr.getSubjectAlternativesName();
+
+        // then
+        assertThat(testEnv.isPresent()).isFalse();
+    }
+}
diff --git a/certServiceClient/src/test/java/org/onap/aaf/certservice/client/configuration/EnvsForTlsTest.java b/certServiceClient/src/test/java/org/onap/aaf/certservice/client/configuration/EnvsForTlsTest.java
new file mode 100644
index 0000000..a33d654
--- /dev/null
+++ b/certServiceClient/src/test/java/org/onap/aaf/certservice/client/configuration/EnvsForTlsTest.java
@@ -0,0 +1,129 @@
+/*
+ * ============LICENSE_START=======================================================
+ * aaf-certservice-client
+ * ================================================================================
+ * Copyright (C) 2020 Nokia. All rights reserved.
+ * ================================================================================
+ * 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.aaf.certservice.client.configuration;
+
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.mockito.Mockito;
+
+import java.util.Optional;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.mockito.Mockito.when;
+
+class EnvsForTlsTest {
+
+    private static final String TEST_ENV = "testEnv";
+    private EnvsForTls envsForTls;
+
+    @BeforeEach
+    public void setUp() {
+        envsForTls = Mockito.spy(EnvsForTls.class);
+    }
+
+    @Test
+    void shouldReturnSystemEnvKeyStorePathVariableWhenItWasDefined() {
+        // given
+        when(envsForTls.readEnv(TlsConfigurationEnvs.KEYSTORE_PATH)).thenReturn(Optional.of(TEST_ENV));
+
+        // when
+        final Optional<String> testEnv = envsForTls.getKeystorePath();
+
+        // then
+        assertThat(testEnv.isPresent()).isTrue();
+        assertThat(testEnv.get()).isEqualTo(TEST_ENV);
+    }
+
+    @Test
+    public void shouldReportThatSystemEnvKeyStorePathVariableIsNotPresentWhenItWasNotDefined() {
+        // when
+        final Optional<String> testEnv = envsForTls.getKeystorePath();
+
+        // then
+        assertThat(testEnv.isPresent()).isFalse();
+    }
+
+    @Test
+    void shouldReturnSystemEnvKeyStorePasswordVariableWhenItWasDefined() {
+        // given
+        when(envsForTls.readEnv(TlsConfigurationEnvs.KEYSTORE_PASSWORD)).thenReturn(Optional.of(TEST_ENV));
+
+        // when
+        final Optional<String> testEnv = envsForTls.getKeystorePassword();
+
+        // then
+        assertThat(testEnv.isPresent()).isTrue();
+        assertThat(testEnv.get()).isEqualTo(TEST_ENV);
+    }
+
+    @Test
+    public void shouldReportThatSystemEnvKeyStorePasswordVariableIsNotPresentWhenItWasNotDefined() {
+        // when
+        final Optional<String> testEnv = envsForTls.getKeystorePassword();
+
+        // then
+        assertThat(testEnv.isPresent()).isFalse();
+    }
+
+    @Test
+    void shouldReturnSystemEnvTrustStorePathVariableWhenItWasDefined() {
+        // given
+        when(envsForTls.readEnv(TlsConfigurationEnvs.TRUSTSTORE_PATH)).thenReturn(Optional.of(TEST_ENV));
+
+        // when
+        final Optional<String> testEnv = envsForTls.getTruststorePath();
+
+        // then
+        assertThat(testEnv.isPresent()).isTrue();
+        assertThat(testEnv.get()).isEqualTo(TEST_ENV);
+    }
+
+    @Test
+    public void shouldReportThatSystemEnvTrustStorePathVariableIsNotPresentWhenItWasNotDefined() {
+        // when
+        final Optional<String> testEnv = envsForTls.getTruststorePath();
+
+        // then
+        assertThat(testEnv.isPresent()).isFalse();
+    }
+
+    @Test
+    void shouldReturnSystemEnvTrustStorePasswordVariableWhenItWasDefined() {
+        // given
+        when(envsForTls.readEnv(TlsConfigurationEnvs.TRUSTSTORE_PASSWORD)).thenReturn(Optional.of(TEST_ENV));
+
+        // when
+        final Optional<String> testEnv = envsForTls.getTruststorePassword();
+
+        // then
+        assertThat(testEnv.isPresent()).isTrue();
+        assertThat(testEnv.get()).isEqualTo(TEST_ENV);
+    }
+
+    @Test
+    public void shouldReportThatSystemEnvTrustStorePasswordVariableIsNotPresentWhenItWasNotDefined() {
+        // when
+        final Optional<String> testEnv = envsForTls.getTruststorePassword();
+
+        // then
+        assertThat(testEnv.isPresent()).isFalse();
+    }
+}
