|
17 | 17 | package org.apache.cloudstack.framework.config; |
18 | 18 |
|
19 | 19 | import static org.mockito.Matchers.any; |
| 20 | +import static org.mockito.Mockito.mock; |
20 | 21 | import static org.mockito.Mockito.times; |
21 | 22 | import static org.mockito.Mockito.verify; |
22 | 23 | import static org.mockito.Mockito.when; |
|
28 | 29 | import org.junit.Before; |
29 | 30 | import org.junit.Test; |
30 | 31 | import org.junit.runner.RunWith; |
31 | | -import org.mockito.Mockito; |
32 | 32 | import org.springframework.context.annotation.Bean; |
33 | 33 | import org.springframework.context.annotation.ComponentScan; |
34 | 34 | import org.springframework.context.annotation.ComponentScan.Filter; |
@@ -94,30 +94,30 @@ public void testAutoPopulation() { |
94 | 94 | _depotAdmin.populateConfigurations(); |
95 | 95 |
|
96 | 96 | // This is once because DynamicIntCK is returned. |
97 | | - verify(_configDao, times(1)).persist(Mockito.any(ConfigurationVO.class)); |
| 97 | + verify(_configDao, times(1)).persist(any(ConfigurationVO.class)); |
98 | 98 |
|
99 | 99 | when(_configDao.findById(DynamicIntCK.key())).thenReturn(dynamicIntCV); |
100 | 100 | _depotAdmin.populateConfigurations(); |
101 | 101 | // This is two because DynamicIntCK also returns null. |
102 | | - verify(_configDao, times(2)).persist(Mockito.any(ConfigurationVO.class)); |
| 102 | + verify(_configDao, times(2)).persist(any(ConfigurationVO.class)); |
103 | 103 | } |
104 | 104 |
|
105 | 105 | @Configuration |
106 | 106 | @ComponentScan(basePackageClasses = {ConfigDepotImpl.class}, includeFilters = {@Filter(value = TestConfiguration.Library.class, type = FilterType.CUSTOM)}, useDefaultFilters = false) |
107 | 107 | static class TestConfiguration extends SpringUtils.CloudStackTestConfiguration { |
108 | 108 | @Bean |
109 | 109 | public Configurable configurable() { |
110 | | - return Mockito.mock(Configurable.class); |
| 110 | + return mock(Configurable.class); |
111 | 111 | } |
112 | 112 |
|
113 | 113 | @Bean |
114 | 114 | public EntityManager entityMgr() { |
115 | | - return Mockito.mock(EntityManager.class); |
| 115 | + return mock(EntityManager.class); |
116 | 116 | } |
117 | 117 |
|
118 | 118 | @Bean |
119 | 119 | public ConfigurationDao configurationDao() { |
120 | | - return Mockito.mock(ConfigurationDao.class); |
| 120 | + return mock(ConfigurationDao.class); |
121 | 121 | } |
122 | 122 |
|
123 | 123 | public static class Library implements TypeFilter { |
|
0 commit comments