Skip to content

Commit 85c694f

Browse files
committed
Remove unused imports
1 parent 6c65b5c commit 85c694f

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

server/src/test/java/com/cloud/agent/manager/allocator/impl/FirstFitAllocatorTest.java

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,8 @@
4343
import org.apache.cloudstack.api.ApiConstants;
4444
import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
4545
import org.junit.Assert;
46-
import org.junit.Before;
4746
import org.junit.Test;
4847
import org.junit.runner.RunWith;
49-
import org.mockito.ArgumentMatchers;
5048
import org.mockito.InjectMocks;
5149
import org.mockito.Mock;
5250
import org.mockito.Mockito;
@@ -125,7 +123,7 @@ public class FirstFitAllocatorTest {
125123

126124
@Test
127125
public void testConfigure() throws Exception {
128-
when(configDao.getConfiguration(ArgumentMatchers.anyMap())).thenReturn(new HashMap<>());
126+
when(configDao.getConfiguration(Mockito.anyMap())).thenReturn(new HashMap<>());
129127
Assert.assertTrue(firstFitAllocatorSpy._checkHvm);
130128
Assert.assertTrue(firstFitAllocatorSpy.configure("test", new HashMap<>()));
131129
}
@@ -139,12 +137,10 @@ public void testAllocateTo_SuccessfulMatch() {
139137
when(avoid.shouldAvoid(host2)).thenReturn(false);
140138

141139
// CPU capability and capacity is met
142-
when(capacityMgr.checkIfHostReachMaxGuestLimit(ArgumentMatchers.any())).thenReturn(false);
143-
when(capacityMgr.checkIfHostHasCpuCapabilityAndCapacity(ArgumentMatchers.eq(host1), ArgumentMatchers.eq(offering),
144-
ArgumentMatchers.eq(true)))
140+
when(capacityMgr.checkIfHostReachMaxGuestLimit(Mockito.any(Host.class))).thenReturn(false);
141+
when(capacityMgr.checkIfHostHasCpuCapabilityAndCapacity(host1, offering, true))
145142
.thenReturn(new Pair<>(true, true));
146-
when(capacityMgr.checkIfHostHasCpuCapabilityAndCapacity(ArgumentMatchers.eq(host2), ArgumentMatchers.eq(offering),
147-
ArgumentMatchers.eq(true)))
143+
when(capacityMgr.checkIfHostHasCpuCapabilityAndCapacity(host2, offering,true))
148144
.thenReturn(new Pair<>(true, false));
149145

150146
when(resourceManagerMock.isGPUDeviceAvailable(offering, host1, virtualMachineProfile.getId())).thenReturn(true);

0 commit comments

Comments
 (0)