refactoring - add Optional
[so.git] / adapters / mso-adapter-utils / src / test / java / org / openecomp / mso / adapter_utils / tests / MsoHeatUtilsWithUpdateTest.java
index 714bb66..62043e8 100644 (file)
@@ -26,6 +26,7 @@ import static org.mockito.Mockito.when;
 import java.util.HashMap;
 import java.util.Map;
 
+import java.util.Optional;
 import org.junit.Before;
 import org.junit.Ignore;
 import org.junit.Test;
@@ -68,8 +69,8 @@ public class MsoHeatUtilsWithUpdateTest {
         cloudIdentity.setKeystoneUrl ("toto");
         cloudIdentity.setMsoPass (CloudIdentity.encryptPassword ("mockId"));
         cloudSite.setIdentityService (cloudIdentity);
-        when (cloudConfig.getCloudSite ("cloud")).thenReturn (cloudSite);
-        when (cloudConfig.getCloudSite ("none")).thenReturn (null);
+        when(cloudConfig.getCloudSite("cloud")).thenReturn (Optional.of(cloudSite));
+        when(cloudConfig.getCloudSite("none")).thenReturn (Optional.empty());
     }
 
     @Test