use of com.cloud.user.AccountService in project cosmic by MissionCriticalCloud.
the class AddVpnUserCmdTest method testCreateSuccess.
@Test
public void testCreateSuccess() {
final AccountService accountService = Mockito.mock(AccountService.class);
final Account account = Mockito.mock(Account.class);
Mockito.when(accountService.getAccount(Matchers.anyLong())).thenReturn(account);
addVpnUserCmd._accountService = accountService;
final RemoteAccessVpnService ravService = Mockito.mock(RemoteAccessVpnService.class);
final VpnUser vpnUser = Mockito.mock(VpnUser.class);
Mockito.when(ravService.addVpnUser(Matchers.anyLong(), Matchers.anyString(), Matchers.anyString())).thenReturn(vpnUser);
addVpnUserCmd._ravService = ravService;
addVpnUserCmd.create();
}
Aggregations