use of org.onap.so.adapters.nwrest.DeleteNetworkError in project so by onap.
the class NetworkAdapterClientIT method deleteNetworkTestThrowException.
@Test(expected = NetworkAdapterClientException.class)
public void deleteNetworkTestThrowException() throws NetworkAdapterClientException, JsonProcessingException {
DeleteNetworkRequest request = new DeleteNetworkRequest();
request.setCloudSiteId(TESTING_ID);
DeleteNetworkError mockResponse = new DeleteNetworkError();
mockResponse.setMessage("Error in delete network");
wireMockServer.stubFor(delete(urlPathEqualTo(REST_ENDPOINT + "/" + AAI_NETWORK_ID)).willReturn(aResponse().withHeader("Content-Type", "application/json").withBody(mapper.writeValueAsString(mockResponse)).withStatus(500)));
client.deleteNetwork(AAI_NETWORK_ID, request);
}
Aggregations