CADI AAF Integration and merging the code
[portal.git] / ecomp-portal-BE-common / src / test / java / org / onap / portalapp / portal / service / AdminRolesServiceImplTest.java
index 74fb5da..15f021c 100644 (file)
@@ -432,8 +432,11 @@ public class AdminRolesServiceImplTest {
                epUserApp.setUserId(1l);
                userApps.add(epUserApp);
                user.setUserApps(userApps);
-               Mockito.when((EPUser) dataAccessService.getDomainObject(Matchers.any(), Matchers.anyLong(), Matchers.anyMap()))
-                               .thenReturn(user);
+               List<Integer> userAdminApps =  new ArrayList<>();
+               userAdminApps.add(1);
+               userAdminApps.add(2);
+               Mockito.when(dataAccessService.executeNamedQuery(Matchers.anyString(), Matchers.anyMap(), Matchers.anyMap()))
+                               .thenReturn(userAdminApps);
                boolean actual = adminRolesServiceImpl.isAccountAdminOfApplication(user, app);
                assertTrue(actual);
        }