* 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.
* ============LICENSE_END=========================================================
*/
-package org.openecomp.mso.cloudify.connector.http;
+package org.onap.so.cloudify.connector.http;
import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
import static com.github.tomakehurst.wiremock.client.WireMock.post;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
-import org.openecomp.mso.cloudify.base.client.CloudifyConnectException;
-import org.openecomp.mso.cloudify.base.client.CloudifyRequest;
-import org.openecomp.mso.cloudify.base.client.CloudifyResponseException;
-import org.openecomp.mso.cloudify.base.client.Entity;
-import org.openecomp.mso.cloudify.base.client.HttpMethod;
-import org.openecomp.mso.cloudify.v3.model.Deployment;
+import org.onap.so.cloudify.base.client.CloudifyConnectException;
+import org.onap.so.cloudify.base.client.CloudifyRequest;
+import org.onap.so.cloudify.base.client.CloudifyResponseException;
+import org.onap.so.cloudify.base.client.Entity;
+import org.onap.so.cloudify.base.client.HttpMethod;
+import org.onap.so.cloudify.v3.model.Deployment;
public class HttpClientConnectorTest {
}
@Test
- public void rainyDayEmptyResponse(){
+ public void rainyDayEmptyResponse(){
+ wireMockRule.stubFor(get(urlPathEqualTo("/testUrl")).willReturn(aResponse()
+ .withHeader("Content-Type", "application/json").withBody("TEST").withStatus(HttpStatus.SC_NOT_FOUND)));
+
thrown.expect(HttpClientException.class);
int port = wireMockRule.port();
HttpClientConnector conector = new HttpClientConnector();