summaryrefslogtreecommitdiffstats
path: root/src/test/java/org/onap/aai/validation/services/TestValidateServiceImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/org/onap/aai/validation/services/TestValidateServiceImpl.java')
-rw-r--r--src/test/java/org/onap/aai/validation/services/TestValidateServiceImpl.java29
1 files changed, 13 insertions, 16 deletions
diff --git a/src/test/java/org/onap/aai/validation/services/TestValidateServiceImpl.java b/src/test/java/org/onap/aai/validation/services/TestValidateServiceImpl.java
index f1cdce6..d1e538f 100644
--- a/src/test/java/org/onap/aai/validation/services/TestValidateServiceImpl.java
+++ b/src/test/java/org/onap/aai/validation/services/TestValidateServiceImpl.java
@@ -1,19 +1,22 @@
-/*
- * ============LICENSE_START===================================================
- * Copyright (c) 2018 Amdocs
- * ============================================================================
+/**
+ * ============LICENSE_START=======================================================
+ * org.onap.aai
+ * ================================================================================
+ * Copyright (c) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (c) 2018-2019 European Software Marketing Ltd.
+ * ================================================================================
* 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
+ * 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=====================================================
+ * ============LICENSE_END=========================================================
*/
package org.onap.aai.validation.services;
@@ -22,7 +25,6 @@ import static org.hamcrest.CoreMatchers.notNullValue;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertThat;
-import java.net.URISyntaxException;
import java.security.cert.X509Certificate;
import java.util.Collections;
import java.util.List;
@@ -34,7 +36,7 @@ import org.junit.Test;
import org.mockito.Mockito;
import org.onap.aai.auth.AAIMicroServiceAuth;
import org.onap.aai.validation.controller.ValidationController;
-import org.onap.aai.validation.services.ValidateServiceImpl;
+import org.onap.aai.validation.test.util.TestUtil;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
@@ -72,15 +74,10 @@ public class TestValidateServiceImpl {
}
/**
- * Create a (mocked) HTTPS request and invoke the Babel generate artifacts API
- *
- * @param request
- * for the Babel Service
- * @return the Response from the HTTP API
- * @throws URISyntaxException
+ * Create a (mocked) HTTPS request and invoke the Validation Service API.
*/
@Test
- public void testRequestWithHeaders() throws URISyntaxException {
+ public void testRequestWithHeaders() {
// Create mocked request headers map
MultivaluedHashMap<String, String> headersMap = new MultivaluedHashMap<>();
headersMap.put("X-TransactionId", createSingletonList("transaction-id"));
@@ -97,7 +94,7 @@ public class TestValidateServiceImpl {
servletRequest.setScheme("https");
servletRequest.setServerPort(9501);
servletRequest.setServerName("localhost");
- servletRequest.setRequestURI("/services/validation-service/v1/app/validate");
+ servletRequest.setRequestURI(TestUtil.VALIDATION_SERVICE_URL);
X509Certificate mockCertificate = Mockito.mock(X509Certificate.class);
Mockito.when(mockCertificate.getSubjectX500Principal())