DK101010 commented on a change in pull request #4548:
URL: https://github.com/apache/cloudstack/pull/4548#discussion_r544390439



##########
File path: 
server/src/test/java/org/apache/cloudstack/vm/UnmanagedVMsManagerImplTest.java
##########
@@ -368,6 +358,12 @@ public void importUnmanagedInstanceTest() {
         when(importUnmanageInstanceCmd.getName()).thenReturn("TestInstance");
         when(importUnmanageInstanceCmd.getAccountName()).thenReturn(null);
         when(importUnmanageInstanceCmd.getDomainId()).thenReturn(null);
+        Map<String,Long> diskOfferings = new HashMap();
+        getDisks().forEach((disk) -> {
+            diskOfferings.put(disk.getDiskId(), 43L);
+        });
+        diskOfferings.remove("WrongRootDisk");
+        
when(importUnmanageInstanceCmd.getDataDiskToDiskOfferingList()).thenReturn(diskOfferings);

Review comment:
       You get an exception if it not work. I oriented myself here on the 
existing mockito tests. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to