diff options
author | Salma, Attaran <salma.attaran@amdocs.com> | 2018-02-06 15:31:16 -0500 |
---|---|---|
committer | Salma, Attaran <salma.attaran@amdocs.com> | 2018-02-06 15:33:24 -0500 |
commit | fc82c51d2a399813bfb55ede8ab341400dfce03a (patch) | |
tree | 0fc13d5822a00bbde170ce7ee184d328b31f8e70 | |
parent | 10f3bd738258130fa1558dd8ae8ba2a1342993ab (diff) |
Cleaning code
Change-Id: Idc82bf8f84a0b6268ae10ea12d1bec670509a58a
Signed-off-by: Salma, Attaran <salma.attaran@amdocs.com>
Issue-ID: AAI-733
16 files changed, 53 insertions, 141 deletions
@@ -114,12 +114,6 @@ <scope>test</scope> </dependency> - <!-- <dependency> <groupId>com.att.csp</groupId> <artifactId>gatekeeper</artifactId> - <version>1.0</version> <scope>system</scope> <systemPath>${project.basedir}/local-repository/gatekeeper-1.0.jar</systemPath> - </dependency> <dependency> <groupId>com.att.csp</groupId> <artifactId>PSE_Lite</artifactId> - <version>1.0</version> <scope>system</scope> <systemPath>${project.basedir}/local-repository/PSE_Lite-1.0.jar</systemPath> - </dependency> --> - <dependency> <groupId>org.eclipse.persistence</groupId> <artifactId>eclipselink</artifactId> diff --git a/src/main/java/org/onap/aai/sparky/analytics/AbstractStatistics.java b/src/main/java/org/onap/aai/sparky/analytics/AbstractStatistics.java index 2dd7d93..c753d3b 100644 --- a/src/main/java/org/onap/aai/sparky/analytics/AbstractStatistics.java +++ b/src/main/java/org/onap/aai/sparky/analytics/AbstractStatistics.java @@ -49,7 +49,6 @@ public class AbstractStatistics implements ComponentStatistics { * sync-lock the creation of counters during initialization, but run time should not use lock * synchronization, only thread safe types * - * @see com.att.ecomp.uicommon.resolver.stat.ComponentStatistics#addCounter(java.lang.String) */ @Override public synchronized void addCounter(String key) { diff --git a/src/main/java/org/onap/aai/sparky/inventory/entity/GeoIndexDocument.java b/src/main/java/org/onap/aai/sparky/inventory/entity/GeoIndexDocument.java index 383172a..241cb8c 100644 --- a/src/main/java/org/onap/aai/sparky/inventory/entity/GeoIndexDocument.java +++ b/src/main/java/org/onap/aai/sparky/inventory/entity/GeoIndexDocument.java @@ -162,7 +162,6 @@ public class GeoIndexDocument implements Serializable, IndexDocument { /* * (non-Javadoc) * - * @see com.att.queryrouter.dao.DocumentStoreDataEntity#getAsJson() */ @Override diff --git a/src/main/java/org/onap/aai/sparky/inventory/entity/TopographicalEntity.java b/src/main/java/org/onap/aai/sparky/inventory/entity/TopographicalEntity.java index 5467238..aacc009 100644 --- a/src/main/java/org/onap/aai/sparky/inventory/entity/TopographicalEntity.java +++ b/src/main/java/org/onap/aai/sparky/inventory/entity/TopographicalEntity.java @@ -131,7 +131,6 @@ public class TopographicalEntity implements Serializable { /* * (non-Javadoc) * - * @see com.att.queryrouter.dao.DocumentStoreDataEntity#getAsJson() */ public String getAsJson() throws IOException { diff --git a/src/main/java/org/onap/aai/sparky/search/filters/config/FiltersDetailsConfig.java b/src/main/java/org/onap/aai/sparky/search/filters/config/FiltersDetailsConfig.java index 09eec02..80fe3fe 100644 --- a/src/main/java/org/onap/aai/sparky/search/filters/config/FiltersDetailsConfig.java +++ b/src/main/java/org/onap/aai/sparky/search/filters/config/FiltersDetailsConfig.java @@ -25,8 +25,9 @@ package org.onap.aai.sparky.search.filters.config; import java.util.ArrayList; import java.util.List; -import com.att.aft.dme2.internal.jackson.annotate.JsonCreator; -import com.att.aft.dme2.internal.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + public class FiltersDetailsConfig { @JsonProperty("filters") diff --git a/src/main/java/org/onap/aai/sparky/search/filters/config/FiltersForViewsConfig.java b/src/main/java/org/onap/aai/sparky/search/filters/config/FiltersForViewsConfig.java index 7340758..07aea31 100644 --- a/src/main/java/org/onap/aai/sparky/search/filters/config/FiltersForViewsConfig.java +++ b/src/main/java/org/onap/aai/sparky/search/filters/config/FiltersForViewsConfig.java @@ -25,8 +25,8 @@ package org.onap.aai.sparky.search.filters.config; import java.util.ArrayList; import java.util.List; -import com.att.aft.dme2.internal.jackson.annotate.JsonCreator; -import com.att.aft.dme2.internal.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; public class FiltersForViewsConfig { diff --git a/src/main/java/org/onap/aai/sparky/search/filters/config/UiFilterConfig.java b/src/main/java/org/onap/aai/sparky/search/filters/config/UiFilterConfig.java index c566565..94f6d97 100644 --- a/src/main/java/org/onap/aai/sparky/search/filters/config/UiFilterConfig.java +++ b/src/main/java/org/onap/aai/sparky/search/filters/config/UiFilterConfig.java @@ -24,7 +24,7 @@ package org.onap.aai.sparky.search.filters.config; import java.util.List; -import com.att.aft.dme2.internal.jackson.annotate.JsonCreator; +import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/src/main/java/org/onap/aai/sparky/search/filters/config/UiFilterDataSourceConfig.java b/src/main/java/org/onap/aai/sparky/search/filters/config/UiFilterDataSourceConfig.java index be0603b..be600b0 100644 --- a/src/main/java/org/onap/aai/sparky/search/filters/config/UiFilterDataSourceConfig.java +++ b/src/main/java/org/onap/aai/sparky/search/filters/config/UiFilterDataSourceConfig.java @@ -22,7 +22,7 @@ */ package org.onap.aai.sparky.search.filters.config; -import com.att.aft.dme2.internal.jackson.annotate.JsonCreator; +import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/src/main/java/org/onap/aai/sparky/search/filters/config/UiFilterListItemConfig.java b/src/main/java/org/onap/aai/sparky/search/filters/config/UiFilterListItemConfig.java index c1ee089..2dfc894 100644 --- a/src/main/java/org/onap/aai/sparky/search/filters/config/UiFilterListItemConfig.java +++ b/src/main/java/org/onap/aai/sparky/search/filters/config/UiFilterListItemConfig.java @@ -22,48 +22,47 @@ */ package org.onap.aai.sparky.search.filters.config; -import com.att.aft.dme2.internal.jackson.annotate.JsonCreator; +import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonProperty; @JsonInclude(Include.NON_NULL) public class UiFilterListItemConfig { - @JsonProperty("filterId") - private String filterId; - - @JsonProperty("defaultValue") - private UiFilterOptionsValuesConfig defaultValue; - + @JsonProperty("filterId") + private String filterId; - @JsonCreator - public UiFilterListItemConfig(@JsonProperty("filterId") final String filterId, @JsonProperty("defaultValue") final UiFilterOptionsValuesConfig defaultValue) { - this.filterId = filterId; - this.defaultValue = defaultValue; - } + @JsonProperty("defaultValue") + private UiFilterOptionsValuesConfig defaultValue; - @JsonProperty("filterId") - public String getFilterId() { - return filterId; - } + @JsonCreator + public UiFilterListItemConfig(@JsonProperty("filterId") final String filterId, + @JsonProperty("defaultValue") final UiFilterOptionsValuesConfig defaultValue) { + this.filterId = filterId; + this.defaultValue = defaultValue; + } - public void setFilterId(String filterId) { - this.filterId = filterId; - } + @JsonProperty("filterId") + public String getFilterId() { + return filterId; + } - @JsonProperty("defaultValue") - public UiFilterOptionsValuesConfig getDefaultValue() { - return defaultValue; - } + public void setFilterId(String filterId) { + this.filterId = filterId; + } - public void setDefaultValue(UiFilterOptionsValuesConfig defaultValue) { - this.defaultValue = defaultValue; - } + @JsonProperty("defaultValue") + public UiFilterOptionsValuesConfig getDefaultValue() { + return defaultValue; + } - @Override - public String toString() { - return "FilterListItemEntity [filterId=" + filterId + ", defaultValue=" + defaultValue + "]"; - } + public void setDefaultValue(UiFilterOptionsValuesConfig defaultValue) { + this.defaultValue = defaultValue; + } + + @Override + public String toString() { + return "FilterListItemEntity [filterId=" + filterId + ", defaultValue=" + defaultValue + "]"; + } - } diff --git a/src/main/java/org/onap/aai/sparky/search/filters/config/UiFilterOptionsValuesConfig.java b/src/main/java/org/onap/aai/sparky/search/filters/config/UiFilterOptionsValuesConfig.java index 2abdfdd..38b8bc8 100644 --- a/src/main/java/org/onap/aai/sparky/search/filters/config/UiFilterOptionsValuesConfig.java +++ b/src/main/java/org/onap/aai/sparky/search/filters/config/UiFilterOptionsValuesConfig.java @@ -22,7 +22,7 @@ */ package org.onap.aai.sparky.search.filters.config; -import com.att.aft.dme2.internal.jackson.annotate.JsonCreator; +import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/src/main/java/org/onap/aai/sparky/search/filters/config/UiViewListItemConfig.java b/src/main/java/org/onap/aai/sparky/search/filters/config/UiViewListItemConfig.java index 3707417..210039c 100644 --- a/src/main/java/org/onap/aai/sparky/search/filters/config/UiViewListItemConfig.java +++ b/src/main/java/org/onap/aai/sparky/search/filters/config/UiViewListItemConfig.java @@ -25,7 +25,7 @@ package org.onap.aai.sparky.search.filters.config; import java.util.ArrayList; import java.util.List; -import com.att.aft.dme2.internal.jackson.annotate.JsonCreator; +import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; public class UiViewListItemConfig { diff --git a/src/main/java/org/onap/aai/sparky/security/portal/PortalRestAPIServiceImpl.java b/src/main/java/org/onap/aai/sparky/security/portal/PortalRestAPIServiceImpl.java index 3bfc7ea..9728922 100644 --- a/src/main/java/org/onap/aai/sparky/security/portal/PortalRestAPIServiceImpl.java +++ b/src/main/java/org/onap/aai/sparky/security/portal/PortalRestAPIServiceImpl.java @@ -64,9 +64,6 @@ public class PortalRestAPIServiceImpl implements IPortalRestAPIService { /* * (non-Javadoc) * - * @see - * com.att.fusion.core.onboarding.crossapi.IPortalRestAPIService#pushUser(com.att.fusion.core. - * restful.domain.EcompUser) */ @Override public void pushUser(EcompUser user) throws PortalAPIException { @@ -91,8 +88,6 @@ public class PortalRestAPIServiceImpl implements IPortalRestAPIService { /* * (non-Javadoc) * - * @see com.att.fusion.core.onboarding.crossapi.IPortalRestAPIService#editUser(java.lang.String, - * com.att.fusion.core.restful.domain.EcompUser) */ @Override public void editUser(String loginId, EcompUser user) throws PortalAPIException { @@ -116,7 +111,6 @@ public class PortalRestAPIServiceImpl implements IPortalRestAPIService { /* * (non-Javadoc) * - * @see com.att.fusion.core.onboarding.crossapi.IPortalRestAPIService#getUser(java.lang.String) */ @Override public EcompUser getUser(String loginId) throws PortalAPIException { @@ -131,7 +125,6 @@ public class PortalRestAPIServiceImpl implements IPortalRestAPIService { /* * (non-Javadoc) * - * @see com.att.fusion.core.onboarding.crossapi.IPortalRestAPIService#getUsers() */ @Override public List<EcompUser> getUsers() throws PortalAPIException { @@ -157,7 +150,6 @@ public class PortalRestAPIServiceImpl implements IPortalRestAPIService { * (non-Javadoc) * * @see - * com.att.fusion.core.onboarding.crossapi.IPortalRestAPIService#getUserRoles(java.lang.String) */ @Override public List<EcompRole> getUserRoles(String loginId) throws PortalAPIException { @@ -168,9 +160,6 @@ public class PortalRestAPIServiceImpl implements IPortalRestAPIService { /* * (non-Javadoc) * - * @see - * com.att.fusion.core.onboarding.crossapi.IPortalRestAPIService#pushUserRole(java.lang.String, - * java.util.List) */ @Override public void pushUserRole(String loginId, List<EcompRole> roles) throws PortalAPIException { @@ -197,9 +186,6 @@ public class PortalRestAPIServiceImpl implements IPortalRestAPIService { /* * (non-Javadoc) * - * @see - * com.att.fusion.core.onboarding.crossapi.IPortalRestAPIService#isAppAuthenticated(javax.servlet. - * http.HttpServletRequest) */ @Override public boolean isAppAuthenticated(HttpServletRequest request) throws PortalAPIException { diff --git a/src/main/java/org/onap/aai/sparky/util/NodeUtils.java b/src/main/java/org/onap/aai/sparky/util/NodeUtils.java index a62292d..94c2b3e 100644 --- a/src/main/java/org/onap/aai/sparky/util/NodeUtils.java +++ b/src/main/java/org/onap/aai/sparky/util/NodeUtils.java @@ -404,12 +404,12 @@ public class NodeUtils { String resourceId = null; if ("/".equals(link.substring(linkLength - 1))) { // Use-case: - // https://aai-ext1.test.att.com:9292/aai/v7/business/customers/customer/1607_20160524Func_Ak1_01/service-subscriptions/service-subscription/uCPE-VMS/ + // https://ext1.test.onap.com:9292/aai/v7/business/customers/customer/1607_20160524Func_Ak1_01/service-subscriptions/service-subscription/uCPE-VMS/ startIndex = link.lastIndexOf("/", linkLength - 2); resourceId = link.substring(startIndex + 1, linkLength - 1); } else { // Use-case: - // https://aai-ext1.test.att.com:9292/aai/v7/business/customers/customer/1607_20160524Func_Ak1_01/service-subscriptions/service-subscription/uCPE-VMS + // https://ext1.test.onap.com:9292/aai/v7/business/customers/customer/1607_20160524Func_Ak1_01/service-subscriptions/service-subscription/uCPE-VMS startIndex = link.lastIndexOf("/"); resourceId = link.substring(startIndex + 1, linkLength); } diff --git a/src/main/java/org/onap/aai/sparky/viewandinspect/entity/ActiveInventoryNode.java b/src/main/java/org/onap/aai/sparky/viewandinspect/entity/ActiveInventoryNode.java index 2c3b97f..c5d9b4a 100644 --- a/src/main/java/org/onap/aai/sparky/viewandinspect/entity/ActiveInventoryNode.java +++ b/src/main/java/org/onap/aai/sparky/viewandinspect/entity/ActiveInventoryNode.java @@ -459,7 +459,6 @@ public class ActiveInventoryNode { } public boolean isDirectSelfLink() { - // https://aai-int1.test.att.com:8443/aai/v8/resources/id/2458124400 return isDirectSelfLink(this.selfLink); } @@ -470,8 +469,7 @@ public class ActiveInventoryNode { * @return true, if is direct self link */ public static boolean isDirectSelfLink(String link) { - // https://aai-int1.test.att.com:8443/aai/v8/resources/id/2458124400 - + if (link == null) { return false; } diff --git a/src/test/java/org/onap/aai/sparky/dal/sas/entity/SearchAbstractionEntityBuilder.java b/src/test/java/org/onap/aai/sparky/dal/sas/entity/SearchAbstractionEntityBuilder.java index 7cfd9c9..88dff42 100644 --- a/src/test/java/org/onap/aai/sparky/dal/sas/entity/SearchAbstractionEntityBuilder.java +++ b/src/test/java/org/onap/aai/sparky/dal/sas/entity/SearchAbstractionEntityBuilder.java @@ -41,7 +41,7 @@ public class SearchAbstractionEntityBuilder { doc.addContent("entityPrimaryKeyValue", "example-vnf-id-val-4394"); doc.addContent("entityType", "vpe"); doc.addContent("searchTags", "example-vnf-id-val-4394;example-vnf-name-val-4394;example-vnf-name2-val-4394"); - doc.addContent("link", "https://aai-ext1.test.att.com:8443/aai/v9/network/vpes/vpe/example-vnf-id-val-4394"); + doc.addContent("link", "https://ext1.test.onap.com:8443/aai/v9/network/vpes/vpe/example-vnf-id-val-4394"); doc.addContent("searchTagIDs", "0;1;2"); doc.addContent("lastmodTimestamp", "2017-04-18T17:20:48.072-0400"); @@ -64,7 +64,7 @@ public class SearchAbstractionEntityBuilder { doc.addContent("entityPrimaryKeyValue", "vpe-vnf-id-team4-11"); doc.addContent("entityType", "vpe"); doc.addContent("searchTags", "vpe-vnf-id-team4-11;example-vnf-name-val-9512;example-vnf-name2-val-9512"); - doc.addContent("link", "https://aai-ext1.test.att.com:8443/aai/v9/network/vpes/vpe/vpe-vnf-id-team4-11"); + doc.addContent("link", "https://ext1.test.onap.com:8443/aai/v9/network/vpes/vpe/vpe-vnf-id-team4-11"); doc.addContent("searchTagIDs", "0;1;2"); doc.addContent("lastmodTimestamp", "2017-04-18T17:20:48.175-0400"); @@ -87,7 +87,7 @@ public class SearchAbstractionEntityBuilder { doc.addContent("entityPrimaryKeyValue", "example-vnf-id-val-6176"); doc.addContent("entityType", "generic-vnf"); doc.addContent("searchTags", "example-vnf-id-val-6176;example-vnf-name-val-6176;example-vnf-name2-val-6176"); - doc.addContent("link", "https://aai-ext1.test.att.com:8443/aai/v9/network/generic-vnfs/generic-vnf/example-vnf-id-val-6176"); + doc.addContent("link", "https://ext1.test.onap.com:8443/aai/v9/network/generic-vnfs/generic-vnf/example-vnf-id-val-6176"); doc.addContent("searchTagIDs", "0;1;2"); doc.addContent("lastmodTimestamp", "2017-04-18T17:29:39.889-0400"); @@ -110,7 +110,7 @@ public class SearchAbstractionEntityBuilder { doc.addContent("entityPrimaryKeyValue", "vnf-id-team4-11"); doc.addContent("entityType", "newvce"); doc.addContent("searchTags", "vnf-id-team4-11;example-vnf-name-val-5313;example-vnf-name2-val-5313"); - doc.addContent("link", "https://aai-ext1.test.att.com:8443/aai/v9/network/newvces/newvce/vnf-id-team4-11"); + doc.addContent("link", "https://ext1.test.onap.com:8443/aai/v9/network/newvces/newvce/vnf-id-team4-11"); doc.addContent("searchTagIDs", "0;1;2"); doc.addContent("lastmodTimestamp", "2017-04-18T17:21:08.142-0400"); @@ -133,7 +133,7 @@ public class SearchAbstractionEntityBuilder { doc.addContent("entityPrimaryKeyValue", "example-vnf-id2-val-9501"); doc.addContent("entityType", "newvce"); doc.addContent("searchTags", "example-vnf-id2-val-9501;example-vnf-name-val-9501;example-vnf-name2-val-9501"); - doc.addContent("link", "https://aai-ext1.test.att.com:8443/aai/v9/network/newvces/newvce/example-vnf-id2-val-9501"); + doc.addContent("link", "https://ext1.test.onap.com:8443/aai/v9/network/newvces/newvce/example-vnf-id2-val-9501"); doc.addContent("searchTagIDs", "0;1;2"); doc.addContent("lastmodTimestamp", "2017-04-18T17:21:23.323-0400"); @@ -156,7 +156,7 @@ public class SearchAbstractionEntityBuilder { doc.addContent("entityPrimaryKeyValue", "vnf-id-dm-auto-10"); doc.addContent("entityType", "vce"); doc.addContent("searchTags", "vpe-id-dm-auto-10;vnf-id-dm-auto-10;vnf-name-dm-auto-10;vnf-name2-dm-auto-10"); - doc.addContent("link", "https://aai-ext1.test.att.com:8443/aai/v9/network/vces/vce/vnf-id-dm-auto-10"); + doc.addContent("link", "https://ext1.test.onap.com:8443/aai/v9/network/vces/vce/vnf-id-dm-auto-10"); doc.addContent("searchTagIDs", "0;1;2;3"); doc.addContent("lastmodTimestamp", "2017-04-18T17:24:57.209-0400"); @@ -179,7 +179,7 @@ public class SearchAbstractionEntityBuilder { doc.addContent("entityPrimaryKeyValue", "e3e59c5b-ad48-44d0-b3e4-80eacdcee4c7"); doc.addContent("entityType", "generic-vnf"); doc.addContent("searchTags", "e3e59c5b-ad48-44d0-b3e4-80eacdcee4c7;VNF_Test_vNF_modules_01"); - doc.addContent("link", "https://aai-ext1.test.att.com:8443/aai/v9/network/generic-vnfs/generic-vnf/e3e59c5b-ad48-44d0-b3e4-80eacdcee4c7"); + doc.addContent("link", "https://ext1.test.onap.com:8443/aai/v9/network/generic-vnfs/generic-vnf/e3e59c5b-ad48-44d0-b3e4-80eacdcee4c7"); doc.addContent("searchTagIDs", "0;1"); doc.addContent("lastmodTimestamp", "2017-04-18T17:26:34.603-0400"); @@ -202,7 +202,7 @@ public class SearchAbstractionEntityBuilder { doc.addContent("entityPrimaryKeyValue", "fusion-jitsi-vnf-001"); doc.addContent("entityType", "generic-vnf"); doc.addContent("searchTags", "fusion-jitsi-vnf-001;fusion-jitsi-vnf"); - doc.addContent("link", "https://aai-ext1.test.att.com:8443/aai/v9/network/generic-vnfs/generic-vnf/fusion-jitsi-vnf-001"); + doc.addContent("link", "https://ext1.test.onap.com:8443/aai/v9/network/generic-vnfs/generic-vnf/fusion-jitsi-vnf-001"); doc.addContent("searchTagIDs", "0;1"); doc.addContent("lastmodTimestamp", "2017-04-18T17:28:14.293-0400"); @@ -225,7 +225,7 @@ public class SearchAbstractionEntityBuilder { doc.addContent("entityPrimaryKeyValue", "vnfm0003v"); doc.addContent("entityType", "generic-vnf"); doc.addContent("searchTags", "vnfm0003v;vnfm0003v"); - doc.addContent("link", "https://aai-ext1.test.att.com:8443/aai/v9/network/generic-vnfs/generic-vnf/vnfm0003v"); + doc.addContent("link", "https://ext1.test.onap.com:8443/aai/v9/network/generic-vnfs/generic-vnf/vnfm0003v"); doc.addContent("searchTagIDs", "0;1"); doc.addContent("lastmodTimestamp", "2017-04-18T17:29:39.594-0400"); @@ -248,7 +248,7 @@ public class SearchAbstractionEntityBuilder { doc.addContent("entityPrimaryKeyValue", "amist456vnf"); doc.addContent("entityType", "generic-vnf"); doc.addContent("searchTags", "amist456vnf;amist456vnf"); - doc.addContent("link", "https://aai-ext1.test.att.com:8443/aai/v9/network/generic-vnfs/generic-vnf/amist456vnf"); + doc.addContent("link", "https://ext1.test.onap.com:8443/aai/v9/network/generic-vnfs/generic-vnf/amist456vnf"); doc.addContent("searchTagIDs", "0;1"); doc.addContent("lastmodTimestamp", "2017-04-18T17:28:28.163-0400"); diff --git a/src/test/java/org/onap/aai/sparky/editattributes/EditAttributesTest.java b/src/test/java/org/onap/aai/sparky/editattributes/EditAttributesTest.java index 0d65dad..4e7e80a 100644 --- a/src/test/java/org/onap/aai/sparky/editattributes/EditAttributesTest.java +++ b/src/test/java/org/onap/aai/sparky/editattributes/EditAttributesTest.java @@ -25,36 +25,16 @@ package org.onap.aai.sparky.editattributes; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - -import java.io.File; import java.io.IOException; import java.io.InputStream; -import java.io.PrintWriter; -import java.security.Principal; import javax.servlet.ReadListener; -import javax.servlet.ServletException; import javax.servlet.ServletInputStream; -import javax.servlet.ServletOutputStream; -import javax.servlet.http.Cookie; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import org.apache.commons.io.FileUtils; import org.apache.commons.io.IOUtils; -import org.apache.openejb.core.security.jaas.UserPrincipal; import org.junit.Before; import org.junit.BeforeClass; -import org.junit.Test; -import org.onap.aai.sparky.editattributes.AttributeEditProcessor; -import org.onap.aai.sparky.editattributes.entity.EditRequest; -import com.att.aft.dme2.internal.jettison.json.JSONException; -import com.att.aft.dme2.internal.jettison.json.JSONObject; /** * The Class EditAttributesTest. @@ -145,50 +125,7 @@ public class EditAttributesTest { } */ - /** - * Test get att uid. - * - * @throws IOException Signals that an I/O exception has occurred. - * @throws ServletException the servlet exception - */ - /* - @Test - public void testGetAttUid() throws IOException, ServletException { - HttpServletRequest mockRequest = mock(HttpServletRequest.class); - HttpServletResponse mockResponse = mock(HttpServletResponse.class); - ServletOutputStream mockOutput = mock(ServletOutputStream.class); - ServletInputStream mockInput = new MockServletInputStream(sampleJsonRequest); - - when(mockRequest.getRequestURI()).thenReturn("editAttributes"); - when(mockResponse.getOutputStream()).thenReturn(mockOutput); - - when(mockRequest.getInputStream()).thenReturn(mockInput); - - Principal princip = new UserPrincipal("ds1150"); - - when(mockRequest.getUserPrincipal()).thenReturn(princip); - - PrintWriter writer = new PrintWriter("editServletTest.txt"); - when(mockResponse.getWriter()).thenReturn(writer); - when(mockRequest.getCookies()).thenReturn(new Cookie[] {new Cookie("attESHr", - "DENNIS|SEBASTIAN|dennis.sebastian@amdocs.com|||ko2649||ds1150," - + "RBFMSKQ,Z9V2298,9762186|YNNNNNNNNNNNNNYNNYYNNNNN|DENNIS|EY6SC9000|")}); - AttributeEditProcessor aes = new AttributeEditProcessor(); - String attid = aes.getAttUid(mockRequest); - assertEquals(" Expected ATTUID is wrong", "ds1150", attid); - - when(mockRequest.getCookies()).thenReturn(new Cookie[] {new Cookie("attESHr", - "DENNIS%7cSEBASTIAN%7cdennisse%40amdocs%2ecom%7c%7c%7cko2649%7c%7cds1150%2cRDJJFLM%" - + "2cP86NJ85%2c8127688%7cYNNNNNNNNNNNNNYNNYNYNNNN%7cDENNIS%7cEY6SC9000%7c")}); - attid = aes.getAttUid(mockRequest); - assertEquals(" Expected ATTUID is wrong", "ds1150", attid); - - when(mockRequest.getCookies()).thenReturn(new Cookie[] {}); - attid = aes.getAttUid(mockRequest); - assertEquals(" Expected Empty ID", "", attid); - - } - */ + /** * The Class MockServletInputStream. |