|
16 | 16 | // under the License. |
17 | 17 | package com.cloud.user; |
18 | 18 |
|
19 | | -import static org.junit.Assert.assertThrows; |
20 | 19 | import static org.mockito.ArgumentMatchers.nullable; |
21 | 20 |
|
22 | 21 | import java.net.InetAddress; |
@@ -1299,12 +1298,6 @@ public void testAssertUserNotAlreadyInAccount_UserExistsInDiffAccount() { |
1299 | 1298 | Account newAccount = Mockito.mock(Account.class); |
1300 | 1299 | Mockito.when(newAccount.getId()).thenReturn(1L); |
1301 | 1300 |
|
1302 | | - AccountVO existingAccount = Mockito.mock(AccountVO.class); |
1303 | | - Mockito.when(existingAccount.getUuid()).thenReturn("existing-account-uuid"); |
1304 | | - Mockito.when(existingAccount.getAccountName()).thenReturn("existing-account"); |
1305 | | - |
1306 | | - Mockito.when(_accountDao.findById(1L)).thenReturn(existingAccount); |
1307 | | - |
1308 | 1301 | accountManagerImpl.assertUserNotAlreadyInAccount(existingUser, newAccount); |
1309 | 1302 | } |
1310 | 1303 |
|
@@ -1343,15 +1336,8 @@ public void testAssertUserNotAlreadyInDomain_UserExistsInDiffDomain() { |
1343 | 1336 |
|
1344 | 1337 | AccountVO existingAccount = Mockito.mock(AccountVO.class); |
1345 | 1338 | Mockito.when(existingAccount.getDomainId()).thenReturn(2L); |
1346 | | - Mockito.when(existingAccount.getUuid()).thenReturn("existing-account-uuid"); |
1347 | | - Mockito.when(existingAccount.getAccountName()).thenReturn("existing-account"); |
1348 | | - |
1349 | | - DomainVO existingDomain = Mockito.mock(DomainVO.class); |
1350 | | - Mockito.when(existingDomain.getUuid()).thenReturn("existing-domain-uuid"); |
1351 | | - Mockito.when(existingDomain.getName()).thenReturn("existing-domain"); |
1352 | 1339 |
|
1353 | 1340 | Mockito.when(_accountDao.findById(1L)).thenReturn(existingAccount); |
1354 | | - Mockito.when(_domainDao.findById(1L)).thenReturn(existingDomain); |
1355 | 1341 |
|
1356 | 1342 | accountManagerImpl.assertUserNotAlreadyInDomain(existingUser, originalAccount); |
1357 | 1343 | } |
|
0 commit comments