* ============LICENSE_START=======================================================
* ONAP-PAP-REST
* ================================================================================
* ============LICENSE_START=======================================================
* ONAP-PAP-REST
* ================================================================================
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import static org.assertj.core.api.Assertions.assertThatCode;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.junit.Assert.assertEquals;
import static org.assertj.core.api.Assertions.assertThatCode;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.junit.Assert.assertEquals;
assertThatThrownBy(() -> creation.savePolicy(policyData, response))
.isInstanceOf(IllegalArgumentException.class);
policyData.setConfigPolicyType("Base");
assertThatThrownBy(() -> creation.savePolicy(policyData, response))
.isInstanceOf(IllegalArgumentException.class);
policyData.setConfigPolicyType("Base");
assertThatCode(() -> creation.savePolicy(policyData, response)).doesNotThrowAnyException();
policyData.setConfigPolicyType("ClosedLoop_PM");
assertThatThrownBy(() -> creation.savePolicy(policyData, response))
assertThatCode(() -> creation.savePolicy(policyData, response)).doesNotThrowAnyException();
policyData.setConfigPolicyType("ClosedLoop_PM");
assertThatThrownBy(() -> creation.savePolicy(policyData, response))