summaryrefslogtreecommitdiffstats
path: root/common-app-api/src/main/java
diff options
context:
space:
mode:
authorxuegao <xue.gao@intl.att.com>2021-03-22 11:22:47 +0100
committerxuegao <xue.gao@intl.att.com>2021-03-24 08:25:00 +0100
commit134ca5667da901a703ecb0c78d96873712a9d0d3 (patch)
tree38738cddb2798a54d1f81c22d005b9ff1e0c79f0 /common-app-api/src/main/java
parenteb57d1efc197968a4073b331b2dc8f40d8109847 (diff)
Improve test coverage
Add unit tests to improve test coverage. Issue-ID: SDC-3428 Change-Id: I9e00af2824366ae45d47d2dcecf322fd3e9a6fea Signed-off-by: xuegao <xue.gao@intl.att.com>
Diffstat (limited to 'common-app-api/src/main/java')
-rw-r--r--common-app-api/src/main/java/org/openecomp/sdc/common/http/config/ClientCertificate.java35
1 files changed, 2 insertions, 33 deletions
diff --git a/common-app-api/src/main/java/org/openecomp/sdc/common/http/config/ClientCertificate.java b/common-app-api/src/main/java/org/openecomp/sdc/common/http/config/ClientCertificate.java
index 1f6c070094..c318a3b514 100644
--- a/common-app-api/src/main/java/org/openecomp/sdc/common/http/config/ClientCertificate.java
+++ b/common-app-api/src/main/java/org/openecomp/sdc/common/http/config/ClientCertificate.java
@@ -21,9 +21,11 @@
package org.openecomp.sdc.common.http.config;
import fj.data.Either;
+import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.StringUtils;
import org.onap.sdc.security.SecurityUtil;
+@EqualsAndHashCode
public class ClientCertificate {
private String keyStore;
private String keyStorePassword;
@@ -68,39 +70,6 @@ public class ClientCertificate {
public String getKeyStorePassword() {
return keyStorePassword;
}
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((keyStore == null) ? 0 : keyStore.hashCode());
- result = prime * result + ((keyStorePassword == null) ? 0 : keyStorePassword.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- ClientCertificate other = (ClientCertificate) obj;
- if (keyStore == null) {
- if (other.keyStore != null)
- return false;
- }
- else if (!keyStore.equals(other.keyStore))
- return false;
- if (keyStorePassword == null) {
- if (other.keyStorePassword != null)
- return false;
- }
- else if (!keyStorePassword.equals(other.keyStorePassword))
- return false;
- return true;
- }
@Override
public String toString() {