summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitattributes21
-rw-r--r--deliveries/Apps_Users_OnBoarding_Script.sql56
-rw-r--r--deliveries/README.md2
-rw-r--r--deliveries/properties_rackspace/ECOMPPORTALAPP/system.properties7
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/com/openecomp/portalapp/portal/ecomp/test/model/AppCatalogItemTest.java35
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/com/openecomp/portalapp/portal/ecomp/test/model/AppCategoryFunctionsItemTest.java42
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/com/openecomp/portalapp/portal/ecomp/test/model/AppContactUsItemTest.java49
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/com/openecomp/portalapp/portal/ecomp/test/model/SearchResultItemTest.java41
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/lm/FusionLicenseManagerImplTest.java28
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/lm/LicenseableClassImplTest.java30
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/AppsControllerExternalRequestTest.java30
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/AuditLogControllerTest.java102
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/BEPropertyReaderControllerTest.java1
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/BasicAuthAccountControllerTest.java30
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/DashboardControllerTest.java427
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/EPFusionBaseControllerTest.java64
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/ExternalAccessRolesControllerTest.java509
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/FunctionalMenuControllerTest.java320
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/MicroserviceControllerTest.java27
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/RoleManageControllerTest.java189
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/RolesApprovalSystemControllerTest.java39
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/SchedulerControllerTest.java75
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/SessionCommunicationControllerTest.java59
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/UserControllerTest.java12
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/UserRolesControllerTest.java178
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/WidgetsCatalogController.java111
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/AdminUserAppTest.java36
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/AdminUserApplicationsTest.java57
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/AppContactUsTest.java32
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/CentralRoleFunctionTest.java31
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPAppRoleFunctionTest.java27
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPAppTest.java61
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPEndpointAccountTest.java29
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPEndpointTest.java27
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPRoleTest.java36
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPUserAppCatalogRolesTest.java32
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPUserAppRolesRequestDetailTest.java54
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPUserAppRolesTest.java28
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPUserAppTest.java85
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPUserAppsManualSortPreferenceTest.java29
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPUserAppsSortPreferenceTest.java43
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPUserNotificationTest.java34
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPUserTest.java114
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPWidgetsManualSortPreferenceTest.java36
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EcompAppRoleIdTest.java33
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EcompAppRoleTest.java31
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/ExternalRoleDetailsTest.java59
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/ExternalSystemAccessTest.java27
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/ExternalSystemRoleApprovalTest.java23
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/FunctionalMenuItemWithAppIDTest.java28
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/GetAccessResultIdTest.java29
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/MicroserviceDataTest.java57
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/MicroserviceParameterTest.java31
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/PersUserAppSelectionTest.java35
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/PersUserWidgetSelectionTest.java36
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/ResultTest.java29
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/SharedContextTest.java36
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/UserIdRoleIdTest.java29
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/WidgetCatalogParameterTest.java33
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/WidgetCatalogTest.java84
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/WidgetParameterResultTest.java33
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/WidgetTest.java34
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/service/AppContactUsServiceImplTest.java147
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/service/DashboardSearchServiceImplTest.java114
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/service/EPRoleFunctionServiceCentralizedImplTest.java89
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/service/EPRoleFunctionServiceImplTest.java98
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/service/EPRoleServiceImplTest.java208
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/service/ExternalAccessRolesServiceImplTest.java346
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/service/FunctionalMenuMockServiceImplTest.java205
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/service/GetAccessServiceImplTest.java50
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/service/LicenseableClassImplTest.java61
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/service/ManifestServiceImplTest.java55
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/service/PersUserAppServiceImplTest.java181
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/AnalyticsTest.java33
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/AppCatalogPersonalizationTest.java25
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/AppNameIdIsAdminTest.java38
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/AppWithRolesForUserTest.java32
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/AppsListWithAdminRoleTest.java46
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/BulkUploadRoleFunctionTest.java35
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/BulkUploadUserRolesTest.java37
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/BusinessCardApplicationRoleTest.java26
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/BusinessCardApplicationRolesListTest.java26
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/CentralAppTest.java102
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/CentralRoleTest.java63
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/CentralUserAppTest.java41
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/CentralUserTest.java52
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/EPAppsManualPreferenceTest.java47
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/EPAppsSortPreferenceTest.java29
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/EPDeleteAppsManualSortPrefTest.java29
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/EPUserAppCurrentRolesTest.java41
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/EPWidgetsSortPreferenceTest.java41
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/EcompUserAppRolesTest.java33
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/EpNotificationItemExtVOTest.java33
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/EpNotificationItemTest.java64
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/EpNotificationItemVOTest.java46
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/EpRoleNotificationItemTest.java31
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/ExternalAccessPermsDetailTest.java39
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/ExternalAccessPermsTest.java42
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/ExternalAccessRolePermsTest.java35
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/ExternalAccessRoleTest.java26
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/ExternalAccessUserRoleDetailTest.java47
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/ExternalAccessUserTest.java24
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/ExternalRoleDescriptionTest.java35
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/FunctionalMenuItemTest.java42
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/FunctionalMenuRoleTest.java40
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/RemoteUserWithRolesTest.java65
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/RoleInAppForUserTest.java37
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/UserApplicationRolesTest.java58
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/UserWithNameSurnameTitleTest.java19
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/WidgetCatalogPersonalizationTest.java25
-rw-r--r--ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/test/exceptions/NoHealthyServiceExceptionTest.java23
-rw-r--r--ecomp-portal-BE-common/pom.xml108
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/controller/EPFusionBaseController.java8
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/ExternalAccessRolesController.java15
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/FunctionalMenuController.java1
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/PolicyController.java105
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/SchedulerController.java248
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/TicketEventController.java11
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/UserRolesController.java48
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/WebAnalyticsExtAppController.java6
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/EPApp.java151
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/EPRole.java1
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/EPUserAppRolesRequest.java55
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/EPUserAppRolesRequestDetail.java37
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/MicroserviceParameter.java4
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/PersUserAppSelection.java37
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/PersUserWidgetSelection.java37
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/listener/HealthMonitor.java5
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/RestObject.java44
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/SchedulerProperties.java20
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/SchedulerResponseWrapper.java71
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/SchedulerRestInt.java44
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/SchedulerRestInterface.java200
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/SchedulerRestInterfaceFactory.java15
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/SchedulerRestInterfaceIfc.java22
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/SchedulerUtil.java99
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/client/HttpBasicClient.java67
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/client/HttpsBasicClient.java144
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/policy/PolicyProperties.java26
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/policy/PolicyResponseWrapper.java56
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/policy/PolicyRestInt.java67
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/policy/PolicyRestInterface.java235
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/policy/PolicyRestInterfaceFactory.java14
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/policy/PolicyRestInterfaceIfc.java58
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/policy/PolicyUtil.java71
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/policy/RestObject.java68
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/policy/rest/RequestDetails.java107
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/properties/VidProperties.java40
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/restobjects/GetTimeSlotsRestObject.java11
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/restobjects/PostCreateNewVnfRestObject.java10
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/restobjects/PostSubmitVnfChangeRestObject.java10
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/restobjects/RestObject.java39
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/util/CustomJacksonJaxBJsonProvider.java73
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/wrapper/GetTimeSlotsWrapper.java5
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/wrapper/PostCreateNewVnfWrapper.java39
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/wrapper/PostSubmitVnfChangeTimeSlotsWrapper.java38
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/wrapper/SchedulerResponseWrapper.java57
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/AdminRolesServiceImpl.java5
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/EPRoleServiceImpl.java2
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/ExternalAccessRolesService.java11
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/ExternalAccessRolesServiceImpl.java642
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/FunctionalMenuServiceImpl.java2
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/PortalAdminServiceImpl.java5
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/TicketEventService.java9
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/UserRolesCommonServiceImpl.java48
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/Analytics.java10
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/CentralApp.java161
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/CentralRole.java88
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/CentralUser.java328
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/CommonWidget.java1
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/EcompUserRoles.java172
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/ExternalAccessPerms.java47
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/ExternalAccessUserRoleDetail.java31
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/ExternalRoleDescription.java53
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/RemoteRole.java29
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/UserWithNameSurnameTitle.java43
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/ueb/EPUebHelper.java5
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/service/sessionmgt/SessionCommunication.java197
-rw-r--r--ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion/orm/EP.hbm.xml29
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/AppCatalogControllerTest.java263
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/AppContactUsControllerTest.java274
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/AppsControllerExternalRequestTest.java273
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/AppsControllerTest.java914
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/AuditLogControllerTest.java102
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/BEPropertyReaderControllerTest.java72
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/BasicAuthAccountControllerTest.java264
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/CommonWidgetControllerTest.java84
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/ConsulClientControllerTest.java142
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/DashboardControllerTest.java427
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/DashboardSearchResultControllerTest.java366
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/EPFusionBaseControllerTest.java63
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/ExternalAccessRolesControllerTest.java532
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/ExternalAppsRestfulControllerTest.java174
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/FunctionalMenuControllerTest.java506
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/GetAccessControllerTest.java71
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/ManifestControllerTest.java56
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/MicroserviceControllerTest.java232
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/MicroserviceProxyControllerTest.java106
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/PortalAdminControllerTest.java155
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/RoleManageControllerTest.java189
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/RolesApprovalSystemControllerTest.java336
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/SessionCommunicationControllerTest.java59
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/TicketEventControllerTest.java99
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/UserControllerTest.java141
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/UserNotificationControllerTest.java263
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/UserRolesControllerTest.java308
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/WebAnalyticsExtAppControllerTest.java110
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/WidgetsCatalogControllerTest.java87
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/WidgetsCatalogMarkupControllerTest.java72
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/core/MockEPUser.java84
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/core/PopulateSampleTestData.java66
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/core/RemoveSampleTestData.java65
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/core/RestURLsTestSuite.java334
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/AdminUserAppTest.java36
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/AdminUserApplicationsTest.java57
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/AppContactUsTest.java32
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/CentralRoleFunctionTest.java31
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPAppRoleFunctionTest.java27
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPAppTest.java61
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPEndpointAccountTest.java29
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPEndpointTest.java27
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPRoleTest.java36
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserAppCatalogRolesTest.java32
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserAppRolesRequestDetailTest.java54
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserAppRolesTest.java28
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserAppTest.java85
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserAppsManualSortPreferenceTest.java29
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserAppsSortPreferenceTest.java43
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserNotificationTest.java34
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserTest.java114
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPWidgetsManualSortPreferenceTest.java36
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EcompAppRoleIdTest.java33
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EcompAppRoleTest.java31
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/ExternalRoleDetailsTest.java59
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/ExternalSystemAccessTest.java27
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/ExternalSystemRoleApprovalTest.java23
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/FunctionalMenuItemWithAppIDTest.java28
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/GetAccessResultIdTest.java29
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/MicroserviceDataTest.java57
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/MicroserviceParameterTest.java31
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/PersUserAppSelectionTest.java35
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/PersUserWidgetSelectionTest.java36
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/ResultTest.java29
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/SharedContextTest.java36
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/UserIdRoleIdTest.java29
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/WidgetCatalogParameterTest.java33
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/WidgetCatalogTest.java84
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/WidgetParameterResultTest.java33
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/WidgetTest.java34
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/exceptions/NoHealthyServiceExceptionTest.java23
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/framework/ApplicationCommonContextTestSuite.java172
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/framework/MockitoTestSuite.java76
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/lm/FusionLicenseManagerImplTest.java29
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/lm/LicenseableClassImplTest.java31
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/model/AppCatalogItemTest.java35
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/model/AppCategoryFunctionsItemTest.java42
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/model/AppContactUsItemTest.java49
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/model/SearchResultItemTest.java41
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/AppContactUsServiceImplTest.java147
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/DashboardSearchServiceImplTest.java114
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/EPRoleFunctionServiceCentralizedImplTest.java89
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/EPRoleFunctionServiceImplTest.java98
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/EPRoleServiceImplTest.java208
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/ExternalAccessRolesServiceImplTest.java391
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/FunctionalMenuMockServiceImplTest.java204
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/FunctionalMenuServiceImplTest.java73
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/GetAccessServiceImplTest.java50
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/LicenseableClassImplTest.java61
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/ManifestServiceImplTest.java55
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/PersUserAppServiceImplTest.java181
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/AnalyticsTest.java33
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/AppCatalogPersonalizationTest.java25
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/AppNameIdIsAdminTest.java38
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/AppWithRolesForUserTest.java32
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/AppsListWithAdminRoleTest.java46
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/BulkUploadRoleFunctionTest.java35
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/BulkUploadUserRolesTest.java37
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/BusinessCardApplicationRoleTest.java26
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/BusinessCardApplicationRolesListTest.java26
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/CentralAppTest.java102
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/CentralRoleTest.java63
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/CentralUserAppTest.java41
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/CentralUserTest.java52
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EPAppsManualPreferenceTest.java47
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EPAppsSortPreferenceTest.java29
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EPDeleteAppsManualSortPrefTest.java29
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EPUserAppCurrentRolesTest.java41
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EPWidgetsSortPreferenceTest.java41
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EcompUserAppRolesTest.java33
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EpNotificationItemExtVOTest.java33
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EpNotificationItemTest.java64
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EpNotificationItemVOTest.java46
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EpRoleNotificationItemTest.java31
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalAccessPermsDetailTest.java39
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalAccessPermsTest.java42
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalAccessRolePermsTest.java35
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalAccessRoleTest.java26
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalAccessUserRoleDetailTest.java47
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalAccessUserTest.java24
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalRoleDescriptionTest.java35
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/FunctionalMenuItemTest.java42
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/FunctionalMenuRoleTest.java40
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/RemoteUserWithRolesTest.java65
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/RoleInAppForUserTest.java37
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/UserApplicationRolesTest.java58
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/UserWithNameSurnameTitleTest.java19
-rw-r--r--ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/WidgetCatalogPersonalizationTest.java25
-rw-r--r--ecomp-portal-BE-os/README.md8
-rw-r--r--ecomp-portal-BE-os/pom.xml184
-rw-r--r--ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/controller/ONAPWelcomeController.java2
-rw-r--r--ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/service/SearchServiceImpl.java1
-rw-r--r--ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/service/TicketEventServiceImpl.java18
-rw-r--r--ecomp-portal-BE-os/src/main/webapp/WEB-INF/conf/system.properties26
-rw-r--r--ecomp-portal-BE-os/src/main/webapp/WEB-INF/jsp/welcome.jsp695
-rw-r--r--ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/authentication/OpenIdConnectLoginStrategyTest.java118
-rw-r--r--ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/authentication/SessionTimeoutInterceptorTest.java55
-rw-r--r--ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/authentication/SimpleLoginStrategyTest.java134
-rw-r--r--ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/controller/AppsControllerExternalRequestOSTest.java119
-rw-r--r--ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/controller/AppsOSControllerTest.java150
-rw-r--r--ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/controller/ECOMPLogoutControllerTest.java77
-rw-r--r--ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/controller/LoginControllerTest.java84
-rw-r--r--ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/controller/ONAPLoginControllerTest.java89
-rw-r--r--ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/controller/ONAPWelcomeControllerTest.java47
-rw-r--r--ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/controller/PortalAdminControllerOSTest.java142
-rw-r--r--ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/framework/MockEPUser.java84
-rw-r--r--ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/framework/MockTestSuite.java68
-rw-r--r--ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/framework/MockitoTestSuite.java75
-rw-r--r--ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/service/RemoteWebServiceCallServiceImplTest.java148
-rw-r--r--ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/service/SearchServiceImplTest.java189
-rw-r--r--ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/service/UserServiceImplTest.java63
-rw-r--r--ecomp-portal-DB-common/EcompPortalDDLMySql_1710_Common.sql4
-rw-r--r--ecomp-portal-FE-common/client/app/directives/search-users/search-users.controller.spec.js2
-rw-r--r--ecomp-portal-FE-common/client/app/services/notification/notification.service.js4
-rw-r--r--ecomp-portal-FE-common/client/app/views/dashboard/dashboard-widget.controller.js3
-rw-r--r--ecomp-portal-FE-common/client/app/views/functionalMenu/functionalMenu-dialog/menu-details.controller.js4
-rw-r--r--ecomp-portal-FE-common/client/app/views/header/header.less7
-rw-r--r--ecomp-portal-FE-common/client/app/views/microservice-onboarding/microservice-add-details/microservice-add-details.js8
-rw-r--r--ecomp-portal-FE-common/client/app/views/user-notifications-admin/user.notifications.modal.controller.js51
-rw-r--r--ecomp-portal-FE-common/client/app/views/user-notifications-admin/user.notifications.modal.page.html6
-rw-r--r--ecomp-portal-FE-common/client/app/views/users/new-user-dialogs/new-user.controller.js14
-rw-r--r--ecomp-portal-FE-common/client/app/views/widget-onboarding/widget-onboarding.controller.js2
-rw-r--r--ecomp-portal-FE-os/client/src/services/recommendation/recommendation.service.js3
-rw-r--r--ecomp-portal-FE-os/client/src/views/applications/application-details-dialog/application-details.controller.js4
-rw-r--r--ecomp-portal-FE-os/client/src/views/search/search.tpl.html2
-rw-r--r--ecomp-portal-FE-os/pom.xml9
-rw-r--r--ecomp-portal-widget-ms/common-widgets/events-widget/js/controller.js22
-rw-r--r--ecomp-portal-widget-ms/common-widgets/news-widget/js/controller.js22
-rw-r--r--ecomp-portal-widget-ms/common-widgets/pom.xml34
-rw-r--r--ecomp-portal-widget-ms/common-widgets/resources-widget/js/controller.js22
-rw-r--r--ecomp-portal-widget-ms/pom.xml34
-rw-r--r--ecomp-portal-widget-ms/widget-ms/pom.xml34
-rw-r--r--ecomp-portal-widget-ms/widget-ms/src/main/resources/framework-template.js106
-rw-r--r--pom.xml124
353 files changed, 25532 insertions, 1513 deletions
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 00000000..38b6a858
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,21 @@
+# https://help.github.com/articles/dealing-with-line-endings/
+
+# Set the default behavior, in case people don't have core.autocrlf set.
+* text=auto
+
+# Explicitly declare text files you want to always be normalized
+# and converted to native line endings on checkout.
+*.css text
+*.htm text diff=html
+*.html text diff=html
+*.java text diff=java
+*.js text
+*.jsp text
+*.less text
+*.properties text
+*.sql text
+*.xml text
+
+# Denote all files that are truly binary and should not be modified.
+*.png binary
+*.jpg binary
diff --git a/deliveries/Apps_Users_OnBoarding_Script.sql b/deliveries/Apps_Users_OnBoarding_Script.sql
index 2d1adfb5..5c358ca2 100644
--- a/deliveries/Apps_Users_OnBoarding_Script.sql
+++ b/deliveries/Apps_Users_OnBoarding_Script.sql
@@ -1,16 +1,17 @@
USE portal;
-- insert apps id 2 to 7
-
+
SET FOREIGN_KEY_CHECKS=1;
-
+
-INSERT INTO `fn_app` (`app_id`, `app_name`, `app_image_url`, `app_description`, `app_notes`, `app_url`, `app_alternate_url`, `app_rest_endpoint`, `ml_app_name`, `ml_app_admin_id`, `mots_id`, `app_password`, `open`, `enabled`, `thumbnail`, `app_username`, `ueb_key`, `ueb_secret`, `ueb_topic_name`, `app_type`) VALUES
-(2, 'xDemo App', 'images/cache/portal-222865671_37476.png', NULL, NULL, 'http://portal.api.simpledemo.openecomp.org:8989/ECOMPSDKAPP/welcome.htm', NULL, 'http://portal.api.simpledemo.openecomp.org:8989/ECOMPSDKAPP/api/v2', '', '', NULL, 'okYTaDrhzibcbGVq5mjkVQ==', 'N', 'Y', NULL, 'Default', 'ueb_key', 'ueb_secret', 'ECOMP-PORTAL-OUTBOX', 1),
-(3, 'DMaaP Bus Ctrl', 'images/cache/portal944583064_80711.png', NULL, NULL, 'http://portal.api.simpledemo.openecomp.org:8989/ECOMPDBCAPP/dbc#/dmaap', NULL, 'http://portal.api.simpledemo.openecomp.org:8989/ECOMPDBCAPP/api/v2', '', '', NULL, 'okYTaDrhzibcbGVq5mjkVQ==', 'N', 'Y', NULL, 'Default', 'ueb_key', 'ueb_secret', 'ECOMP-PORTAL-OUTBOX', 1),
-(4, 'SDC', 'images/cache/portal956868231_53879.png', NULL, NULL, 'http://sdc.api.simpledemo.openecomp.org:8181/sdc1/portal', NULL, 'http://sdc.api.simpledemo.openecomp.org:8080/api/v2', '', '', NULL, '78ot0W94rpB0o4FYzVoIOg==', 'N', 'Y', NULL, 'Default', 'ueb_key', 'ueb_secret', 'ECOMP-PORTAL-OUTBOX', 1),
-(5, 'Policy', 'images/cache/portal1470452815_67021.png', NULL, NULL, 'http://policy.api.simpledemo.openecomp.org:8443/ecomp/policy#/Editor', NULL, 'http://policy.api.simpledemo.openecomp.org:8443/ecomp/api/v2', '', '', NULL, 'okYTaDrhzibcbGVq5mjkVQ==', 'N', 'Y', NULL, 'Default', 'ueb_key', 'ueb_secret', 'ECOMP-PORTAL-OUTBOX', 1),
-(6, 'Virtual Infrastructure Deployment', 'images/cache/portal-345993588_92550.png', NULL, NULL, 'http://vid.api.simpledemo.openecomp.org:8080/vid/welcome.htm', NULL, 'http://vid.api.simpledemo.openecomp.org:8080/vid/api/v2', '', '', NULL, 'okYTaDrhzibcbGVq5mjkVQ==', 'N', 'Y', NULL, 'Default', '2Re7Pvdkgw5aeAUD', 'S31PrbOzGgL4hg4owgtx47Da', 'ECOMP-PORTAL-OUTBOX-90', 1),
-(7, 'A&AI UI', 'images/cache/portal-345993588_92550.png', NULL, NULL, 'http://aai.api.simpledemo.openecomp.org:9517/services/aai/webapp/index.html#/viewInspect', NULL, 'http://aai.api.simpledemo.openecomp.org:9517/api/v2', '', '', NULL, 't1oqm6wCXrGUXUSL8mS7pQ==', 'N', 'Y', NULL, 'aaiui', 'ueb_key', 'ueb_secret', 'ECOMP-PORTAL-OUTBOX', 1);
+INSERT INTO `fn_app` (`app_id`, `app_name`, `app_image_url`, `app_description`, `app_notes`, `app_url`, `app_alternate_url`, `app_rest_endpoint`, `ml_app_name`, `ml_app_admin_id`, `mots_id`, `app_password`, `open`, `enabled`, `thumbnail`, `app_username`, `ueb_key`, `ueb_secret`, `ueb_topic_name`, `app_type`,`auth_central`,`auth_namespace`) VALUES
+(2, 'xDemo App', 'images/cache/portal-222865671_37476.png', NULL, NULL, 'http://portal.api.simpledemo.openecomp.org:8989/ECOMPSDKAPP/welcome.htm', NULL, 'http://portal.api.simpledemo.openecomp.org:8989/ECOMPSDKAPP/api/v2', '', '', NULL, 'okYTaDrhzibcbGVq5mjkVQ==', 'N', 'Y', NULL, 'Default', 'ueb_key', 'ueb_secret', 'ECOMP-PORTAL-OUTBOX', 1,'N',NULL),
+(3, 'DMaaP Bus Ctrl', 'images/cache/portal944583064_80711.png', NULL, NULL, 'http://portal.api.simpledemo.openecomp.org:8989/ECOMPDBCAPP/dbc#/dmaap', NULL, 'http://portal.api.simpledemo.openecomp.org:8989/ECOMPDBCAPP/api/v2', '', '', NULL, 'okYTaDrhzibcbGVq5mjkVQ==', 'N', 'Y', NULL, 'Default', 'ueb_key', 'ueb_secret', 'ECOMP-PORTAL-OUTBOX', 1,'N',NULL),
+(4, 'SDC', 'images/cache/portal956868231_53879.png', NULL, NULL, 'http://sdc.api.simpledemo.openecomp.org:8181/sdc1/portal', NULL, 'http://sdc.api.simpledemo.openecomp.org:8080/api/v2', '', '', NULL, '78ot0W94rpB0o4FYzVoIOg==', 'N', 'Y', NULL, 'Default', 'ueb_key', 'ueb_secret', 'ECOMP-PORTAL-OUTBOX', 1,'N',NULL),
+(5, 'Policy', 'images/cache/portal1470452815_67021.png', NULL, NULL, 'http://policy.api.simpledemo.openecomp.org:8443/onap/policy', NULL, 'http://policy.api.simpledemo.openecomp.org:8443/onap/api/v2', '', '', NULL, 'okYTaDrhzibcbGVq5mjkVQ==', 'N', 'Y', NULL, 'Default', 'ueb_key', 'ueb_secret', 'ECOMP-PORTAL-OUTBOX', 1,'N',NULL),
+(6, 'Virtual Infrastructure Deployment', 'images/cache/portal-345993588_92550.png', NULL, NULL, 'http://vid.api.simpledemo.openecomp.org:8080/vid/welcome.htm', NULL, 'http://vid.api.simpledemo.openecomp.org:8080/vid/api/v2', '', '', NULL, 'okYTaDrhzibcbGVq5mjkVQ==', 'N', 'Y', NULL, 'Default', '2Re7Pvdkgw5aeAUD', 'S31PrbOzGgL4hg4owgtx47Da', 'ECOMP-PORTAL-OUTBOX-90', 1,'N',NULL),
+(7, 'A&AI UI', 'images/cache/portal-345993588_92550.png', NULL, NULL, 'http://aai.api.simpledemo.openecomp.org:9517/services/aai/webapp/index.html#/viewInspect', NULL, 'http://aai.api.simpledemo.openecomp.org:9517/api/v2', '', '', NULL, 't1oqm6wCXrGUXUSL8mS7pQ==', 'N', 'Y', NULL, 'aaiui', 'ueb_key', 'ueb_secret', 'ECOMP-PORTAL-OUTBOX', 1,'N',NULL),
+(8, 'CLI', 'images/cache/portal-345993588_92550.png', NULL, NULL, 'http://portal.api.simpledemo.openecomp.org:8080/', NULL, NULL, '', '', NULL, '', 'Y', 'Y', NULL, '', '', '', '', 2,'N',NULL);
-- insert ASDC users user id2-8
@@ -103,32 +104,32 @@ INSERT INTO `fn_user_role` (`user_id`,`role_id`,`priority`,`app_id`) VALUES (12,
INSERT IGNORE INTO `fn_app_contact_us` (app_id, contact_name, contact_email, url, active_yn, description) VALUES (
(select min(app_id) from fn_app where app_name like "%SDC%" and enabled = "Y"),
- "SDC Team","sdc@lists.openecomp.org","",NULL,
+ "SDC Team","sdc@lists.onap.org","https://wiki.onap.org/display/DW/Approved+Projects",NULL,
"Service Design and Creation (SDC).");
INSERT IGNORE INTO `fn_app_contact_us` (app_id, contact_name, contact_email, url, active_yn, description) VALUES (
(select min(app_id) from fn_app where app_name like "%Policy%"),
- "Policy Team","policy@lists.openecomp.org","",NULL,
+ "Policy Team","policy@lists.onap.org","https://wiki.onap.org/display/DW/Approved+Projects",NULL,
"Policy.");
INSERT IGNORE INTO `fn_app_contact_us` (app_id, contact_name, contact_email, url, active_yn, description) VALUES (
(select min(app_id) from fn_app where app_name like "%DMaaP Bus%"),
- "DBC Team","portal@lists.openecomp.org","",NULL,
+ "DBC Team","portal@lists.onap.org","https://wiki.onap.org/display/DW/Approved+Projects",NULL,
"DBC.");
INSERT IGNORE INTO `fn_app_contact_us` (app_id, contact_name, contact_email, url, active_yn, description) VALUES (
(select min(app_id) from fn_app where app_name like "%Virtual Infrastructure%"),
- "Portal Team","portal@lists.openecomp.org","",NULL,
+ "VID Team","vid@lists.onap.org","https://wiki.onap.org/display/DW/Approved+Projects",NULL,
"Virtual Infrastructure Design.");
INSERT IGNORE INTO `fn_app_contact_us` (app_id, contact_name, contact_email, url, active_yn, description) VALUES (
(select min(app_id) from fn_app where app_name like "%Demo%"),
- "Portal Team","portal@lists.openecomp.org","",NULL,
- "Demo Application");
-INSERT IGNORE INTO `fn_app_contact_us` (app_id, contact_name, contact_email, url, active_yn, description) VALUES (
- (select min(app_id) from fn_app where app_name like "%VID%"),
- "Portal Team","portal@lists.openecomp.org","",NULL,
- "VID Application");
+ "Portal SDK Team","portal@lists.onap.org","https://wiki.onap.org/display/DW/Approved+Projects",NULL,
+ "xDemo Application");
INSERT IGNORE INTO `fn_app_contact_us` (app_id, contact_name, contact_email, url, active_yn, description) VALUES (
(select min(app_id) from fn_app where app_name like "%AI UI%"),
- "Portal Team","portal@lists.openecomp.org","",NULL,
+ "AAI UI Team","aaiui@lists.onap.org","https://wiki.onap.org/display/DW/Approved+Projects",NULL,
"AAI UI Application");
+INSERT IGNORE INTO `fn_app_contact_us` (app_id, contact_name, contact_email, url, active_yn, description) VALUES (
+ (select min(app_id) from fn_app where app_name like "%CLI%"),
+ "CLI Team","portal@lists.onap.org","https://wiki.onap.org/display/DW/Approved+Projects",NULL,
+ "CLI Application");
-- end new 1610.2
--
@@ -151,10 +152,10 @@ INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`
INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (16,6,'Testing',1,'','Y',NULL);
INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (17,7,'Simulation',1,'','N',NULL);
INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (18,8,'Certification',1,'','N',NULL);
-INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (19,9,'Policy Creation/Management',1,'http://policy.api.simpledemo.openecomp.org:8443/ecomp/policy#/Editor','Y',NULL);
+INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (19,9,'Policy Creation/Management',1,'http://policy.api.simpledemo.openecomp.org:8443/onap/policy','Y',NULL);
INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (20,10,'Catalog Browser',1,'','Y',NULL);
-INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (24,5,'Create/Manage Policy',12,'http://policy.api.simpledemo.openecomp.org:8443/ecomp/policy#/Editor','Y',NULL);
-INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (56,1,'Policy Engineering',8,'http://policy.api.simpledemo.openecomp.org:8443/ecomp/policy#/Editor','Y',NULL);
+INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (24,5,'Create/Manage Policy',12,'http://policy.api.simpledemo.openecomp.org:8443/onap/policy','Y',NULL);
+INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (56,1,'Policy Engineering',8,'http://policy.api.simpledemo.openecomp.org:8443/onap/policy','Y',NULL);
INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (115,1,'Test/Approve a Resource or Service',16,'http://sdc.api.simpledemo.openecomp.org:8181/sdc1/portal#/dashboard','Y',NULL);
INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (130,1,'Favorites',175,'','y',NULL);
INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (139,2,'Approve a Service for distribution',12,'http://sdc.api.simpledemo.openecomp.org:8181/sdc1/portal#/dashboard','Y',NULL);
@@ -171,7 +172,7 @@ INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`
INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (313,3,'View a Resource/Service/Product',20,'http://sdc.api.simpledemo.openecomp.org:8181/sdc1/portal#/catalog','Y',NULL);
INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (317,1,'Message Bus Management',6,'http://portal.api.simpledemo.openecomp.org:8989/ECOMPDBCAPP/dbc#/dmaap','Y',NULL);
INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (318,1,'Infrastructure Provisioning',3,'','Y',NULL);
-INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (319,1,'Infrastructure VNF Provisioning',318,'http://vid.api.simpledemo.openecomp.org:8080/vid/vidhome.htm','Y',NULL);
+INSERT INTO `fn_menu_functional` (`menu_id`,`column_num`,`text`,`parent_menu_id`,`url`,`active_yn`,`image_src`) VALUES (319,1,'Infrastructure VNF Provisioning',318,'http://vid.api.simpledemo.openecomp.org:8080/vid/welcome.htm','Y',NULL);
--
-- Data for table fn_menu_functional_ancestors
--
@@ -355,7 +356,7 @@ INSERT INTO `fn_common_widget_data` (`id`,`CATEGORY`,`HREF`,`TITLE`,`content`,`e
INSERT INTO `fn_common_widget_data` (`id`,`CATEGORY`,`HREF`,`TITLE`,`content`,`event_date`,`SORT_ORDER`) VALUES (13,'IMPORTANTRESOURCES','https://wiki.onap.org/display/DW/Portal','ONAP Wiki for Portal',NULL,NULL,3);
INSERT INTO `fn_common_widget_data` (`id`,`CATEGORY`,`HREF`,`TITLE`,`content`,`event_date`,`SORT_ORDER`) VALUES (14,'IMPORTANTRESOURCES','https://wiki.onap.org/display/DW/Development+Guides','ONAP User Guide',NULL,NULL,4);
-
+
-- app thumbinals
UPDATE `fn_app` SET `thumbnail` = 0x89504E470D0A1A0A0000000D49484452000001680000012C0806000000EE2C29AF0000200049444154785EEC9D099C5D6579FFBF67B9EBEC5B6626B364DFC91E12080142D87710595C0A5A37B455FBD75AB56A6D6BD55A6D6D6D6B6BAB15045111C50504917D95B0869090909DEC997DEE7AF6FFE77DCFBD333721C0850C3093BCE7C3903B73DF7BEE39BF73CEEF3CE7F7FE9EE7D1508B424021A01050088C4A04B451B9556AA314020A018580420045D0EA24500828041402A3140145D0A3F4C0A8CD5208280414028AA0D539A010500828044629028AA047E981519BA510500828041441AB734021A01050088C520414418FD203A3364B21A0105008288256E780424021A01018A50828821EA507466D96424021A0105004ADCE018580424021304A1150043D4A0F8CDA2C8580424021A0085A9D030A01858042609422A0087A941E18B5590A018580424011B43A0714020A0185C028454011F4283D306AB314020A0185802268750E280414020A81518A8022E8517A60D466290414020A0145D0EA1C500828041402A3140145D0A3F4C0A8CD5208280414028AA0D539A010500828044629028AA047E981519BA510500828041441AB734021A01050088C520414418FD203A3364B21A0105008288256E780424021A01018A50828821EA507466D96424021A0105004ADCE018580424021304A1150043D4A0F8CDA2C8580424021A0F5A6EC40C1A010500828041402A30F0145D0A3EF98A82D520828041402120145D0EA44500828041402A3140145D0A3F4C0A8CD5208280414028AA0D539A010500828044629028AA047E981519BA510500828041441AB734021A01050088C520414418FD203A3364B21A0105008288256E780424021A01018A50828821EA507466D96424021A0105004ADCE018580424021304A1150043D4A0F8CDA2C8580424021A0085A9D030A01858042609422A0087A941E18B5590A018580424011B43A0714020A0185C028454011F4283D306AB314020A0185802268750E280414020A81518A8022E8517A60D466290414020A0145D0EA1C500828041402A3140145D0A3F4C0A8CD5208280414028AA0D539A010500828044629028AA047E981519BA510500828041441AB734021A01050088C520414418FD203A3364B21A0105008288256E780424021A01018A5088C28416B1A68E27F6A510828041402C718024110100423BBD3234AD0B1884E32668CEC16AAB5290414020A81318080E5F8642D6F44B75411F488C2A956A61050081CAB0828823E568FBCDA6F85804260D423A0087AD41F22B5810A81A31701A1B18A45CD331DFE182B823E7ACF7DB5670A81518DC08E1D83DC7BEF4EB98DAB5675306142F5A8DEDEB763E31441BF1DA8ABEF54081CE308B8AECBAF7EF5221FFAF0831289EBAF3B830B2E988CAEEBC7383207EFBE2268753A280414026F3902B66D73D34D6B79FF9F3E2CBFFB673F3D8BCB2E9B8E6128C756E9C15004FD969F9AEA0B15020A817C3ECF0D373ECB873FFCB804E327379D21093A128928704A105004AD4E07858042E02D472097CBF1A31B9EE1DA6B9F90DF7DD34DA7F3CECB6628823EE44828827ECB4F4DF5850A01858024E81F3DC3B51F5504FD6A6783226875AD280414026F39028AA0CB835C11747938A9510A0185C00822A008BA3C3015419787931AA51050088C20028AA0CB035311747938A9510A0185C00822A008BA3C3015419787931AA51050088C20028AA0CB035311747938A9510A0185C00822A008BA3C3015419787931AA51050088C20028AA0CB035311747938A9510A0185C00822A008BA3C3015419787931AA51050088C20028AA0CB035311747938A9510A0185C00822A008BA3C3015419787931AA51050088C20028AA0CB035311747938A9510A0185C00822A008BA3C3015419787931AA51050088C20028AA0CB035311747938A9510A0185C00822A008BA3C3015419787931AA51050088C20028AA0CB035311747938A9510A0185C00822A008BA3C3015419787931AA51050088C20028AA0CB0353117479388DECA8C027E8DB4490EB26705290EB016B407E879FD9034E06341D2D568B166F18FEEEAA7630A2F26F5A450B5A55C7C86E975A9B42E02D4240117479402B822E0FA7231BE5D9787B1F23E8D900D97DF87D9B09522F110822F62D70B2E0E6E57704760A7C1BD0C04CA09989E1EF8ED5806EA0991510AD444B8C43AB6845AB9B8ADEB400BDE93888541DD9B6AA4F2B04DE020414419707B222E8F2702A6B54E064F1773D10FEEC790CDC4C48BA411046C86E163C9BC0CD41E095B5CE571DA4E961442D483C528516A900CD90DC8E66A25577A2371F8F31E522B4FA1947FE7D6A0D0A81114240117479402A822E0FA7571D153869FCDD0FE33CF8391919E33BE0BB829A4760ED47B00A41E0BA8956D18631F14C8C1957A2B79E1092B85A14026F23028AA0CB035F11747938958C0A0A32842789D87BF116DCD55F23103AF2DB4DC8AFB92F1A5A653BD1737F84563F538ED68CA8945284E67D444BE01FF93A8E6803D487C712028AA0CB3B5A8AA0CBC349926F90EF87D40EECDF7F00BF677DE1936F73945CF6F6970E141A48B8E813CE20B2E43352C7D6E28D523279DD8BEFE1F73C8F5E33456AE36A5108BC16028AA05F0BA1F07D45D065E024A2E3A0E779BCADB7E36DFC0941B6AB8C4F8D9D21C22DA2B79F823EE97CCC199783997C5D1BEFEF7F1AE7912F1039E9ABE8CD0BC3094EB528045E050145D0E59D1E8AA05F15A780207B006FFD0DB8CFFF1FC1E08E9199DC2BEFD8BCF5A38C3891657F8DDEB112BD711E98F1D7DE063787F3E89771D7FC37D10B6FC6987096923A5E1BB5637E8422E8F24E0145D087C3C9B371D77E9F6060AB24687FCF2304E9DDE5213AD6471931F4A6F9D2B6A7554FC098740E5AFDAC9793AE67E1EF79146FCB6FF05EBA97A06F23D1F36EC2987AF13137095914B90E7A6E38EC1FC7FAC93172DBAF08BA3C2C15411F062777C34F711FF834415E4CFC1DAB8B06D12AF471F331A65F8131ED32B4787D0846E0E16DBF0BF7B12FE377AF1B7AAA889EF13D8C59EF91CE91A37E11D6C921460E5F084E1E7E558A80927C0E3D1F144197778528822EC129187C09F7C97FC2DB7A1B41665F79081EEDA3444663BC1EF3946F624EBB2C9C44B453E46F5A4630B84D98BC8710889EFE5F18B3FFE4D8216841C99A349D176E5CE2F7024D07E26FC5F78FF693E4F5EF9F22E8F23053045DC0C9DBF63B9C873E2F650DE96356CBC108442A3067BE1BF384BF913730E79E8FBDCC561859F135CC851F073D72D4A327EE4B828A050F0B2A9626456935D408D0C2FB56E13D153FBFFC7450045DDE25726C13B4A88931B00DE7F1AFE26DFA257861BAB55A5E0D8122DDBCDC5E689EF02569D97B4356BD510CBACC042D2C322E16241C804B40CE87BC1BE0BA015EE0636A1A31D3A0361206D732BE9651B65A4A1150045DDEF970EC12B4A88FB1EB01DCC7BF8EBFF7D1F2D052A35E150173E127899CF4F760C4DE52A402E151470BC970580816A5A70AF2C3213715C9B705F61CDA521112879244715D22440ED71D126DA005E41CC8783EBD399FFD298BFDFD167927C0F1021CDF470B7C6246C0B82A9386AA38CDD5719A92260953470FD732AC5617C3EFB714ADD1F1658AA0CB3B0EC72C41FBDD6BB17F7DC9B1E3CE28EF7C38A251C6DC0F113DE59BE5D9F38EE89B0EF970416E10EC2CA25D3D64D39249BB428EA7E064190D0B223E38DD5D727620A859BC1B927DB804782252767C7AF32E2F7459F4E61CB2B64822D0B0020DBFA0377B22B9544CA0FA2E9A9BC7C4A73AA633BBA592992D55D4554431C4BAB5A1DB49E12B8E3DAD5A11747917C03147D041BE177FF3ADD27DE0AEF96E7928A951652160CC7C37D1D3FF334C1D7FCB96909D8BD41A68BE50802110AAB02E63683B08C87922E2CD3360B9641D485B3EAE0F9E1F485295E42C43E580A20745C7A33611A33259417FCEE140DAA1D7127F15045E903964E0ED83EFE37B3E7E10E0061EBEE71278E25F8FA4EED25A1B637C759C8698C6FC094DE1DCA2F84EF1427EEFB1258328822EEF0239A6085A249AB8CFFC3BEEDAFF05CF2A0F2135AA6C048CC917C83A1FAF3713B1EC2F78D9C030622ECD5C143C27485944B53DB6C78BBD3976A65C76A61D3674E5E8CA7BA41D8D8CE5E00BDD5844BB9E85E179E88120581F538811814F7D4594396DCDB4D7D71574643FBC19F822AAF62531FB5E611B84262D09DAC317A9EFAE8D2F483BF0B17D5FBE879527A9D9BC7FC54C3AC755A10782EAF5B0F6F71B07614C7E5211747987ED982268FBDE3FC37BE12610E53ED532E2081813CF217AFE4D6F3A418773768589BB21D942BCD0480501BB52369BBBD33CD365F14C9747BF15907675D29E81E30798BE4BA59F2111D844F048682E31CDC790D28329A58CEACA1A6674B631AE224E4484D6224A0E021128E307A1941112B420EA50BF766420ED11F81EAEEB84442DA3690FCFF37005613B2E932BE0B485139935BE16B320CF8848FA58226945D0E55D7EC70C418B7A11F61DEF0D6D746A795310D05B9711BBF47720EA528FC47270703CB4462929C8B8599072381198436767D6E5B60D0758D765B32FEDD2E3C5496B7149A49AEF92D0032A758F3AC365BC99A7427388E113D73C0C215CE8069617A1DFAC605C731B159118BA274AC70A32464A1BC2A9218857B2B4F89B27DE13441C482216E42C48DBF15C193D8BD79EE7E2FA01AEA7A189D7F92C13EB34CE5B3A9599CDF568F8324297D1F431B228822EEF401FF5041DA477491B9DBFF9370456FFDB5B4BC38862B42E43EB380D73F6D5A0BF81CA71C5E3EAA4F15EBA077FDF9304FB1EC7EFDFF2B6FBB7F5A6B9C42EBF0F22475ED16EC83921E977386F5A44AB9A9888D34DB27EC0833B06F9ED867EF63B06B66630E847707C0DDFB1A88AF8CCA88FD35913A53E1145CFF4E1A57AF173299C5C56BA2E021101FB1E8316F47911DAA6CEA2A65AB4190B35E6A0206548995946D0A15EED89509A90A0FDC09551B47C2DA2651129FB829885DC11FE1BFEF8F8AE8BE3DA684E8E981E70F6FC0ECE5B1436530865E863238E5604AD085A12B2FBE43FE33EF39DB74773D60D6939D31BE6622EFA24C6A4730B0E8791BE0803BC6D77E2BF7833EE8E3F803D0822F27B8BEB536B15E3895DFD2C5AB4BABCB3EF554785141D52B398F813C4A8E36B06BE1FB07130CBDD9B7B79648FC77EBF02CF088DC7819DA54273195F6932735C2553EBE218BE8D97CB92EEDA4F3E3D8863E5C9E52D5CD796137929CB67902A5A672DA4A1A989C0B6C3893FA95C08520E658CE26BB945051216842D74EC21822E21E4E218296F8888DA15DAB48B23E63F1C3171E971D2F446DE7FCA5C12868E9CE01CAACB3DD2E7C8081C92115C8522E8F2C03C7A2368CF92C927F6FDFF0F44E4FC562C661C2DD1282348D17E4A9F7016C6940BD11B8E7B8B92370A74B66F35CE837F45201BD10690EF0FEB8AC82E2F6FDEA225C711BBE6F91121681929173655389185D52D6B7B64ED803BB70FF0D8CE4176E60D5C2389661818BA89A1F94CACF0985897A4A53A4652F3D06C1BD7B2B133830C76EF259F4D63DB16996C56EAC4AEEF918D34D230653EE3C6B586BAB2EFA1090943C4CF7E48CC45722E9275F15F215F841383C311B378EDBAEE10897BAE3B1C5D7B1EB663E10A95C473195F1DE1B2A5535838B995A8A117DC1D85F4F1A398A3154197771D1E9D042D1E81B7FC264CDD1EDC5E1E1247384A448DA2A09031F783E8CD8B0A6B7B3BAFB0822C200867FB9DB8CF5F87DFBD8620B52B9CF07A9396F8B5FB6437F2235D849C204D7281262D725BFA73DCBFB597A7F6E5D81B6B0E73AC038D58E0D2561130B93E416B65942ACD1EF2310BF9C2C967C9A57AC9F60F30D0DF8D95CB60E7F3643359529E4EC6A862CAFC65348FEF905639690191138021297B624250FCBDF8BBD09905714BF942481D05D78688A40F913464042DA26741D04592F67D6C4744D10E81EBE0E472B4D5E87CF0BC1399DDD91A4E488682C7512D7728822EEF0A392A09DA3FF02CF69DD7C812986FF6A245ABD01AE76174ACC498FFD130821E858B683AE0EFBA4F4A21A2E98098F87A33969122683909878FA7C1133BFBB9FDC51E36E5A2E48C04B611C3F05CA2F84CAE3139AE394175C44017A41E88A70431D916E0B90EB9C13E327D7DE407FB1918ECC1CEE4B0F27906B2797AA964DCD4794C993E8398190953B8A52B4310B2F837F4498BDF872368A1390BDD3AD4995D394958785D42C245B22E12B4EB384304EED80EAE277E5C1CDBC2B0D35CBAFC382E5BB180642C8226273EC53EBC9D37F837E3EC185EA722E8F2F03D2A09DAFACDA5F8DBEE280F812319251EAB279D87B9F4F3E80DB3DFF214E737B4E9F620CE93DFC2DF7E17229B7244BA8B976C48FCFD1B651DE9D7B71C5CA85364FB0951C30D74B6F5E6F8C5865E9E1ED071A2893043D0F5A8323CDA6B624CA98FD310054338354A547749AE769E74CF7ED27DBDE4D2830C0EF460A72DAC7C96DDB98044DB2CE62C3A9E8A8A4A49CCC2972CA366797318D6990F92388250AE2812F6101117648DD2285A4E18BAA1E54E46D18508DB16B28BE7E2899E968E8D9549735C5B1D9FB8FC4C263454A369E2E629321D1541BFBEF3E8E81B7DD411B4A8B466DF76E588134FE9A1D79B9760CCBC0AADA205AD6E067AE3DC317566B8EB7E88BBFA1B6107F211963B62EF79E2F5E321095952A2A4249164B2664F3F4FEF49B1C38EB0336F92F185633920E6DBCC1F5F43B5E15117D3881B05122BA64F0F293B3EF9CC207D7B77911DE8259B4E3338D0473E9D23E3B8C4A79F48E794695455540D4D060AC786FCEF9049C1E1DF45C4EC1C44CEAF48D04E48C87282D00DA3E7A22E6DD9B69C2CF43D1BC7B1C85BC2F2E771ED25A772CEE25918BA70AA88041645D063EAC27A1336F6A822E820B513EBB7EF20E85AFB264035BCCAF8D56BD0AA278E8D88F93048E47F309920BDE74DC12876E9EDE89DA7BFBE754B3B9B706978B24646D685AFDFF322FBFC24D9682522B74F44B871CD62725D8C79E31232EB2F8CB443395A96D728D4D090E288EB4A79A36BD776B283BD58990C03FD29329914079C08275F752DF18889CCF716E9DEC5B24842572E44C862278A041C46D182A08563637842B07432B0F85A4C1C7A43045DF041BB6E18450B0DDAB2A4FE2C2418DBB1C9BB0E5A3ECDFBCE5ACA9F9C750211532790553B8EDE45491CE51DDBA387A07D07E7EE8FE26EFCE99BE656D02295444EFBB7B06BC8185DDC47BF8CF3C437DEB4AD8F5DF44BF449E7BDAEF58799819E4CD6C8A273DF867DDCB2C3213013385A4C929A48919ED118A7B3364195970BED76D2922688BA506DAEF0AD527E701D327DDD74EFDC4636DD4F2E9B61A027C5817496C15813175E750DBEE30C45CF82A48B245CF4380F5BE9428D59BC1F46D0E1EF87BA358674E6E2C4E050041D927351E6102E8EC0B1E5F7DBAE70A638C434978F5F761A172F9D8121DC1C52E278854C9DD785EEE81CAC08BABCE3727410B4886CD65D8FFBE8970872DDE5EDF9EB19A519E8F5332439EBE34F1A7B4D51858CE1E5711EFC2C42DE1879BBDD70E9CED885BF40177EEFD27A70C5A240AF8079B1DEB2706EDFFDC25EEED8D045AABE1D373024D655584C6F8CD35E1D23E2B918854A756175A3E145FCE6E9A07B019E6D91EAE9A27BD736B2A901B2B90CFDBD29B6A55C262E5AC9FCB9B343392308B30385AD4ED4D8184A4639C8EB3C4CC842372E7A9E8B12C610593BCE505AB7533A29E83838452747E0625B7902DB9263C5053868392493493E7BCD799C3FBD49EC32BA22E8D773851EB5638F0A829605901EFF1A81D537F2074A74BA3EF59B98733F3846276D02DCA7BE8DFBC43F859994872EA27F60690714DD402BCD70946C2192404AD29045DB2B59AE332448BD6A025AB245BED666BF07BDE37499622252988533A248D6438FEC850247A2BEB2AC4317183CB3B397DFACEF62AFD98863C6F00257AE43A466CF6E4AD092142E8D32EC81528AF064324AAAFB00DDBBB64B592397C9B2617F9696E356B060F102022B47E08B6CC1128F7321392524DC421D8D82BFB9384E44C132922EF89CC3ECC1A29D2ED49A053917DF77E524A1156ACE52F670C8590E9A97C77534F6EFCCB2DFAB22DFDA8EE70DF0FCD72E624A4DAC509D4F24AE1C5C1675E44FF0B7678D2A822E0FF7A380A0039C073E83FBEC7F94B7C7AF6754A40263F285984B3F875E3FF3F57C72F48C75F3B84FFF2BDE965F0F6F53AC6EE8B5B005EA95E387DF8BD74265C7F0FBD14AB48A5634235E1410A076329815720EAB58B728CC5216948CF40ECB1F517FA2F023A95546D282EB75C4DC5E54D788E8A1FDF8862776F374DAC48D26080283C07749EA1E136AA2B45747881D142D9746CEA54A6DB10F958F9DCF91EADA4FF7EEED64B329B2D93CBBEC2A169E722E15C9B8D4808BA45B9A2D38246B14ABD215A48CE29821CD596607869380421F179F731C7B6832B0286738628C63E18BF7A4CCE160E75D02CBA6F7A51EF6AEDF47CEAC21367F01D9C66AFEF2CC4EFEF2AC9924A2A0FB1ABA2C6E7DF42D8AA0CB3BA6639EA0835C9724684F68CF23B908729E7E854CD11EB3E42CF070F304B903F2DFE2A2D54D7B0DA45E9D14427A0CFF2F26E67C7C59252EEB06A41D9F7D595766FC651C9F8CE591737DDCC2849EA60798862EB3E66A22260D0903CBB1B977A7CD3EDB9451B24714337098506DD2561B23AEB98542FBC3B98507EF4089C12E0CCAB1F35952DDFBE9DDBD834C2E454A54D86F5DC09459C785E42CEF188592A142DA2868CCA5045DEA6F2E92B9888E4B53B8858D2E4C5A0909BA48E0C24A17A67887041D5AED7C3C274FC4F278E9B92DECDFB8172DA3E3E9519C8E0ECC8573A8AC36F8CA550BB962712771B123C2CC71144E172A822E8FACC6344107D90378EBAEC35DFBFDD03236528B192772D25731269F1FBA35D4328C80205AADD0F6296BD39B73E9B321E56A64DC80941DD093B125613B5E6892F0440D8D02A9CB24104DD46DD33074D1BF4F7424F118744D9C20228958C365526D84D64484B819BA3B6481FC728F83F86E2B47BAFB00BD7B7791CE66D9D59F63E2E255D4D7D687645CC80E0C35E7E1449450BE10863EF1B790788BA45B2A6DC8D4EE82C75992B41827A40DE1E010E9DCD2EB2CA40F1BCFB6B11D07CD7798D652CBC9D327B167D376BCACCFB34FEDE00F773D8F1B4DE2B58DC35FBA9089ED493E7CEA24DEB9A08371C9E106BC47536F4345D0E59DCC6397A0453AF7F6BB70EEF93382CCC85AC6F496E3895DF95079081E6DA3645FBE304216C9D6C51E7FA5D5E5065C8FD53B07D995121D4620E31B7242CF2F481C82600D024C4DC7D075F442417A41B122CF2F10937C22CAF57DF2521E10A590345C4D481B3ED59ACDA2B64A0C1F7491B42199B91825CB02D00583434995BBE1E70349AE5E3E4BBAA797BEFD7BE94B6779B1DB62E189A7529D88E3A1CB0A766252505AF264BAB6D88ED04A17DAECFC421AF7C13536A47D4E96112D789CA5AE2C3CCD3E8E889285B75910B72DD629A2680BCF72F13219668EAFE53DE7AF64765B3DA669629A70FD0FEEE6CB7FFD1320229BD006679F46B6BD9D96448EBF3B6F16EF3E7E62D815B168F72E3CB78CF5D34E1174794770CC12B494361EF922DEFA1F85CD3E4768D192CDB2E8BC746B1C934BB14DAAC0542F31196BB283F54B83393675A559DF07592D2A2701A503423C8D8B76513AD4C4848461C81FD1E5DA1C9A272C8823225B0F64946DB9E2C7A7CFF2C8D86194D95E5B495B8588B143CD5A9775374A3BC28A770A5AC641253A430D5C4817BE20E8BE3EFABBF6B3BB37C39E7C8C79F317509988CA9B81E88452ACAFE1FBC58247226F6798984B4B850EC91A8290658D8D83AD73E27D1125FB2285DBF5B12C4F5650F4FC1CBAE5B368C2781A2339CE5E71022DCD09224682542AC3BF7CF397FCE8BA87087413D3D7E8EB68A1F2E453B0123E57CDA9E2BB572F2FECAB48E229765E19FBBAB422E8F2C865CC12B4DFF52CD62D6785A535476A31A244CFBD514A1B8736151DA9AF18BDEB292ACBC566AB855ED9F2CF3A5D399B67F7A7D8D827122B4CD2A688443574DF23AA7924220615D11815A6415264F50D3546152E8D029916495570A3E45CAD10750B7FB14ED676A503A2B62A4E2408CBA58AD653A2C6864CF12E74DC96938845538988CE75D188B564C63270F16D8B7C7F2FFDDD5DBCB0378D956C64D6B4A952FB16DB5DACB921562DEA39CB4E2805B943481A6219AEE35C8CB043194390BB4C462990743199C595B246585AD4B184734344E52EDD2F6CE5FCC57338616127B95496D3CF9A876926D8B1753F5FFADC8D3CF2E84B843DBF0306741B6DFE71C416CF63D9D41AAEFF9345D4C6C4934C98C473B4E8D18AA0CB63823149D0819DC2FAD10282CCEEF2F6B28C51A22468F4829FA1D54E2963F4D1386428264597C5E803990CD263793CBB67807503016922328A132363814D753442752C414C4E64899E7E61A0EB16026FBDE08A93997E251284142C869414591B0E3F083DC4B82EBAEF080B88ACC521A5132326234C0C83401335A1CD90D865C966596EAEB0F6403658D1752F8CDAAD0C07F6EE63F5F61E264E9D496763B57487084D1C5F4CF6850F5FC311F470F2496979D183B205EDD04A5724E7A25B43DAEB44753A173C51903F9726D3956560FB368C9E1C99BE34FFF0CD0FD37D600FEF7A9748E4091D1A8F3CBC817FFCEA4FD9F8C25E342D82E7EB58BA8F3F7D0A0D272EE2FCA575FCD5B9F3185F119337BDA3A53E8722E8F238646C12B4D54FFEBF43DFED482DD133FE0B63D67B0FF6048FD4CAC7D47AC20ED50E3A2F0D5A3C2BEA616475F2BA298BC9EB1E183A3455992422427E084B82CAC7EF21A9342C052A5D120769A701811ECA2132AA16516BB16EB2F005CB4ED8521426E71BE8461C5DD8EECC381866988E2D3E26B2088BB2967487143569999018B6B8127BE0FBF41CE865DDCEBD4C9E3C85A6AA78E8B8D07402D1D43510242F9253C2087A285BB0B04DC58494616B5D18410F47D607CB1C395754A60BF7899C4D76C77E1A4C93DE3D7DF4F7F5F1F75FFD30BB766EE4F2779E8B666852833ED095E56B7FF7536EFBCD13327BD04378A05DAC649CE8B2C54C387E027F73E12CCE9AD1425411F498BA92466263C72641A7F720EA498CD862C6899EF793B0E3C9B1BA14345E99D517681CC839FC7E730F075C13DF48485434DF23AE05542522544544342DDC0EF29D30242E4E2DFAA1FE20125104414B322E261BCA529D61EB28D9F95A140EF25C701DA947677D0D2B8044552391681CCD8884845A1281CBE8B650BD2E944FC2C85DC6E28198001465472D8240978D65D2C2DA6646658358D9AE4A4A1CA2EBB6B81784DB22BAA2941274A9DC21FCCBC59E83A254E870C5BA509209A3690FD7B1713C1BCD72493DBF9B591DEDC47483679F59CBA92B8EE3A413A793C90EB2EACC2572F2547CFF9A67B6F1CDAFDFC2534FEC243084D061E2EB2EA2E7BC376306D5A72EE45DC78FE32F56CD05F8E9980000200049444154A035190DA59CB12F41A322E8F28866EC11B4C8127BFC1F711FFF4A797BF81AA3B4783DFAC4B3892CFD3C5ADDF41159E7985C492112CD3A3E7B07F36CCBF8ACED71F08CA8E45E91541237022A2286AC2057CC1B09FB9E849379B2EBF590F61CF276283F87EE084D4CAEC91467D1FE29D470450A74266FA1099B991E27EF413499A4B2AAA630F77B88BDAE90F957ECB83224CC14826841B8A1C02D32FEC4A45F78F310FD0085BC216F0E224897DEE502F10E15DD0F2D7787764329FDDD91FEE642012441CCD25A27925544F289456D328696CEB26BF5666A9249E90469AC4F72E925A7626879DA3B5A19DF568BEB6ADC73CFB3FCFC670FB2E6995D64D3BED4D50D7103110A8C48F4696B2376C6494C6C31F9F8E993B970763B8948A1EBCA18676945D0E5B1C49823E860701BF91F2D94B5258E78D13459CF3972F237D06AA71EF1EAC6E60A42660B894E63F5CE3E9EE9CACBC2F89A1E911367E2C1BB361125618849AA70E2AEAC4508C2821045042AAAB78908339F95C48CE7627BB03FEB9173A0B1AD938A9AFAC2649F30C2BDBCC3753159446E6D8971A758CB43BE2FC3E2F0CDC3950D3D2821454A1B0737782D7A9D8B29DC323A2E494E2926A014A366DB11892A3681936362758CE5D3A6A00FA6184CE564D1A38898344D98B4B737D1DED68C6906446326B93C7CEF7BB773E30D0F92C91452DE8550248F45B8EF7E5515C6F22598131A58DC11E5DFAE58425B9DA8892DACE4633B8C56045DD615246BB5648523680417AD57642B8CD0128BE82463C3F508DC67FF13E7814F8FC8DA450F3D73D917308FFB008849A86364199E6A2AB82B0AD1A7E5C3CF9FD94F774444B326119953E25111D1A88A849639C97D8714292AB1E90E491B61990DD1C5DAC6CDE724397B82E8EC9C7CB477759DAEAC478F15A1B9B595EA9A5AA9718B6E2261958F83097A989CC346AE434B21422F9276D875FBF0CD5E8B641C16E50F5B5589649430221E766A94164112BE67910558B4DC494943C8197E2133D0168E911CA66F71F1E2494C6B692016C0E0604E626598060DF595D4D6C6D1759D4824413C5E496068AC5EBD99AFFCED4F79716377F81C229374C2671291DAE3440CFC59D3491E3F8F9A44C0CF3FBC94E9CD95614B2F45D0C7C4D53AA6085AF4D3B36E3D8FA0EFC5233E385AAC0663C19F61CEFFD8A86D5375C43BF90A2B18266831ED1652C2BE812CCFEDE9678B5D8DA78B093F5F3A2112D2D32CD22884AE1B6AC16191A38397E1782E407444153286487116197D5E3E272500291F68263BBB53EC1DB4E998328DFABA3AE2B1F8505D8FA2C9EFD06A78A551B2F8E6E2EF52832E1072694D8DD22248A58E8C62042D09B91041BFAC2A5D21F124CC142C46D0218187198285FD131DBAD3194C2B4F1D0133C7D572C292195455E8C4A249A2B118A6283AA2F998119DAE9E1CB7FCE27EB66EEDA6BEBE86CD5BBAD8B6653FAE250A2709D8C4646B44EE8F30037A41805D5B4DCD49228A6EE53FAE9ECF19936B0BE246F118BC3C921E0BE4AD22E8F2AEEE3145D0EEFA1B71EEFBF383EA4A94B79B2F1FA5D5CF2076E9EFD02ADBDEE82AC6ECE742822E265F6BA42D8F3F6ED9C7D69C8615AB938FD9A2FD5345CC2026324F8417B9CCB929E1D7F5F2966C3725C9D9B664F42C4A9C0AC259BFCF626B5796798B16D0D9DE84212ACA8571B7DC2A59FD4EBA42866F0282188BCB417246B1F3F7219DB75FAD0892889C65328ACC16149383C3D1F310514B1B5DF8775943A35846D4F711DD508487DAF65C74C72261E789BB79E6774C62EFAEAD9C71F2121AABE338A64977574E584E68195F41736B1D4F3CB19D4F7FFA7BA4D28284435D7EF98953B9E4A21359BB660BB7DEFA0039CB0C495A3CBDF82E9609C90573A858BA808F9DD5C9B527761211369AF02E75F0E469E15146A6B31464ABD14AD68AA0CBA38F3145D0F61D57E36DFAC588B4B3D29BE6117BF7EAF2503A2A4785F634E16858B76B802777A7C957544A8FB1889E45C45C1B8FBD42058C62E28900264C139471B8AC71E162A70764B94F41CE72324E94E8F46D2C3DCA6F9EDDC3CA534FA6655C3D81E34B57B5F8FF2B2D879336A414209256640DE7E18EDB8746D087D6D810A42B2606C537CAB2A1E277D925254CDB2E56A62BED1F28AC7FC29D1188F7456ABA206B57E8E73ECD519DD3674C20EE7BF41CE867DAD4F154C4C57A3D1E7D7A3FFFF3BDDFC8CE2A9FFC8BCB58B56A11BFBFF349BEFDED5F93F54C343F82E66579EFBB8EE7739FB99275EB77F2B9CFFF2FDB76E540BCEF69F86E8A5CE0109D3A9571AB4E65C5C25AFEF2C27934579A4481D05B134A49D20EAE891F0DA320FBC80AB1D24613DEEE0AC9FBA3E26C56045DDE611833041D0CEEC0FAD58523226FC82481D665C4AEB8BF3C948ED25182D0BAD2791ED9D2CB012F8A174F8471ACE8986DE854C5A2AF52A26838C295AAA92067619B732CD96A4AE8CDD239E1D9B88E4B2A30D9D29367E2ACB98C1F57876B87198622320F55D7972FA5E45C94354AF56741CEF2F7C2A460D1B75C2A6FBCAC4A5DC15227C958A6758791F210418B424BC2FA57F8BBCC0A141AB46C572592516C3C51CFD9B1995C5341936FF0F8236BC8D80133A78CE3E20B961389EA7CFE0BB7B271F36E342360C1DC164E5CDC29E645B9F781E7D979004CDD2011B178F7554B79EFBB4F2195F2F9D6B77EC1A3AB77E3D92EB1288C1F5F41B2A282A7B67553BFE2541293C6D1520BB515D05C9564666B3D6D0D5574D625A88FE8529212924A65DC90FF1613C38B754CC4113BDCE4EBDB717A2B822E0FF53143D061D1F96F1CBEE87C79FB3A3C4AF89E57FE1BC69C6B5EEF27C7F4F862E4296B55482B9AC6B3BBFB796C9F875E511146589E4D4483642C8A71D8C48850B32EC664923885DE6C0BBD398B9BCBE0E6B272124D44CF8EA7B1A13BC70B072C8E5F348F299DE3110FF122CA139B5070C1BD0CD7C3C91AA5242DFB1116A48D22098BF75F4EC8C54A75C35EE7522943F89BE5EF25353686BBA18814F490A045FF40E1950E2C9FD481019A8D80E3A775F2C4939BC858018F3CBA86CB2F5949A66F0F7FF197D7F0B14F7C8F0D9BBAD0CD084BE78DE7C37F72226D2D06916805DFBFEE3E3A3ADA9935BD93CEF62AAA2A7574DD249509B8E79E27E9EDEBE18A2B2F62F2E426366DDECB97BE72231B064C2A16CD837852B6D615C9E862A2559471B5BD3C7AE0501D37185F6370F58A49CC6F6F607C659CEA9849B450C44AC847A58E72F9FCF3364D362A822E8F4AC60C418BAA75EE0B37806797B767AF324AABEA2476E583B22BF7B1B98436B5BC1BF0D4BE1CEBFA020253D49F0B307D979829B46761A913DAEFCBA3DBE149C6F0F1DAB32C1C41CC96F81996360449BFD4EFF2E4DE2C53A64D67C9AC293241239C637C659B5829391749B9F45F91065EAA3317A50D31A6D8F0B57432301C2B087A385296A45C283B2A12518A2543A537BB245B50C81F610DE8D0BD91EBCAF3E2531B684BC225672F65CDBAED38BEC9D66D07386E7A070D35011FFDD8152C3FEDB3387E42660C365519BCEFAAE59C7C621B11C3438FD5108B4464612943F3D145828A261C1E11A2F14AE992314D8D6CDEE697BF7E9A7FFBF7DB493911F4A67A3022B2E1811635312A931889387A55257E65054E24826DFA541B1653C655B268623D67CE6EE5F8CE3A92C23F5DB0F14979E835DA90BDD9D78522E8F2101E33046DDF7639DE96DF96B757AF31CA987D0DD133BF3722EB1AB32B09020EA42D1EDD99A1CB8FE1EB614C1C0D7CD9ED5AD46A2E54B57FD92E16095A5AC37C17279BC14EA7F0EC9C94396C613D135A74E0B3F6804B2A5EC7890B6753138D86135B929B43DDF9658EBD42C1A262647790A451485211045D1A4D17ED73C508BAF87B314B3024F0E1087AA87E46C1032DE50B37246F31AE94A045228D903564228AABF1FCC3EBE9DEDACDE23993B8E8ECE3D0FC1C1B37EDC5334C2A2301975EBC9C5CCEE6437FFE63FAD38EB4D9E164B8F0AC595CFDAEE554C504C746314C9388114117F545D089464D62A2B398A1631886ACD3B16B6F3FFFF8AD5F71F71FD66106313C212A17F465D1D6C0D17DCC680C3D99C4A8AAC4A84A12D4D762B677E0450D0C3360767B928B17B470D2C446A6B55493940D69DF7E0FB522E8F298E3D823683D22B567BD797179081D45A364E05A48BB1607FEE91D3DACEB75D12AAAF17571F107C4651B2AE1B31DF6481F0A812C312AB3F4449FBD3C766A1027932AF8853D1C3B2F33025FECB6C946AA5930FF38EAAA2A0BC5F88B6B3B4C645E24E0121BDDC1B24668AF9313838531A5DEE6A2065D8CA4C3BE826171FE506B0EAD7EA13BA390A4228A3249096398A045D76D51DF597640112E0E3B4B65D4A47B571FABEFDB4A6005B434C4387BE5143A9A1368668CDEC114B9748E8A8A2A5E7CF180D4944D532797B769AC8B73F2099D1C376B3C095323E3983CFDF47A6CCBA3B373A26C58904A0D62E811AAAA222C5F3E9FCAA4CE60DAE2B1D59BB9EBCEA7E93990A6B232414F6F8A679EDAC8A489AD2C5C3C8DFBEF7F8E7DFBFA993C651CA7AC9A8FA399DC72CF0BE8C90A2C714C1BAA699F3591899D2D34D646397F7A152B66B7D19810425368510CDB29840A7538A1F8E653B822E8F288E5982368BD712EB1773F3EF63A7397773C5F635468ED12015457C6E5EEE776D16F561215FA73A11E7ED21417AE68562A29F07039290482C0A53BC3C1CDA5B15329F9AFA843E1F83ABE9D664B46E3B16D3916CD9DC9F2E3A6C9758A08503BB8B4DDD0F61E6E42B0F8A620D9904386C9B9288314258DA2CC51FA7B585F232C235A4ACAA58E0D59856EA8C9AB983874B16D0BD713FA738067E54906164B674EA4677737B7FE622DA9816E2EBB7019EFBC7839BD5DBD3CB7712777DEF3047D030EFBBA2DE29128FFF0E9F3A9A9D0C8BB3E158908F535E2A9C424168BF19F3FB853661876B435B164D15CE2C988F464F7F4E4B9F9E63B983C793CD75E7B05D555BA749A7477E7C8641CAAAA4DBA7B72BCEFEA2F326BFA243EF8E1F3F8F94F1EE2A9273672C1852772C699F348A72CAE79FFBF138D26A9AA8A921CDFC89E4812AD7D025A730BE36A3C4E9BD9C0BB4F9ACCE28E46E9D609B3436505ABC275F1CAAE9A11390D41D5E22813C8B141D0A68B7DFBBBF0B6FDAECCDD7AE561E6E24F1159F1B5235ECFD85B41C16825224A74B67465B877DD3EB4867168221345689281465C3C92CB72FA32982A743339786FC5C49E2E745A3131984961675292C8022F8FED050C3A3A77BDD88F9BACE792954B6916A5320541CB28FDB51D1B61465DB8C83C944281A56281FDC3D9E90ED59C65642DB304C32EDC45821EAADD2CAD7FA2F0FE702FC1A20DCFB6457D0D11417B44BD3C0BDBEA583167221586CEB6032EE9812E96CE9D44476B1DBE11E5869F3FCA3F7FF7F70CA41D3CD3208ACEF7BFFA4EEA2B5D3CD15D46B82B44701A89E193E4735FFC1F2E7FC7E92C5934858A8A2855D555242A4C296D7CF39B37F3F4535BB9F2DD6773F1C50B8919A20094417757370D753544E3557CE04FFF9AC6DA06AE7AD7E974ED4BD1D337404B6B0D9515115C4BE3FFFDC5FFA09926E79CB78464BC821FFFE271F658106BEF20B26C31B6E130B71E3E79C66C2E3B7E52A1BAA008A0C5F4A3005DD68F7D531715419707EF9820E8447E07F65D1FC2DFF348797BF52AA3A2EFBC1BA36DC511AF67ACAD406AB9D2D226A2508DD59B0EF0D4AE0CC9D6567CD15B4A14330A3462824D8AA923C345EA0EDA5DC9B1560E5768CF9934563E856BBB18760ED77378B227C6635B539C7FE652164C6D2370C42D4168CFA113F7D0E5708E0D912C534CC428D598C5670FF53797CA1CD2DF5C48020927050FAEB75194368A3EE8A1641459BC49A470FB389683232622DD3CD31A139C377F0AAD0993B809664D35C9A8B8E178442231D24EC037BFF32B6EFCD573785E8440D4A2D63596CEA8E6FCB317336D5223B1427DEA4832C97D8FADA7B5B193B6E6188978841736ECE5D9E7B6327FFE4CCE387D0935B5716EBFE3596EF8D14FF8D2973EC07173DAA5D4B267F71E9CBCCB9E7DBDF4F5F5D13EBE9588E9239AF08A42FEA29B8BB0F10985B9FB80472E97A7ADAD8AC71E7B81EBAF7B845456C3094CFC855349CC9D493652C1C2D608FFF927F399D35415362B9085AE7499A8A4087A745CE16382A063FBEF97F53782DE0D47849A5E3F5BBA3788561ED17A46FB87C389B5D0A72C0D71B28646802BFB004257CEE18117F69237AA885726866A4008028DCA1653C58E27AF10F0FA0176AA17279DC6CD67F0F27949108E98300CA27CE7D16EDE73F14AE6743622BE54FA718B0D4F4AC03B5C128A0CE0048DCBFC1321C90CFF1489FCD02248A5B24691A0852C52EC7A52D49DA5CE5CA8FB2C9D1905DDB9B4F8BEEBBBB8791BDFCDD15615E19CB993993EAE964854F4103449C46398A22E891123123788C76264F23E37DEF2000F3DB199CEB6361E79683DCFBFD44760E75836A7853F7DD7623ADBEAC86434FEFDFBB7F3E71F3C035D8B70E73DEBB8F1D6A7B182288E35C0F4CE6AEEBDFD6FE94F7BFCD5A7FF83258BA671ED47CE95B54BBABB7A181C48234A57899E878303199E58BD81A79EDCC6C4894D9C71E602B66DDFCBAE97063969C53462B1F02964CBA6FDFCE29627E8ED4F3363662BEBD674F1D29E41EC4651EA602EB4B7B0A833C95F5E3497D327354AFFBB903ADE6C155A45D0E5B1C8D820E81DBFC479E40B048347D6B95BB4B28A9E7B0398C9F2D019D5A38AE9CF61265FA807842F7D21D816EA1E3B3EF4E75DD97D7BC0F2C9381EBDB68F25EB6A0839A3F8F9508B14057D0E2A1577E8A3AE206FCFC5EADB2FE50DCFB2B12D0B57A47613B0291D636BB682CBCF399EB858A31F66FD1D6E795582F6C4A3FDC1045D9A8052943986A3E7302BB0E8C41822E5621124A9290FD77216759D0357746D11138661328D90385CDFC3CD0E521F373963CE44668F1F8768B12584A1A86952D790A0321923669844449317DD9451772A67914E79C41311FEF0D07A3EFEF99F4A1FF909F3C7F3BECB17D3D1524126A7F19DFFBE8D0F7DF07412D12477DDBB9E1B6F7D8AAC6DE0BA29E64CA9E70FBFFE222FED1CE0BAEBEFE08C558B983EAD01C7F1C80929C989B06B6F9EBBFFF0088DF515444D839FDF7C3FA79FB9844B2E3D953FDCF5383FFCDFDB39E7DCC55C74C90A2A2B62128FBEDE2C8EE7D1D454CB7F7DE71E1E7A68037A3C8AD5D244F4C4A5588918735A63FCDFFB9731635C95EC4A1318A1E4351C498F6C58AD08BA3C721913041D7DF187B87FFC7B82EC81F2F6EA154689C2489193BF0E46EC88D6337A3E5CC8E62B5E3B525F0E3B64F7E63DFAAC9098BBB32E693BC00944BB284D7A730BE59B0F22681971BF56E28248DC736D72DD7B70B2697CCB91936A2222CDF83A776D4D71FA69AB98DA5E876F0B4DF3B5C939149A87E56E593B5AB6A23ABCDFB954831EB2D405616D8DB09091F85CD1AD51A85257ACE15C88A25D3B4CA41111B3746A48EFB3D0AA1D92DE202B66CF60FAB866366EDACD93EB7630904EC9AC9AB9D33B58B67812F36775D0545B81EF59E4450125272097CD61D93932B918E7BEF79F9938BE91954B27B262C9046AAB23B87A941B6FBE8F534F5EC2F8E64A76EF1DE0C7B73CC9F3CF1FA0AE46E73D57ADE0931F3B87DBEE788ADFDFF118975F7E0A2D8D49C19632FD7ECDDA3DFCDF0FEF62DDBACDBCF39D2BB8F28A93D9B9B397EAEA18F58D49F6EEEBE3A1079E67F2C47666CE9EC4E64DDBA9AC8CD1D9592FC1CD657D3EF5E91F31D02BFA48826546C877B661CE9E85555BC5972F9DCCFB4E984CBDB8F3489D235C868FE0C809D38AA0CB6391B141D0CFFE23CE93DF023757DE5EBDC2A8C819FF8D29DB5A1D2DA5458B151634D2B6477FDE21E3F8E4029D03695746CBB2B934A2C9AA8802C30AFAA2A4671825178B5B0E5F8C52147995EB505AD6AC3C9903BB64D6A02726D46C9B8CA3F15CB7CD93FBB2FCF507AE20A20B7B5B28B11CBA1C94882227270F2E21FA4A9981F221A130E137AC4317124E4469D342224A91B40FB6D37961995069AF2B383764D53A91BE1D7A9DC58D47773D8E1FDF447F6F0EC7D648A732385E9EF1CDB574F76519D790E0B9B55B696A1CC79927CFE2DC5366E13A1676DE2697CF33386873EF231BD8D735C8CCC94DB4B7D6938C0AAD188C68820D9B77F3C4532F71FCE269B20C695F7F9EFDFBFA98D0398E19B326B0F1C52DDC76FB6AC635D672C53B575095D0A5FD2E5911E3C9275FE4A187D7CA4495450BA632635A13BA1E953715F17420BEC471024CC3249DB1F9ED6F1E116D1C39FBDCC524A251D2A93C7FF7F7B7E0BA1102DBA3A73743CE30099A9AF0DAC7D3B16432E72C69E7ACA9F59C34B355F69A0C6D78B200F5880AD38AA0CBA3B2D14FD0864BE48F9FC37DEEC8134B84FEACB71C3FA2275A79308FFCA89052C30833E3066CECB6D89D71C97922D013979470B7CA82CE0521599AE786FB01BEC14D1276302F9B26B57F275E2E2B1BA48AA2F5FB3206B7BD3848754B339FB8E81459D02A54410F26E843ED74A17BE4E57A73E9B8C3799D87248E12A786187750379482DF59DE5464324AD8C1457CB658783F7003F29ED8870C86956566CB380677E7F8D91D4F307B4A3B1FB86225F1B8869DB7C8E71D49763FF8C1EDAC7E6E278D4D4D7CFAFDABE86C34A56DCCCAE71948EB7CE9DB3FE7E295C75355A5CBF65DF555111A6AA2B2FE46241AE1073FFB2303FD196A2A13AC5CB984BA9A38AE67D3DD6D71EFFD8FC908F8AA2B4F236E0A6923C340CA4133A2C4A26282D70E1D3162424188D3F2F00A374A207F04A3CA7ADBBECE9EDDA271408ACE090DB2029E382BD6AEDD851718A407036EFBF5A3BCB4B34F4A3879132267ACC26B6E605A93C797DFB180B3A70B794778DE45275E71AB5511F41BBC6CDEF0C7463F417BBD987FFC1CDE869FBCE19D2C7E50F89FF5A6F947BC9EB77D0562C61D106D11BA320EBBFAF3ECCB055832522E542FF30359DE532ACBB2EEC6F0B4E1CBB7BF34821E7EB760851EFA83ECF957D06807F7BE842F9C1C8E8DE5FAACEB0AF8C3F634A79FB294F38E9B24279A0AA6ADE1CF9724A214A3E1E277149D1743C45C42DA877A9D0FD69F8733040F47D0A57537647BAA42828A2C7A24BBA104D86E1E2FD7CFC49A4ACE3D7E111FFF9BFFA3BABA8153164CA0637C0BBFBEF75976F6F449FFC9E5672FE4BD979E483693E5A777ACA5B936C15567CF0527473A9B12FDCEF9E12F9FE48107D613AD88E004010BA6B773C959C7D1586D08C3057937CE9AE7B7B16EC30E4090BB88BCFB686A68E1B24B4F66DAC47A6286905C3406D236BFBEED61FEF8C4063EFD89CB18D7501936CC95A4A94B0B5E36EBC8CCCF6884B03142A1AFA460EFAEDE14CFAFDD4C67BB68B555174A165A848D2F7471C30FEF65DBF61E594D509C0156472B15272E215B19E1EC6915DCF8C193C2F415697B0CCFAB915A54045D1E92A39FA0AD7D988F7F166FD32FCBDBA3571935B6093AAC9F519C5FB77D9F8D3D595E1A74487B4658A54CD7A4C62C62D762E727D9B95A62F2C666E64B2F49499E9E879DED27B56787943A44169ED0B71FDA65B379C0E79A4BCE607A43A5D4B24B09FA952604C34D1B2E7C344CD007BB3786258D42C3D9429660A9AC213E5B1A41CB946ED13CA0904558DA915BE8E69E982414371C2B4D53D4E7ACB9D398D2D2C6D91FFD365FF8C47B3975F1447EFCABA7F8DF5B1E473345395593A8DFCBDF7CE2024E3E7E269FFED2F7A96968E6AF3EB08AE66A91F99792938DDBF7E4B9E5F6B53CBD790FFBFA2C1AE206579C398BF3CF9C4522A6614685B32646366FB0BF6B90FE8134C97884F1AD0D744EA844D610742D1C342C2BCA962D7BD8B5B78F850B3AA888990579CAA367D0E7DEFB9E938D676B6AE29CB6721EF3E77662BBE942D6A6C6FD0FBCC075D7DDC505179ECCD967CF97D98B77DEF1240F3EB89E7DFB2C904D02C4790379313F31A593CA139630AEA5921B3FB89069F549793E89E256C508FA35E729CAB8521541970192B8698EFA9657D65ECC3F7E166FF3ADE5EDD15148D03272150E559150A7C1F6812C9B7AB2A47D51DB423831741CDD43383644728520E54016030E67E18B9DAF87A0293B102A991E2AB499129D52ACC13E52BBB7E13A79A93FEFCBC05DDBF3548D6BE5FD179D4432081FA7C36D18962F8AAF4B0F914C4A2929B87FA853A35473169F2BBA338AC5F60FD59D8B042DC95A44CC857E82B2334AE1C70B7CACBC2027F1378B79CDD59C3EBD9DBAAA18BD76824BFFDF75BCFBF4395C71DE095CFFBB35FCF2FE0D61179920C0C9F6B3727633FFFAB50FF1FB479EE1C7373FC8673E743673DAAB480FA6B1DC3C96E5921DB0B9E9EE17B9FB8F3B69694EF2912B4F64E98C4634C3A53AD904A6B80159619AB51960EA3A51334AA2BA194D384ADC0C795BE7F7F73EC9AF7EF7282B4F5DCA79A7CE2126928A74979D7BD2FCC5E76E606FB72D356A31A7675B69CE397D0E9FF9D42A7C574C2C06F4F4A67966CD36D94477F1E2690441826F7DFDA7AC7EE245B448122396C0F0C2BA2B82846D4D67A03641ED8AA5CC98DDC45F5F308F55339B10A5B3C2E8BBEC93E755AF5745D0E5D19922E8F2707A5B47C94C3A4D931EE66D5D2936F7E5C8184939D96914E48B8C8804458DE382EE5B24C7305DFBF012C66BEFD4B0052FECF9272268177BA09781DD5B65D71441803B07E1AE1D361D53A7F2DEB317127545BA83D046C3AA69A12F3B5C4A5FCBDFFD973B36C4DF0FAD4A375C00A93019284A7F160A2B15B3030F9A142CE8D1B20FA2C44614DE0F35E83019C5C2772D702DCE9BD9CEB249CDD2EB6C6BB59CFBE7FFC1BF7CE9232C9D5DC7F76EFE23FFF5F3A7C08C482D56CFF4F1D90F9FCE490BA7F1D9AFFE90CAEA717CEA9A93E968D4490F0E62D9196C4F279D8971C3AF9FE681A776B2EAA4697CE01DF369A88960C422FCE496C7E9983891D933DA185F671217968A888EEB193CF8C85A2AE31AA7AD5C246A0BB2FAB95DFCFD577E4867CB383EFF990B68AAAD92730FDB77F573CDC7FE879C1B0B537F021D3B6BB3604E2DDFFDF6D532B925D06C742D86615648FDDCCE67652A7B4F7796679FDDC2BD0F6CE0F98D3D44021D5364558A3040B83D0870A6745073C672CE9A5DC35F9D771C53EB92AFD256E1B5CFA4434728822E0F3345D0E5E1F4B68E129AA3E5796CECCDB3ADCFC6D1A204BA29BDB9A2B09BD05145C3D7B001529831286D03AFB01CA6A5E06BEE5F512316F537EC811E06766DC5B1454B2B871DA980BB77794C9D3993F79C311FD31D8EB25E89A04B13504A23E822391F9A8C529A3D2826D44A53BB8B045DD4A08B5E6841C8C5085A24A8086B9D48F2081353B244038789D5559C3AA38DCE862411334AACB292D33FF67F242B2A3973C9049A1B6AF8ED7D6BB089CA4CBE93E67770D1394B18CC64B9F1670F31ADA396779E3E07138B6C368365D9ACDDD2CF8EFD197918F6F5E6A9ACAC64D9DC76AA2A626CDDD5C70D37DF4375A28271E3925C76F65C56F6ECE2F600002000494441542E9F4ECA8AF0A31FDF475B5B0D0BE74D66F2C466621193ADBB7BF8F92DF7D3D6D8C439E7CC26198FA3FB1E7BBAFAF99BAFFF86ED3BB3E4F3AED4A0135138E7F4195CFBBE95B8B29598C58E97FAB8E79E3554D72458B572A14873A1BB2F232596471F7D89EBAFBF8F88AEA3FB01AE485011A78F68ED555745E28255D4D447F8D35327F3BEA513A98F475EF33C29778022E8F29052045D1E4E6FF1A8E1A40041CE83AECF969E0C3BD326AE8C633C9C00B26E801BB6D90E7BF9BD89CB90D3C2B5C90F76D3B7630B8E9D95A4B72BE373DF2E9F0953A6F3BEB3162314F1701EEBF0BD04C3505A3442092BCD95BA380EADA9513A2128E50E69A5B30B76BBE16E28C5085B960A15FAB4A8F72C1BBEBA327A96A46D7B8584141BCDCDB2A8A38565D33A694C68C462069188705918DCF3743FDFBEE17744137196CCEDE0C25366316B6A27F73FB691B696763EF5B73F6057F720A72C9CC4973E703251D325675958B91CDBF6E6F88F1F3FCA9F5C7916EF3A773EF94C967FF8EFBBF8F99DCF485C4CCDE7FFBEF54192A6C73D8FAC2716D3B8E6AA553CF8E456BEF2ED5B98377322E3C735B0706EBBB4F1897D58B771A7B4ED2D5F34998AA429A360218D740F183CFCD80BAC5DBF95DA9A4A4E3EF138664F6BC6F35204BE284C65F0F8D39BB9FE477772C6AAE339EB8C053CB5662BDFF8E62DE4AD28AE2B52950ADD1F45FD0DE9D81025397C5C53C39B3189CAA58BA8A886EF5E398F93A736C94317CA1C4796B8A208BABC8B5511747938BD65A3E4692F66E80B9A5FCAF1D9DC9767F7A08555E842276A26E47C911518BA34E4E55248A51EB24295CA1A877077F91174F1422CCA1342CAB4A5C4D1B363236E3E2735E8BD599F07766BD4B775F0C10B9713D38C50CA286CC3A1124758C9544CF689ECBF509429B5D21DD6565778049772856841E5879F1F766984D24758CB397C1D367C2DD6D870E5CD44764E716DB2FD39A6348DA3311963E9F446664FAA236A6898310333D6C8ED0F6FE0C6DB1F63E38EBD2C9A3F8D96867AEEBEEF71264F9AC4FA2DBB686FACE18A55B3B8F8A44EAA6BAA71FC80AD9BB6B265771FB7FC7E03D7FEE9859C38A7153F6F71C36D4FF1AB073690496798DA56CB173E76169695E1F70F6F67C3D67DAC38711E0FADDEC4DD8F6DC4CD8425528F9B51C9B7BE740D6DCD757CFFC6DBB9E99607F8D7AF7D94C5F3DAF19D5C88997892F20DB2962BEB474784AE2D4AA54A8BA3B0DD451848B96CDBBA9B86FA18CD4DD5FCFA8E67F8F677EEC430AAA5475ADAE870E571105DDBA563C31713CD60D75753B57C095A5B1DFF72C51C2E3AAE45E69E86245D284FFA06AF0C45D0E50137FA09DAED09270937FEACBC3D7A955163C3C5115AE88A997E3B072C9EEFCA91173193268A43EAE43D8F9C78542F55055F4D673E34B82EC9DA7BBDA006AE8333D847D7B60D78D92C8E93A73717F0E83E03B7BA9E0FBF6315B551531244B1B46891A043D2966C7C5021A4A2AC513A41585A204946BF41584CFF95AC74227B50269D48CD5964040A19C339A8F8BE2D9351845FD963CDBA3E3C4B448B1AD79C3B87F79D3D839A6840C48C10ABACC0D3A2ACDF76805BEF5EC3C34F6D61206B61B92E139A2A993FB59365F32631797C82E6DA186DEDED18A6CE0BCFBFC0819E3E06337166CE6EA5BED294FD05F7F5E4D9DB93931A7543459CFA069F6CDEE4A6DFAEE3B67BD7108B2749673C328E256B74882784E5F31AF8F2272F65F6B476563FBB9DAF7CE326FEF29397B17CD94490859184BD50C81182A8455ABC2DDCD1E019F8BE8E70F9AC59B38B3D7B7A58B6741AD55526E203BBF6A7B9E5D6A7B9EF81E748A79C822FDE970D033C471488124D741D74238A1B89139B3D83CAC5B3F9C87993F8C8091D54897E68E209A95058E9F59E3FC5F18AA0CB436EF413B4E111F9E367472651E5AA47467DA1FE7042509744B4B32FCBE63E87415FA4DEEAD2F79C753C6CDF905ED7D219F5D735117898C24505D5E155CF1A39D5278A09A507D8BFF9799C94A8C591236D3BACEB8FB1211FE7A23357B07C5253C16257F05F9746D28526AFA51A7451C628FE6D485316581C525FA318359746CF42069004ED7B8852A143B63A9198229C1CB25D958393CF5315093869C102563FFE025535AD3CF6FC0E164F6BE02FDEB984C60A88181AB1448268348A6E98ECDE3FC0D69DFBC966F39214639180AACA040931A997CFCB47FD8E09AD3436D492CFFBE4F396246BADD8FD44A4DE8B92A6AE2B13595CCB2197CF48FBD4B63D19EE7E7823DB77F7326D721BAD0D491E7D720B0D0D157CF0BDA733AEA19AEACA28220774E3E6977869670F0FAF7E01C7F53967D5024E5E36155364120A4B9E63C93EDF791B0C23206F6B5C77FDED18BACF1597AF24168DF1E4531BD87760102BAFF3C0C34F93CFDB9C77F672060607686CACE1C0BE2E3C4F67D6EC697CF73B374B32F7AB6BA85CBA8459CB3AF8FC457358D159272D9DBE5E9C8E7E63D29A22E8A385A0233A9167BE86FBD43F832B2E8837BE442FB81963F205A3BA58BF8C32358DFD83799ED9D54F464F821112F440CE262BB2C5C4A36DA1C07AE9E5F17A2E95C3F93A5ED5EB515CB9B0AFE50638B0E939F2FD7DB2925DCECAB22717E3F1BE04D367CEE4FDABE613C8BA1FE11A4B270A05798A4941C9F525B5360E4D46092368F1E82DBAA184F5358A51F541D982059D5910B9F8BB23258D82AC213307056187EE0D3B635111C007DE790EE3E319D66E4BF1AF3F79800B4F9EC79F5DB8105377D1A326D5958942F53D61C71384EA228A2B897E8BE96C1ECB1637823C563E47E0384CEC6CA3797C2B6622269F0C743C06F3067B0F0C4AFFF2C0608E6432C6B8BA4AEA2B22D8763F962DDA6841FFA0452AEB9248681858FCFC77DB59FDEC06162D984ECECA71D292E95C728EA8EB0CF73CF002DFFCCEEDAC796133575F79325FF8D455AC7F612735B5513A3AEBD9BE2DC58D3FBE8F8ECE24175DB092FD7BF7C93AD46DADF5BCB8F100FFF29D5FB16173376D4DB55C76C54AEAEA74162F9C295D2D56D6A1B2CAA4BEA91E5D8BF3FDFFB999813E83DFDDF128FD4D6D542E9FC307CE99CEA74E9B4E5C78DC656661B16EF7EB39F3C2EB571174793C36FA23E8884EF4F9EFE0AEFE47027BA0BCBD7A8551A250BFB9F0E3A08FDC6CF4116DD0613E2CC82CE7073CFAE27EFAFC18463C5EC808343890B3B134A1136A8812CE2398795BF66E08C274ED0C3D9B9E23D7DB8393CB62E5B2F45BF074BA023BD9C417AFB940DAF1867A7F9756A513E45C983C3C1C411F5C6363B84555697D8D525B9DACAF51F03A4B0DBAD0BEAAD8EC5554AA13B52A703CF6EC4DC9CCB9692D0D5CF73797F3ECF39BF99F5F3EC8DC9953F9B32B57D13A2E89AF9BECEB4D317D7C1542CEC9A4B2B2C7A088C48543C3CAD932C1C5B2F2E49C3CB5B535B4B7B4128D478956082F739CADFB737CE55F7EC9DA8D3BD9DF93C672908E8CE6BA1873A73773ED7BCFA4BA52C74D0F4A4D5CD4CF10371622113EF4C55FB0A3CB420B5C34CF65C1F47AFEFEB357B064EE4499F1B77D678AEB7F7C2BADE36AA9AA6AE09BFFFE332E3E7F059FFCC43BF8ED6F1FE4AFBF701DE79D731C1FFFC8A574B4D7C93ADD426E7AF299ED7CEDEBBF664FF720313DCF673F730573664DE69E7BD7B07AF533B434D7306DCA783239970B2E398FA953EAF9C5CD0FF2D5AF5C47AAA299DA734E65E9DC66FEF9EA654C4C98050DAED8D5A1ECD36768A022E8F2301B13041DDB743DCE637F4790DD5FDE5EBDC22863DE47889EF20D30E247B49E37E3C34305E9029F6777F7B3EE409E644D9D4C991673F639C7A74F5CC8087216133AA12821FF79BD014CC18957BA1FAFD0E864A8E5959453A4842C269FF2F46C594FA66B3F7666102B93216BD96C722AD998ADE41B9F788F944286DB1A163305C3EE289444D0826CC5F2B2D6557E2855944A19C5A495E1FE8161D42CE48BE264A19C189456BA30ADDB96F2874D904FD3D6D0CA434F6C6560C0E56FDF7B22C7CFEAE4406F3FBF7A681D8E11E7FCB397B1FAF10DDCF5E85A2E3E753EEF38750E6D8D7172D99424E79CA5E15869A2318D8816913246BC2A492216150F38E4F538773EB49E1FDCFC304F6DD8433C9E90B53722C2DC261C24A257A3888A67B471D945CB387E4E0B869F93DB8F6FB2E5A5149FFCD6EF481391BEE4381E679F3285BFFAB3F319DF5089EDD9329DDB301274ED1FE0D6DB1FE4C1D59B9933B583ABDF751A9B366E67D3A67E2EBDF80462A683655B589E887303EC40E7BBFF75071D1DE389472D664E6E63FD0B5BF9F7FFFC151133C6C7AEBD185D37F9C63F5DCFC4C9CD7CECA39713040E37FDF40FECEC75094E5841DDF83ABE78D93C2E98DA50A8F1A208FACDE082D2758E09828EEFFD03F6839F21E8DB74447868F533885FF9304485D97FF42C438625F1388FC60D7FDC4675739B2439F1C09C760306F236AE26AAF0C9A4EE90280BC4FC7AF939A4F68397575AC7CBFE2EA3618FCCDE9DF4EFDB49A6673FB9C15E9C5C9A8CA7F1A2D3C0F2732F65E994163CA18BCA4941C1C98592A28568BAD4D75C9A2D18EAD122B12424E82152164938C5D655B2546858FF39EC27188E15846C89DFC5EC9967E1DB2EA201AC20D7A6CA4A3E7FE5198C4BEAF4A7323CFEDC1E3C372F1FFFFFF7CE75DCB57E3F3927862977D89451E607CF9DC9C72E582823D93B9FD8CE3FDEF07B164CEAE423979D4847438CA4E9138BEA44A2097A2D8DCB3F7BE3FF67EF3CC0ACAACEF5FFDBED9439D30BD319981960E8D23B82A0A8891A6BAC29A6F7DEFEC9BD3726F7A627D7146F62A229C6A8B125512CA8A8802220BD0E7D18A6F776EA3E7BEFFFB3D63E0706053D5272AF66B60F0F32B3CF2EEBECFDAE6F7DDFFBBD2F075A7A98775E2535792A9FFFE8E51CDE77446A6578FD1E8A470EE7DB3FFC235DC10C36EF3E484196C167AE9DC7B2B915C4AD08A613E0C6CFDD49BF290208958C3495658B2732764C392B57AEA7E148339FFDC8E55C7DC554E962138B0A77700B4DA6776C3979C762B654A18BC735EE7B6815BFB8F369028174465595D1D6D6C5F471D9DC74E3321E78E859FCFE346EBCEE02145DA33F14A6BCA4587E57ED5D1D1414E4A16A169B371FE43FFFF33EC2E7CD451B59C2D22A1F3FBB6EE671D12DA1FD721ADB50049DDAA0BD3D00BA7303B1173E87D3B13DB5BB3AC55E8AEEC7FB813D2881A2333ACE59FD70C2BD44469B8AC3919E101B9AE3E81EE1741227E63874456CC2A2334CD564FE5CD0F04E24C09DD52B7A938309AEAC45A4A79DDE96467A5B1A0876B7486D68A110D71E0FD0513E979B2F9A438EC099B840679195750B7E227A7E2D38BBC09BB0A63AD61DF8FA08FA58349D10D73F46A54BD85589283A2AA874C228362EBA1C6DA93DD1D91FA3B9B5939F7CF40A1657E7D0D0DEC3577EF30263CB73B8EA82496C3EDCC1BD2F1EE0506B5C52CC4C3B4C866671D9EC0AA68ECE273F3B83E7371DE2A1557BB04371668C29E6C3974F656A550E5E03E24A1AF73FB795DF3EB18B505F275FFAC0855C30B98CC9132AF0790DA9156D9B361DFD7D6CDD7D8467371CE5DE475F116E855CB168145FBA71219A3D80E9683CB67217BD4131F1D81C69EC64DD96161C5D98CF86890D04F9B74F5DCE37BE70312DAD1D3CFFC2368A4AF21835B2180783D5EBF6B273E7513E72CB6232B2D2F8D3FD6BF8D91D4F62DA5ECC6888F2920CBEFB95CBA5D0FFF77EF62899593EBEF7ADF7B27D571D7F7B6213975F3C9BEBAE9E8FEE31D8BAFD00C1C800C545053CFCF04BBC14CCA63337979AAC280F7C7C51C21C3E2943FAD69FBF21804E6DCCDE1600ED379B89ADB815BB61756A77F5067B79DEF3185AC545677C9CB3738044549930AE306D8515DBF613CFAE9020261A5204D7B92322AC47C54E2E0BF53863E3F4A297D3BF7637D6173248B1503F031D2D74371DA1BFA59EE8401F91984938E6B0D1338E65E7CF654E4D398665CA6298E87A14138EC4E8C1C541DB923A1012A093DC68E16C92307B3DB13BD04D79B862FB6EF1F07554BA9809428FC48A10150EDD2187C3CD411ADB83DCFEC94BB86A5A213B0F7771F96D8FF29E59D5BCEFA209ACDDDDCAFD6BEA68E80E93E9D1C84C73C822C2A76F5C4ADF401F79197E0E3675F3DB47D79199974F535D1D5FBD611E972F18236979BB8FF6F1A33FBF80E1CB60E69861541705F8C8F5737114836028CAC04018BF57473344FDC0E07FFEF2140D6D0EAFEC6A223D4DE56BB72CA0A2409379E8984863490A9DC6C69D2D7CEFCE55988A8EA3DB38E1305FFEF8C5DC7AFD0CC20321F6EF3B443466535D554A7BB7CDB7BEF317F61DEAE4131F5CCC65974C61FBB646FEE7EE2739D21EC289EB32EDF1DDAF5F4A46208D1FFEEC11468EC8E72B9FBE8C47FEF112F73CB09E6BAE98C67FDEF6613A3A43FCFBB7EFE4AAF7CC63E182892C7F6A330FD546E8C81B468ED6C7B35F5CE2A6A9A4C7A4D00F7FEBCFE11040A7F616BE2D005A745DC59EB8FEACB87A6BA3AFC373C93DA98DCE39DE2B11344B2924C1DCD8D5D8CDAABD8D948CA892790101D1BD11E88C5852E3D9CD030F7A194ED6717226B21B27BBDFD71DCFFD81742119E8A1AFB581CE43B5F4773449801674AFDA78319EE2D1CC993289492386E1157AC5223123DC4B060923C9885802F471AFC06403CAEB54E912D655526FC37485F68F19BECAE614578B2466464044D8669CEC4C3F0BC68EC4B61522518B25532A1916D038D4D8CDD7EE7C8E8B678D62F1C4E13CFAD23ED6D6F5E0317432358BAB178EA5B3BD930963CA098623E466FA39DAD84ECF401453F5B273F77EAE3E7F32E5055E06A20AF7BDB897879EDFCB8D974EE7BAA53514A4EBD2626AF781A3540E2F2533238DE6F62E0ED71D61E1F4C992E7DCDC61F18F557B7879D35E96CDAEE48A4535188A70A7B1D8B9BF995DFB5BD871A09DB5DBDA7144CD44D0DAE271468D18C6D47139BCFFEAB94C195B4267CF00CFADDEC5F2957B58BDFE30B198C69C89597CF5F357931BD079716D2DBF7F701DF547FBF0E90E1FBC7E0AB3678CE6851737A1281AB3A68D95935E5D7D1B1326543275EA6899427BECF1754C9F3E8ADC9C4CFE78EF4A9E3E1441193716D5E967CD5716CBD670292025D3D0A7961538D52B3404D0A981CBDB03A0BD1AB1E5D7621D7C3CB5BB7A83BD14231DEF47EB51FE0FF812BAF460297E40D85278E4E57DF4797C9414E449301639C58EB04D8F10DA10E02C0D5106472BA78BC6A73F8C32E52852BC227232C3447A3B68AEDD4957FD7E9987B6A3033446FCB4798A482F19CDC5F3CEA3AA301B4B74A909FA9B743E71BB0C93002D9A5092CC8C6379E6846EF3F122A12B1DEA02F4F1085A449D82B9216450456130160BCA966E33AE909399CE2D8BA730B7A698CC808F17B71DE268632FC387E5B163DF3EC6578DA0A727C4F20D07C1EFE7D259A3C9F32B1CA96FE6C08123CC9C310E9FC79014BD7DFBEA78F79259F83C3AD1A84D9AEED0DDD3C191CE28BFFCC7665ED9D3CD7F7C703197CC2A21CBAFB362DD5EFAFA07B862D96C29C224AEF977F72D67EAC4092C9B5D4D4BA7C5F31B0EF1E7E5EBA92CC9E43337CE23C70FDD6195EFDEFE08DBF737513EBC90BE7E4BF2A5354DF0A155E2518BD2BC087FB8FD134CAACC055DE3BF7EF138773FF03271DB8F1989F29B1FDCC485E78F47B1426CDBD5CC776E7F926DBB5AF0185E46975B7CE93357CA7CFE5F1F5A437757841BAF5BC89C59A37865C34176EE3EC89C59E3A81E59826A183CBD621D1B361F615FC44FE6AC29C408F3E297CFC727177F2E956828823EFDF7E9CD3EF92F07D06240BC573F8B5AB6E0CDC6E69CFFDEED78B625F61EED0CF3E09A3D148CAE22CB2B3AF15444EB417BD8A63F96606B9CF32B4AFD042222564503486480B603BB69DEB78B486FA7644B74866D7A1D3FDDE92398357B0E4BA78D910EDA22D5612554E88E6B6CB85D82C7DCB813EDDBAF7546B107E59945AE3B09DC029C054759A64DE282B9102266C531C30EDDBD712E9A51C317AF9985473778EFF71EA4F65013D3CB73F87F1F58847053F9FD935B79EA957D8C2ACBE72BB72C233F5D65F3CE7A543BC2D489C3A5EB89B0988A5A3699693E2C33447666366D4D6D7474F6D2D4A772C73F36B2F15037D7CF29E1B3372C24C36BF0D7E736515E5EC8ACC923A96B6CE3BCB115DCFBF73598C0A7AE99C7A18630B7DFFD142BD61F66DE79357CE9FD7329C854680D3B7CF5DFEF62F6CC69DC78ED5C0E1D69E3377F5EC9FA1D6285A2A29961164C2BE0E7DFFF38A5394234CB61E79E56F61C68A72FE4D0D1D1C6273F7011861A053BC6BA4DF57CE7F615EC3FD283A2EA5CB67034D75D3607AF07D66FACE50F7F5ACE55572DE0C61B2FE6D39FFE09FB0F1D62F1A2697CE93337A0F974FEED5B7FE4D5CD0DA48F1D43C545F3315593155F5C40BA8C2D5C95C5D3715A198AA0537BD7FE25015A9FF54D8CD9FF96DA089DE3BD441422F278EBF735B272672BD5E78DC327B514544236B484E284E3A75A42FEF323689975948C3BD7C854B1A2F4341EA679DF767A9B1B880CF4110E0E108EC669338AA898BA984BCE9F454017AEDA0A8EC84927981C96A4D125CC5E0745CCAFCD3B4BFD8C41CD2749F076F59DDD766E91F270E216B1480433D6C7F8B2524CD28944427CEE86F33954DFC257EF5E4986C7E0FAF913B9727E353DFD31566C6B94ADD8B3ABF3193D3C93E52F6E60EE941A8A057D4E350864FAF1780D34434CA436E118787418E8EBA2B72FCEC18630BF5EBE8D757B5BB8FD2BEF61D6A84C0CC561F596FDB4B5F5F0BEEB2E213B53A72F14E547BFFC0B4B16CDE192E9D5F45A3A1B0EB6F18BBB9EA52C3DC0E7DE378FDC348BCEA0CD4F7FF157AEBFF6122E5D3A51AE18B6ED6FE6C7BF7D9C504861F1EC712C9C554D557996E44A4BDE8FE391D2A46271250D73A33184359910107F76D54EBEFD932769EB73D0741FA34BD3F1C7A30C2F0D70CD758BA9AB6B276A06292BCD65CD9A7D8C1E3F82C58B66E3516D56AFDBC58BAB6A797EE556BCD515542E5B886DD82CFFDC5C32E56ACE5DD90D01F4B90389B70D409B6B842FE16F211E3AF3D1300278AF7A0AB568E6991FEB8C8EE04AF1F7C5151E787127FD5A265555A5A8F108263ADD5187D6011353E49F4F83EE7C4697F6261F96D1BF34034076D585DA9BE8ADDB4DC791FD7435374B3B2CC1A8684B1B41E6F8455C38F73CCA3234ECB85BE893A90CE16F28803541911BACEF7C2C829646AF2EA73999061111B4C837CB7F4B9A5D18D190220A8B66D0E45DF3E7306A7809F150174BA78C42157E7C1E4853559ABBFB68EB8C70F30F1E624F4B04CD085093E3F0C5F74C9682F5AB37EEE243974E27A6F87968CD6E1E786E27936B4AF8E6871633B9A2905FDFFF38E98100572E9E4B6BC3513A43264F6F6DE6AF2F1CA6AA3893FFF7FE0554157AC8503D1C0D3A3CBF612BCD2DADD4540FE7CA8BE65098E9939D7BAFD4B6F0F51F3F4A575794AF7DF8022E9A3712D58CC97674512C35BC3AF9B9D93285613B2A5ED5C0B4A2C44527A960C2881491F87FB12C114F919CF4145984154EE58A1D97A92891BFEE0AC153CF6EE2A18756B178F1242EBE702A15C539B4363773E4681B5959856CDEB297E933C771FBED7F22AFA084EA9A49FCF72F1F4133A4510F81CAE1542D5B84EDB1F8FB276792257E282DD54E4FC47F28824EEDED7CDB00B4B5F7414CC1853EC36615392C9A0763EA17D0E7DE96DA289DABBDC403AEB8207CCFCA9D78871533A22417C516A0ACD311B4690D99B251E5ADD7C9CFCD452714A71334BF84D4A9484B840718686BA4E3E01EEA776EC0944A7751FA940CBAB36BA89E349325D36BC8540598B8A2476EEED915DE7F9DD9AB28048A7D04E80EF212143F8B460550B9EDDFD2834FE8520BA797B84347D022BF60381D5D3D0CCFF1F1EDF72D66DBF61D8C1951C48C51C3D974B49DDF3DFC22EB9B606F7318AFA671D3EC726E983D9C83F5CDAC5CBF9DCF5C339FA0E3E7AEA737F3E48606C65464F2EFB72E64EE980A1AFAFB8974072909A4D1DDDB43674F2F073AA2DCFDE44E3C812C469764529619E3D64BA7A27935344F3AAA9646C0AFE26816BAEEE5177F788CA63E87F5B51D14A4F9F9CE272FA2B4C88B1535B14362A511C774A2E46467911908C8894CB42B498F492909EA4ED7429B251E170A83A21148E482C57322BE1321CC1FC5892B6E4F90A611770CEAEB3B292F2D4053A2C4A3415A3BC23CF7F201D66FAA63C3E69D5CB8E47C9E79661DA6ADE3F77931851D9623689D161963CAA8BA6801966EF1B74FCE9011B44C710CE5A0CFCD8B9638EADB06A09DBE7A624FDF82DDB2E1988CE5E98F8C825A3A0FEF35CF9DFE21CECA274504E2B0BFAD9F3FBEB09BD2CA6ACA0B32112D0716BA04EED6601C4BD2EB5E2341774C1B63D0859CF0B3C16C8FE43E2791B17BED71DEA40699AC511EFB58C252CBB16C62E11003AD0D1C7AE5597A3BDD2EC3483446B796472C7F0C93CF9BC2FC89A3F16A8256771CA093290D195927981DA245F9C4EEC0C4BF851B8AF41374591B02A0ED585416E10C8F8F57EB43744684CAB1C6F8F23C968CCB9574C0EB2F9ACAAC51651CEAB779FFB7FFC49EDE742C5BC5438C4B261672C3CC52BCBAC5FEA39D4CAFC845F3186C6BEC66DDAE26C6561470F9BC1A32020196AF59477E7A16D34795D3D3DB416747AFB4897AB9B69D07D63470B4AD8B65F34673DDBCD18C28CE241E8E2452242A597905EC3DDCCADD8FBFCCCA17F7505452CC47AF9EC527AE9E8162C788C42CFEF0C87A0CC3275BC2C754E6332C2B204156342505C3260D2D5D7409479D8843437B90EEBE20FDFD11A96F921EF09395994E699E261DC005FB64586E3AC2C65040A9AA8B62652CA1FAE7F0FCDA43FCECD7CFD2D51B930541316A49BB34F15D688AC8928867CF266F4225232F9C434C35F9C7C7A71348E6A08700FAAC20C1A90EF2B601687103F10DDFC7DCF07DB062673C286AC124BC37ACFB5F174E1200FDEA9136FEB07A1F93274CA434C7475C11D1A34ECB80497348E41913F29D83F8A62E01E4D439E89355D68FB146CE70F4125DDFC7F59E931D8D62E96DC668DBBB85D603B5F4341C20D8D5268571426A80504E2517BCFBBD4CA82844111A19423B43E44C85425EA21B5000BD00665344C6096ADDE0085AB6710B2FC4A4BFA0480BC462A8668459E346F1CCEE767AC21AC53939146579A8CAF370C1B4914C1C9E855F57E973FC7CFABF1FE1F13D2255A649AAD9CC8A4CAE9C94C3D8021FAD9D3D74456164413A238BB3F1FBBD780D15DD9FC18EBA3646E406D044039119A7ABBB9B48FF008663A17B7C3CBCA985A73637D3128C32BA20939A51651CAD3B4AC0508859363593C6B2F2A56D34B60D50539AC907AE98C6754B27929BEE9500DC3710E7435FFF2D55230AF9FC872E939D8642DF595CA7C8313FF0CC761E59B18D1DB50DF405E3320DE65155A9C02744F6ADB84644E8B4587DE464FA98589DC775EF9ACA82E91520A26C494237E5337FB825CC8F7EF5349B76F724D267B6D4821691B8C85DD98AE0E9086D68B8B6DBAC0000200049444154F7392B9B359EE18BA711B50678FCA3B3E513298D225EA3AA98EAA33594E2486DA4DE56006D376F20FAB74BC00CA676776FB097925D85F7DD0FA1E48D3BE3639DC901C463BEF640237F58B39F69E74DA12CC78B684BB16D8DE6605CFE912DDEB22960F0262A42A73EF371807ECDE7DE4A5D5102EFEB3F70B2E0FD9820883064ED6AA2BBA19EF643B5B41EDA43B0A39998E510D4B3F04DBE841953A75053988962C52485CD357E75B9CD326D3108A0933E8372BF24F7391A763D06A520BF89190E529D97C1758BE6D0118912B11546E4E79217F09091263CFF84E59FD07AF660695E9EDF7E845F3F53CBDE862EDAFB2CAA0B7C5C581360C9E812B23C2AF73CB785E125C31857293A4E856B8D82E928043C2A23F23339D2D2CD81CE8894171D9EA1519A019A1D27A807D872A49B977635B3F560BBBC0EC712024A82871DC7AB397815583CA78AAB2F98C8E2E923C8F40B8714D77641AC0A0E36761248F752989D8EF05314631DC760EBBE16BEFCA3BFB3A74E00AA978047A3A0C0436B530F936BCAF1EA0EEBB71C46248D8533555F5850A7A3CC9D52C6C76F399FB165B9684E08413B178E914290E927BF7B86755B9B133C66D7BC57344149912BD9879268A4B26D2A174DA36CEE646CAB9B473F3C47A637444A6508A0CFE4ED7FF3CFBEAD009A7898C8BDD3717A0FBEF99DBDC91E8A27137DDA17D1677EFD8C8F75260710F0F7D2BEA3FC6ED55E664E9BC6F05C3F36222FABD13C10A741444A8A50DF3B19509EFBCCF4C9087E273BABCC8BCAC8CB41318344FB7A659761FDCE5769DDB75DE6A84D5BA5BB700A199553993D711423F203A882B72C73D089A25F92EB3C485F4344D002A05DAEB385191502436EA150880F05548B2B674E666ECD08D23C0E8AE641D76C54D54155353445435555148F1745D3246DEE4047880DFB5B7962DD5E46E4A771DDF935F86361FADADB69ED8DCA2EC0CEBE10D1B8499AA4D7C1A4AA723C19693CB9763FF7AFDE8382CECCE1395C34A588E20C01C4AA2CEA7504159EDBD3CE11918EE81542FF0E695E83E23C0F13471673FD4593292D10A907054D17D7A6618B13D831E29A5F521185283F8E8EED68ACDB51CF2FEF7F81F53B3A89251C638A7333F9E42D0B58B76E3353C755929B13E0CF0FAF60446905078F76B3657FA7745911E3317B5219B75EB3800995E9B2482B24B762B6CE3F9EDBCFF7EF582E5DC1454A488E95D0B2967E648A2BC895B0191B7BF17C8AA78DC16B7771EF07E7BA1C68E9C69268837D8B2FC150049DDA80BDBD005A4413DB7F87F9C26752BBBB37DA4BC876E68C469FFB1DB4AACBCFFC7867708457EA5AB9FDC92D4C993C99B1E5B9600B912183B688C3A1DE1831C74D71BC267E4EB97098FCEC5BA5439D2AD87E2D408B55F1894D8D82F32C5AB223F4341DA271F716BAEBF6D1DFD986198B13F11760948EA7B2663C534795499DEFA43595E04BBBC2FB2ED739A9F12C53209610DE8F6346232E50C74D86A57BB9786215E755E4E3F778F16AC2EC5C14E73C58AA87A86899D73C78BC3EB27C6EBF8F4851689A2EB9CD5DFD11D27C06F959E9C4A3513AC32677FF63A3C4C7FD878E503A2C939EBE209565E518BE007F5DBF9FCE9E28ED7DA23A675193AF73F3F92319374CC710D1A7EE45511D59609346BE8E23CF251A5EFC690659997E0A72B264E1B02B6CF2B717B7B0EB40334BE74EE082699564FB5D5F402148D5DE17E3AF2B76F2C0333B38DA1EC60C45583CB59A6B2E9D8C19EC615CF570F61E6AA6BDBB4F6A880845BD9AD1C54482260D6D7D1869593CF8E44676EE6DA0345BE5EA8B26F39E25D518C2100295AE8108F54D21D7CFD23669E930B9EB9EA768EFB1510C0FAA68F2741C4CDB64FAB54BC91D534645468C1FBF678A0C2204A8CB89F934E28421804E0D30DE76004DAC8FC81FC7E1843B52BBC33701696DECCD180B7E80E2CB3DF3E3BDD5232410706B7317DF7F781DD5636B985153816345A4F75B8FA9B3BF3BCA80C08264D76182DE264EF5DAF76230A09EEA776FF6F354332027D412072937B9B42B7191C2845488FBF7D3DF7A94AEBABD341DDC4BFFE1EDA8964D9FAF0C5FF54C66CD9E4E41C070991882929028FEC512396801C43149B38BC94614272614EB6212B823668C9955C5DC346702E90298555532297AE236B58DDDEC6BEAA6A3A783886033E0E7BC9179CC9E54C1F8D21C1C3386A65A32BA56745D82BA652BFCE6C9EDFCF2B12D44C226A1984561A687F6EE7EF20259A4F93DEC12D29B9683660BD5B838178C49E7BA9925641BD0D21BA1B12344F5C86114A48928DEC1301CD23C017C5E3FBAD7405563A8DE00583E7EFFF87A7EFBD4767A223AB99E105FFDE022A90DA2AB22E7ACF26A6D3D9FFFF19352C449F8079A7D9DD23FF1875FBF16271EE7AE0737B06977036D7D21D90894E6D3A828CDE657FFF62172D2355EDEBC9FEFFEEA310EB79B92765791E3E1CF3FBD018FE2B22FA4988023FC5A84588A494CCBE2A7BF7E8615CFD7A2FAD3A4EEB86C22B2E3CCB9E922B2471631AB348D2F2E1AE9D6AC132DDEA781CF4382FD2962C5DB0FA001F3C52F10DFF6EB146FF18D7753F3C7632CFC316AF90567E5786FE9200952C5FEAE20B7DDF7121945C52C9B3D1EB19ED69D3803B68703BD269DE1B8949F74D31CC76546DFD2B9CEE9CE276769BB4C2C0B27D24FA4AB95D6FA031C78E93962A2E3D08181AC4A72269DCFA4AA0A728CA8044DDB52888BDC74425F437A0B8A42A088A00548C74C82824B2DF635C32C9B38822B678D93FC5FC39BC10BFBDAD9B6FF103B9B06B0550F5FB8763EB5879BF9FD632FB1647A15A1602F15A5657CE3C6C5F824B7212ED30C86A653D7D9CBF5DFF8131BFAF3DD82992AF2B842D75A41B15CAEB1A27951054D109B2C9FCA7BA79470C9B85C2CC7E2278F6E667B5D37238A037CEBCA69B23350D521EA78E8891B0C44A394E76530A2D027F59FEFF8DB36EE5EB193385ED2F520DFFDE4C55C37AF1255D41B1483675FADE77DDFFE078E6690E3B7B87EC978A6560F931A214FADDDC3777FBB12430F8010531257246889F10897CF2CE20B1FBD52A62A9E59BD8B67D71F60DB8166AC5090E7FFF0297C7A58E69B053B44B6DE3B269A62D03CA073F7FDEB79EE859D685E9F6B6D25D22D3ACCBAF142F287E773C58422AE99982781FDB58C9EB7F2880D45D0A98DD6DB12A0ED968D44FF3A3FB53B7CB3BD140D6DFC076467E1FF8A0CA9E3D012B6F8CEC3AFD01054B969D90C7CAA2DBBF484C1D7A13E9BC67ED159E882A0CB7375E3DC5389ECBFD92D9FFDDF2762A8D75D902B4729A237271624DCD7CDA1575FA153E876743711B675FAF3C65154319AF1E5B9D22F302E4D4F5D668654B4139C60F1FF42465476134609C5903A2023B20C2E9B3E8EAAE2610C381E1A431A773FB3815B2E9A21ADA57A3ABA593C71047D11879D8DADCC9E54CAD3AF1CE5570F3DCF17AF9FCFF431E514667BC80E783034C18080BB976FE44B7FDD03A23BCFCD35B86C05416770DCBCAC224D6F05B726CEF080CAF4AA42429110F5ADDDD2C75080FA4DB34B19579E83A378786CD3519ED9DE48576F3F534695F1A30FCD970982BFACDCCBFD2FEE46513C8C29F473DBA72E61628968A2B6B0149D47571FE1D33F7E12C3A392E977B8F38BEF964A79ABB61FE5BF1F7889C65EA18EA74A0307D934925CFE845BB962C9443E75CB52A90BFDCB7B5FE4D9B57BA460D4BDFF752DD5E57EC984110174D4B4E80AC568EF8E73CFC36BD9BCA71DF0C8274DA438E28E495A410653AF58486545161F983792F38609929DE05DBB63733ADB1040A7366A6F4B8076A2BD44EE2C962FC9D9DAA45FE13F3D17ED86D05114EE5ABD87DF3EBB9B1BDEBD88B18569AE9A9DEA70B4CF626F97852DB4A045482791396989727A2FC7D91AB3138F934487E3D1B46001C8FC66A2A941FC6D0F7433D0DE44DB9143741CD84647533D617F11C5131750555E449A139251B274E016AC0E91738E455D4F4091EEB063D803212AF3025CBB702A0579B96C6CECE7D57D8DCC1B3F8A8A4C1FC3F3540CD544D7BCA0EB688A28C6093A9A23B58E1D7C6C6D0B72DB9D4F307B42259FBD7C1A25D93E34D1E8A1298CBCF54E8EF4795144D14F4E8D3AB6E8469486B78A3403C8F55AE4A57B38DA19251277F0C50778F9E737317EC43039A1FCF1C1A7C9C9C8A4ADCBE468284E5B5F9CF5BBDB69EC1EE0BD8B27E25322747675525C94CBF4F1C3A92A2DA0625806861391DF73C8F6F0AB8737F18B07379395A6307FCA483EF1EE1AFA43369FFAC183B4C7BCF8155D3ABBCB967B4744FBEEFBA0C8E6C230D72D1DCDA50B26F2F8EA6DACDFDA40635B9C8F5D359E9B2F9B4C38D48BAA68D4350FF0AB7B56B17177379AD020571CD951292D212C074B8D3366CE04C6CF1ACD85938771F5E4323C89EFF474F3CFE2E843009DDA5BF8B6046862FD44EE9B81D35B97DA5DA6B097B1E40EF4B1B7C882D23F6D4B584889F33D53DBCCD7EE5DCD94A953B8625AB9FBD2290A4D0371767599B2502838BB6E249D781165DAE3FFC2969C284F4C75B8854301D222F8749D0944CA231E0B11E96EA3BD762B0D5B5EA63718225E3E93E155359467AB1822C72C0A81827E970468C1E410D1B465931EEDE58A3993995E3D9CFA5E93BBD6D63160C6F8D2BBA6333EDB83AAC4B00D1F2D41D8DB1AC2B21C72D374A657E592ED17AC62A86D37F9F9DF5F26689A7CF6B2192C9E301255B1D134856FFD65356B76B5CA0E4E51446CEE8DD36F09F70111559A8C2FF470D5DC115497E6F0F8EA5DB4F645195592C737DE3B8382AC34D9C5B7BD56687CF453DFD4C9E40923A9AA2C63CDCE467EF78FADACDFDDCCC4520F5FFFC845CC1A5342A6A1BB5443332A530AA27B7BC0D6F9E9FDAFF2BB27F690996673D1F44A3E73C56436EEAEE79BBF7A9A982F0F4D86CC82BFECE6FC45E94FA4617461D86B47397F723E5FBAF5121A3A82FCF1E1977875472B372CA9E05337CC23141E90CF577D5B88FFB96F1D1B7777A088204040BEFC3A8571818D2FCBC7AC4BE631615C3E57CD28676A71967419175CEAE3CCA2B71E280C01746AEFEDDB13A0AD28E6DAFF20BEF9F6D4EE3285BDD4E14BF12CB90325B32285BDCFD22E12C0C4C38E2C067EE6AE67E9B4FD7CEB86F9C2A44FE63E7B62B0BB3B4657C4CD4BBA4ED9C251E5E479DFB374656FF13083A3E7133FEABEBA6EC7A4B851D1FE2022512516A1B7E930F51B9E9352A5DD6923304AC75153964B8E1AC30E07654AC315438AC9885A44D0F198C3ACB2742E9F35994CAFCEC6A3BD3CB1AB93F29C00EF99594145BA435C0FB0BD23CAE35B8EB2E17037C2012B60C0F5F34673F5F44A8AD34D6268B40C44D975A495E2DC74E68F2997C0AD8A49B12F486B77580254534F88BFAED9C7939B3A08590A694E90DB6E59C0F5E757E1B1E334B5F7C9083A3F379D7C617FA5D832EAB41C3FE1688C50344AA6DF4B7ABA977E74BEF9EB95FCE1E97DCC199DC3AFBE7115A372546241A1BFE1E6828576B548A1F4391A3F7B600BBF7FAA1645A419EC5EFEF29D9B254FFA6B3F5F8EE9CD4195939F28584A5DA4E3E228B62639E68BA61570D9F96379F8B1F56C3B3C40C8D4B879E9703E76DD1CC2E101F9BD347646B9FBAFEB78695B23A801195523849644711087B2D165CCBA643ED3AA035C755E3185012F9A08D11DE1EE73EAEFFDCD1EA021807EB311727FFFF604682114D3B11D73D557B01BCFDC65458E84E6432B3F1F7DFEF750F3C6A7367A67B897CC5424F29CA2A9E19EF507B9EDA175DCFED9EBF1119536514243A1330207BA06E8347509CD2EA8FF5F02E8D40742AAE149FEACD0BDEAA3E7F00E5AF76CE1486337E1BCD1949416539D69E304071202492E408B3FC26F50B7A27CEDDDE7939F25E86C1E5E38D44B7D5F94778D2F6378A64654F1F2974D0DBC58D7475D579490A8AFCA79D0A130C3C3D4615E3EB264148B46E7E0185E9ED97A98C6EE20372E18C7B0805746FBBAE0AB25F8BDCDC118773CBD933B97EFA6330CDE583F5FB9FC3C3E71C514BC4E0455C0BAC03431F5D8AA6485C8158323920F02F1D5844E8650C8D0B873F9666EFBE32B1465194C1B53C2F0FC0025F9695417E530B3A6149F21F2DB1651C7E09E670EF0DDBFACC7A32A8C2EF6F1D5F7CEA2AC28979FFEE9399ED9D48C62A4498016AB2D194C8B71552C9C984D49B6C2973EB098EA11053CFAD4569E58B38F8E7E93EFDC3A8B0BA695108985E598C42216758D5D34754758B7AD83CDB58DF447DDA274667E3A3396CEA1645421EF9998CBBC113918AA822681F9CC566F43009DDA3BF3F60468716F560C6BEF03C45EFC3C986741E12E315EDA8865782E7B08297FF64FD8645CE922358783261FB86305172D5CC0D4522F51E1462DF29F8E4E437F84ED3D36A6941E15F969F1B9337B49FE09B7F7BA530872972CBA89175CB035BA9A69DFBF83BD9B36D1172823B3743863B31CD4900BD0A250285C524491301A0E316944011F9B7F1EB6E610D7023CBAB38DEEF000EF9F3D8A228FC38E1E2F5FFBDB469AE2DEC47798588ACB85878D1AECE6FD73CAF9C98DD3244DACB93FCEEA3D752C1C57C6D8C23C2C2D8E070F0396CD81B65E1E59BB9F075F3C446F30268969237254FEEDE625CC2C139E91A62BBBAA3A38BA9781709448D096CC88CC7C0F9982F121DCC565C940C1D1143A623A5FFDC5638CAA28E3506317ABB7D64BFD8B9A0283FFF8D8C54C2C4B9391B4781E9EDAD0C6277EB512C3F0936E585C3E65189FBB7EB1EC64FCCFBB5F606753D08D78E5F420645BC1107F625D7CE4DAF97CE8AAF93CB5660777FD6D3D2D9D31FAC2511EF88F2B28CBB23085238AE81CB44518E04E48ED418DBFAFAEE56F2B76A0FBD21933A38AE94B67E3D743BC6F5A09E38A3265FDC3ED527DEB698DC10FC31040A7F6F6BD7D015A3C96DDFB30577F15ABEEE9D4EE3695BD541D63CEB7D1A77F3995BDCF6C9F64114D3EF482F0A5F0F3E7F7F3E4C17E3E7ED144BC8897DBAD96472C83550D03F4C5F50407F5389BE3CC2EE2DC7C5ABEC26F44AA1691A688FC82DD52B3A3F6A517E85272F0978E605C868D1AEE77BDF912006D86C3A42B36EF5D348D490519E8C2895AF353DB0BF95E8551D9C291DB6175639C6F3DB593A0919158F24BF16A771345B4F0004B47F879E0B38B5D4686D7CF139BF731A62C9F29A5C3A400BEC8F3FFF685DDDCB97C2B755D71FC9ACE4D4B2671DEC85CB2BC3129A664C44258A2F8A829C46C833D473BD85FDF2AA14EFC1154C16105394C1C554E6E9AC7A51B8A31D1344251C8F07BD87CB49B6FFFE16536D7F6123006F8DA07E672C3B49128AA255923ABB7B7F3F1DB9FC624434E665FBF7936372D1A2BF3192B371DE16BB7FF9D889D8662884E53E12A13271EB1F9CA0D53F9F0B58BC8CBF0F2F3FBD7F0837BD6A0AB7EF4581F8FFCE47AD2957EF9ACB9591137FA562D15C7EBE381A777F1C747F7905590CFB21B17935F964D893FC2B5934B2913097CB90D01F4B9796B5E7FD4B735404BB3D19D77115BF38DB3A2CF911C1EC59B85EF63CDE75E482909D072D9EF46D107FB4C267DF3413EFFDE8B9855918F1D176DC72273EBE195A63EEA07043FD7EBE2CD6B10F0CC629A933F72A936AE9CECD3A7BA1E9183161E8B12396321826D0DD4AE5A415BD487BF78046302266AB84FFAFA49808E8650A261168DAB66E9A44ABC6234349BA0E6A3C14A6798DF4FA1164151636C6857F9FA937BE857B3130A80421759A4844491D24089F4F3AE9A4CEEF9D02C2C4DE795031D3CBFF520372F9DC884924C6C1191DAF0C9DF3FCF1F9FAB43F5A6737E75806F5D33839AC234D7762B16C7D04494ABD3692ABCBCF9203D7D034C9F3A0DD51790E90DBF1966C7BEFD7476754999D5CAA20C297A250B8D8A85D7B6E85302FC74F96EFEE71F9BC18C70EDEC32FEEB9645788C18B61263E7A13EBE79F77A763545E524FD891BE662F77630A2C0C3FCE9A379FAE5033CFB4A2D750D3DB2F53D274B61C6D891FCE7976FA0BEA59DBD871AD976B09BDF3DF2AA5C818C2B31F8E9672FC2AB4425033C6A6B0CC47421F62108D1F49A0A77DEBF922DFB06C82DCBE77D9F7D2FBAD5C3BCCA4CE6570D23CD487EA367BE721B8AA05383F8B737404B94B230577DF9AC35AEC8615375F471EFC758F84330A4B9CF39DA121CDB63045611BBA92CFBEFA7597FB8971B2F9AC19289A57884909088EC84087C5F9CCD4DBD0C38BE44EE53148A34B7927F963779C893A0EC1B46C6295C83CBE54E04B642FBBABF87FD2F3F4B634F8C404E29237C119C50A72CD2093124AF1D63E98431CCAD2AC650A2A86A3A8A1143D1FD2CAFED655B731F1F5F308A919982C29BC513B5ADFC62CD11BAE33E6CD18227625A278E27DAC7DC0A0F3FB8793195E996A4E1B53B5E8E76F533AE20409E5F45B7350EC72CAEFBE1636CAE07DD037346A4F3A1D963983ADC4FBA1694EEEA82DF7CA4B5875D473B28ABA8E6A117B7B2727B1D39E97E0C4F1AF54DED8C294EE3D6F72C24CF17A73CDB4B71769A8C5B35C5A47140E7377FDFCA63EBF69393E1E5E60BCFE3AAF963C8D2FBA51B8A62E95214E95057905F3DBA96155B9BB1AC00A61964E1A4726EB9741607F7ECE4F26553F1797C7875039FCFCB532BB7523DA18AA757EEE0378FBC420C956CC564D9CC6A6EBC6402697AD89DF01D8D577775F1DDDFAF268AA0D72968899E7D6F96C265D72C65D4A842E6566633AB220BBFD01E7DAD77CAE9D3A087687629BC276297B73F408BC59D705BD9F28BB3CA8B56BCD9E8D3BF843EF9936048F5DB73BA09CD037773787047335FFCE32AD233F3F8E0B249D4148BE5BA483A2385FCEB7A4DF6B485E8B184D3B72AA351B9B41E243F7A0EF0FAD8FD0FEAEC7ECB6372A2E7ADEB08120F0539B4FE799A3BFAF0650EA354741586BB880B3D0FD362644136174EAAA128DDC0706CB20C0B47881EE91E36368768337D2CAACC23D788E2D321AC66F08FBDDD3CB6BD9EFA3E9794A863727E652E9F583286C9C5E2FBB4A522DD4BFB1AA4FCE9F935C578B0112CE95575DDDCFC3311D10710A2C8AA196252B6C2B7AE9ACE84121DCD51A52A5E7BC8A6A12FC60B3B1A7878F52EAE5A3A93922C91065058B7E728AF6CDBCBF88A3CCE1F9DC794CA02A65697A2A971A9B35CD7EDF0ADBB9EA77DC0E413574E67D9B4110444641B15AB0BE15C28F44C5C9EF3DEC620BF7F62232B77F710313572FD0A8134132516E373EF5F2A0D6DD3FC5EE6CE3A8F7FFFDE9F30B27289C4140E37764BB1A425138BB866F1388AB314B7655EB1885906CB5F69E2F7CB6B31142D61E61BC7D162CC59369B050B27C962ED053585E407C4F3255B57DEF2F77DAA0F0C45D0A90DE53B02A0E33B7F4FFC95DBCE8EDBCAA07153B22A31E6DEE636B088A68773BDC93E0893EE98CA771FDBC8BDAB0FB06CE604AE59300AD556E58B2596E0160607BB0758DF2C981E82CD90C80ACA94897B91C9C0F75C01F5095A1C27199753A5375E0FD03656344CFDA697686CE9262D9045A13A801DEEC58E9B882EF7B4DC128A0B8B49D354B2149B1B2666CA8611A17571B027CA9A86089606534B73995F16C0ABEB4455832D2D415E3ADC230B6239693AD74C1FCEA83CD1AA0DA6EEE5F7ABF672DFF39BF8EA3573B9694E952B9FA9EAEC6AECE4DFEFDBC8CB7561FA2DB79839C21FE17B37CC65D230034D50E2148596A8CEFE8E28772CDF40477F9C4B678D61E7FE2384A336572F9AC6531B76B3B7AE91F74C2D614665010B278E24CD7079CB5DA6CE1D8F6F24666B7CF9FA79E47B5CFD6BD9491917290D211AE5DA5B39AA8F836D11BE73CF8B6CAFEFC134C554E29095A631AA3483E68E7EE98358599ECFD6DDF5D2E24AE83AA71BB0786201375D3C8EA24C1D251E952DE962C68AC40D1E79E930F7AE3C8221532F82561761FC946A165FBE80BC0C8D778FCA6074BED0E410359204B3E52CBD0343009DDA40BE2300DA1968C2AABD9FF8969FE384DA52BBF354F65214D482C918F3BF8F5ABEE88C2BD7A99C529AC83A50DB19E44F6BF6B2B539C284AA32A6541692A9DBB23025E0376239ECEB8AD21C84B6B045548ACF27D1F9383CBABD226717A64F06BEAF3D432AF9F04482072716A163F7461A1ADBF1682A39561F56A44F1609459EB6C75F424CCF92CC429F15E3474BCAA84C17195D13212BB5B3C3646D5D177E436771753E05191E46E606500D0F4121066483DF6790E773D00C95DA96309B8EB4D113B649F368BC6BCA084617F82523428826C5559DDD0D5DACAE6D6563FD00B190C9F85C87C5E38A18E613EC606121A5D218843DED26773CB15136B59C5796C3DA5D4770743F5FBB6E012B36EC62FDDEA35C33633853CBB35838A182748F8056240FFB6073377B1B7A8888D94541E689FB4C15331AA73C5767CED8620A33F4447D42E795DD0DD43674D3153668EE8971B0BE959E601F31D3E5410BE794CC4C3F63CA0BC84933C8F6D94CAAC8A6B2240BC7162C14C1F470B08496091ABBEAFBF9C3937B39DC1AC67234662CAC61EACCB10CCBF731BED0C792EA3CBC32684EEA20A6F2ADA6F2940F7512A6364AEF901487C4207380F8DA7F23BEFD2ED735E22C6E5AE5BB30E67F0F2567F4B90769D970E76A01B7854DBEBB7C078F6C6EE0F27913B9A0A648AAA3894D134A632874871D6A7B22ECEF8D1376C402DD7D890699AF9CC591383B873A06E62EC7102D16C269D8CBE1C30DC4234102F17EE2E120038E418FAF90605A29961648A4794CDE5D6071F3E41C0A3C31544DC1D0BC7446743635F7B07CDB61AA8665F3E98BA793A65B44E351F27C06217442A6437E513E7F7E7E27B58D1DDC306F1CB347E690EE111AA442AED32379CBE91E4D1AA58A16FC97F6B4D2D33640558E8D6345319C38A6307045A533AA53D71DE70FCF6F6757733F372F988A6599042351B2337D3CFDEA5EC2C120EF9A50C0B491F9CC195D86CF10B436712BAE13CAAA1D6DFCF0B19DB48685C1208445F389A331CC30B971C1486EBD681C9A1996E02A3C62510C229642E780C9C1967EDAFB061818084B100FF87CE465FB18939F85DF2B0AA371B90A911DE08A228D07C26614BFC783138F108ED9BCB8BD9FBFAEDC415A410157DE742139E90A63867958505940AE57979DED6E7AE30C12CE27796C8622E8D4DEA57744049DBC55A7EF08D1BFBD0BA7E7406A779FEA5E7A1A5AE5253292563286A7FAA9D3DB4FA639C432D835FCBCEFD5437CE58157C113E09B379DCF884C11BDB90C32B154B6559581B8C2FAC630077A84FB8AC877B8CB51D169265E4C378A3E45DAE3B5B98A37CB5DBCE95D25E0571EC7CD560FEE377B5DA4EDD878CC20FECE23D4D6EE271AECC71B0F4AFFBD1E239B604629713DC395B694DAC336B9D16E3E7A5E018BAB33F0383174CD902245225ABE6B631B475BDBB960D22899571D0845B87CD638F6B7B4F2FC8E064616A5130C4679EF828954E679F02B96549CD3FD016A5B43FC7DCD2E164FA96478718EF4F07BFED53AD22C8B09855E29D4A4C6632852AE53A725285AF11D7637F7F397976AC9C9CA627C45812C806DDEDF42381C65414D21D3CAFCCA875F6A0000200049444154D4146532B62C0F552810A1CB083A62DA3CB1B589FF79760F41D1FD27F929315735CF8C73614D163FF9E07CC9F397D90E6187620B7D0C370A8F0B072BD1D7628A5597A06288261221702464EAA2529343C4FB62D2198819BCB2A389FDF50D4C1F3B9AD1A5D982C7C18A4D4D6CACEF66CA82998C189EC398021FF347E54870D6456BBE6884392169F6A60F404A3B0C01744AC3F4CE28121EBF550767A099C8DD95A9DDFD5BD94BF3A0F80BD0465D25E549CFE9964031F19E09AD88DD1D41EE786E272FECEB65CEB8E15C3E6F1C99822B6B09BA9410CB51080B011A47A73B62B3BFBD8FDA6E8BB8E6435544AF9BCB99960D0909E0948BD6415A20C7EE47EC7AAC16741C4E8F81AC8BF927D94EFCE1A9922AF2F0426744008CA390AEC49990A7D077643FAB366C23DAD7836E866857B308665660EA4238CAA5A7C989C7B1B961B8CDD563D2C9D54CC92BD6849091F85B35888A3CAEAA60A4A511B5BCF4471D3C5E0D5553C9F4E86479E368B649567AA6E4302B9AC3917E87BB5EDCCF337B3AE9300DD20CB7655B48720A10152DDD3E254A45BACD6D978E47D38504A949D4D4D8D1D84F6B4F98E2D20AB6377473A4AD13D37298515DCEC8C2743A5B1A29CA30185F9EED1E5351082B69DCF55C2D2B76B611C64758E42824BFC3BD3F81BA996A844F2CA9E2BDF3CA5D0EB5E2A7BD3F427A204D4E2A829E18B54C99BD127C7291AF76A406B7C0F0B8D431C112A93085159B0EF3D8C626BAA37EE296894F084759114A0AB3587AF1F9A4E767621831DE35AE8011593E3C862205934EE66B79B69EFB21804E6D24DF511174F296C37764415C986D9E9BCDFFE9DE7356341CBC9014FA0CB26D4251A90B9A5CFAFDA7D8DB1163FEC4726E3C7F02E542F75D2C7E85672171745100D20CA923BDAEB18FFAEE103D118798EA939AC2C20249B6054B6C160B5797EA762CCE1D146527E3DF63B07B2C8F9DA05BC976E6C4F84ADEDDA920F9B5C0ADCADCB1BC3347654C86C38C620F3BB7EEE4E9B55B88F77649879596CCD144FD0538F2DE124D2662668846B9E7DD65142903EE1D081B2BAF079F306E151D78BAA01F0A4710074315943701B6A02B068E6A6328BA04660C1D5DD389695E7EFCEC3E7EBBA681A8A6BB4A4A22272CD6F6B2A53E21391A47D2F41EFCF044F2552104EB8AFD47F1B0E7681F754D1D8C18399CF4DC6C29AFDAD3D24A5D7B3799012F3347E6C922A5AB8C67D318D4F9C6BD6BD9DBEF47F3A4C973298EF826458DC1062BCEE4020FFFEF9A198CCAB5D17583C35D2A3F796015F9F9994CAB1AC6F8E24C86650A8EB7489988DCB9473E070290AD81303ED5D5CF8E2906CBB7B670DFAA8344A30AC2E550083269AAC9D20B6670C1D29968911E46E76BCCAF2A244D17CE07EE126D08A0CF0D7EBC95A3BE23013ABEED37986BBE7A56DCBF4F36985AF9628CA5BF41C9283FEBCD2C2766FA5C80164B5E1109FF78C50EFE7B85D054B09834A6882F5C3D9780EA6A31A8426847A2AAE0442B44342FDDD138477B821CEA8AD2167288383A9668C490FA0D83531183EE72702A24991E49C2EF2007E7E3B44037BF795CBC6910501FB3FF4E08F9C8E388285E38975AE4191A17946A940614D6ACDFC1332FBD2AC5FC4504DA523417E704654121D0A3A0C5C3FCED8A5274332A2DAD36B705D9D212625A4511938BBC147A44BC2D96F526AA21C0589334324DF5A0796C74250D29DA6608FB409D305EBEF5C45EEEDBD28EA28B494380931B891E97DE76530B7A2CC27D375452E2890B0F1239430989D2B8E1A52B14A7F650832C3C8AF1280C2894161753989381CF11EC89648C6C115132F8FB9666EE5F7B884E4B70B53D9229A1D9624524581C312695A6F3B9774F664C81876D47BAF8CBCA5DBC7A6440AAFC79549B456372B9EDFAA99236D71F5359B7A785BD4DFDB4076DB29508375E38950C8F28FEA9BC54DBC3EF9FDD4D5F5095FA2E79393E162D9ECC94A955F8D52863727D4C2DCF255DF88539A2BE212E36B9DA7A2B7092FABE4311746A63F58E0468612E2B5C57ACA32F20F2D2677D13BCE3A219E8D3BF22859594AC9167FD1489B0D1D581932FB72515CE1EDF58C7832FEFA739AC525494CF799545E405340A33D3F07B451E5380AF800F055B1380ACD21D3269E9138A78367D518B7E11652584E8E57906119B4F88AA05409F84AF775CA73D11469F346F9DA0FC258491E4491272CAEE2464519CA631BF340D3D1E65C5CB5B7876CD3ACC8101C29E2C7A8AA6268A820298937DE3AAA03AF0E9C9B9E4F80DEA7BC2BCD2D0CBBE9E18C3FC1E2616A5B16C7436E3730C8A7D22B72CF2B57EBA438E144DB2359B989A260B80938B3DA4193AAAE6E53F56ECE7771B9A712495528094183F916A107F89EB762DA14A7D0EBF7E572901CD211A17CD1E96648EC8A2AE2AF8E85E4C61AF251CC0FD0A9A484158368EAA21F487064261390C1E7F169B5B4DEE5973504E9E8E88DC45FED889E3885CB4580D1065CAF04CC60F2F62F5F6831C6A17FB098A1F98164C2A54F8DDAD33885926AF1EEEE1CE277772B0DDC4527D646A11DE3DAB9205E3F2C9F2C0C6035DFC6D733326E9548ECC64D6CC7154550C23DB30A9CED1A9CA4F27DD10ADF762B5F6BA769473F26C0F01746AC3FACE046871EF5614C18F16407DCE3691DFADB9C12D1EA6159C3D86C7A0303A19C8897CA8284E25E3B0B547BAF9DC9FD7B1B7A51F5F9A972BE78E65D6E852B2035E3CAA852D8A44B2582872D4C95672C1A5D6B045AAE384944432E9EDE61D9331B004E76301F16BA87BAF1BD4443130E1EC21AF3BA1017DBCC894B0EB1201AE9B00478D3BF25A1F79660D2B5F5E4FD849235A301AD3275AB593A98D44449B3CA7084745514C74094AB1204935702B66A14EBEB47024378ECD96D6547511953FBF7A941DAD3199EEE9366D0CC7E2F6EBA67181D087F6387CEFF97DFC6A6D2B66427848E6BCDD3CD0B19C304E0CC30AF3AD459514A42B1C68EA40B51DE65764135005DF435C86681CB2E404105704DF5A90EF2CDA6206AF369AACDFD784C7D018969FCBB3DBEAE9890B0EBB2601DD4D1CB94C0D4D5A6AB98029FE3BD68494982CC43EA3B21C7EFD91D972E2F8C3CAFD3CB4B10D5BF54A9689E81ED4E241AA720DC60ECF278443766139E3C6955298E3274B8B5396E3A7BA2040814CBDB88EEC82F5214B828E98E8CFDEE37CB2F76F08A05343A5772E408BF7B57E25B1A7DF7F760C664F319E4A7A09DAE86BD0C77FD0A5E1C997FCEC6EC7F2C489B484789D43A6C5AA836DFC7D733D2FEC6E2564AB8CA8C863D2F062C616E75051E095CD0AB2FC2F8B72E2D51B649825C133F912BA12A0C9A8DDFD3B193D275CA6A573B72B24F446EFAE5BB4728125A91572D29AA23CBD0B82966D72EFDF9EE5C557B713CDAA20965526B5AF4FD85E97E23E36750DAA6A0A7B9A7E3E35B3840F4CCAC2346D9E3C12E4AEF54DB4C404854E3ACBCA22E5C46C9B5BE7D7505D94C15D6B0FF0D8AEDE04C73C419191E74B8C91046B1182C7A9CED2C9F4281CEDE8265DD3B86E5C0E73CBBDA489DCBE6AB85DE58A22036FDD8EC963ACAA1BE0DE2DFD34F40BB08DA31BC2515C914D311298ED845C68623674D34F8A9B6E11558664DA494CB4D24B50919CEE5B6697E231749EDBD9C6B6237D325217CB2D2B1E45D72C0A32BD9C377638D3A68EA17098900A35199EA95095EBA338C38F5F7F2DBFF95851E1EC3EC02739DA1040A736C4EF688076822DC437FC80F8EE3F21D21EE76C33D2D14AE7635CF04B372FFD4FD844E55ED0ED9AFAA3BC72A89D5F3EB7978DF59D6478BC9415E673D99C6ACAF3B2C8F31B3267E936C02473ACAFAFD00F8A9BDDC0F5358A652E5E253C0693E09EC88D1C67D489A324402D21D2EF8275721B4CBB3B9EB7B66C9BDFDEF70F5EAE6DC4CCAF266E641D97C23BF6E1C1087D62A63ED147E99E2432C08D130BF8C49C323AFA42FC6A7D13AB1A22C445FA22999B7104788629CF36C8494BA3AE2B4297C0D2E48A4102B2E0AF25E7AC44342DA9273109D46267BFE2704985C10D13F3C822445B44677D53AF34899D9067303ADF900C9A27F60EF0A76DFD745BE2DF9614E777437E573A5644FA72D844ADE1585F51621CA59F43625A4C5C9334E1722C32B430AA6A108C2239CD8E6D636830B22C8BCA91C58CAE2CA6B424879C804A40B1284833985C964196474BF262FED708F343009D1A48BCA3015A1A69069BB00EFC9DF8965FE2F49D3D8BACD70DAF28CE154E43CD1D833EF5F328E75CF43F69122AA854710EB60DD0D617A1351467435D072B763648C3509FE1252DDDCBB0EC348A7202146405282BC8425745AE34017449C3D1632965F7D8B2A162502419883631A3F1E7F8E35D3C31EA77123864C4EC724D8E83B350AB4BFC549CE38446C6041089F1932C0C79009BE756ADA525A262F9B2254809B6810BED8949258995493A59E2E7C9CE4B37E214A4064B6A550CCFD088991607FB1DFAE309EC4D9C4B90142CC1F1156A88526E5314C404748AF4C2F1CECBE48426D4E9A45D97B85E995E71ADA544AE789861511550284C536818B0D8D32BEA9FC262CB6464965772940FF798D4851462028005BF5D887927274BD16E243D055D435A29C1EA0EEAB1BFE5E429CF271644E25BB1F0192AB99959E4650618599E4F69491E693E8F6C7F0F786DF2B2FC146779A54468815FC3A722E975018FB04E73574567E288921ABC9C7AAF21804E6D04DFD9009D1C837898F8E69F13DFFCDF08C3D973BAA9064A7A29FAE48FA14F3D87F9EF647E22F1A225B156D83BF5454C56EE6FE7E57D4DBC7AB0833D4D4182111BC3D0D07D3A395969927D20013A918E108713AD2D2E68BB9B649008A8B51D2EF0EFE08B590F5365EF256CE92CEDBA936E2B4D5E45F233C9683919272763E7C1491141B2139B889F05DB4D80A3E5C4B96C5A19934797A32B22FF291201EE5E492A4572A290E792AA6BC92B4C80996B9AE2325964938F9B6291FA2512DC0400BB91B1C8F10A3D1301B871D13822D3406E94ECA6710605CFC9F191054357E3C2E594BB1387885A85B9AA6EBBCC0E29572A24525553E0289663B8632C9833096D8D586212702738C16116809FE430278E993C76C22DE518688B2F58B1C8C90E503AAC8874BF419A17B94AD245D38F62519CA35390E1931D94E9BA60B124925B623C4E103C7AB384D5B97B5386003AB5B1FDD70068F9D2DA44EF9F8DDDBE3DB59139C3BD04481BE7FF04ADF232295F7AB6373766158821F29DE2E5B66405DEC56B0122AA9070A7251C67D59E4656ED6E626FF3004D5DFD0C44E238B228E482B0CC838A3A9BEA46A14923EE2408E66B7DFC34EF4EE67977CA1F0985B5C7C3F3F88F9E0F21F806F2B3C97487B48B7217EF026865DC294E25FF08817B910756E4D25FF8FF698235615B7CE0C209D494E5488A9CD09493544089D1C7F3A4121A251E27D20F12705C6790E426582BF26A1202F92E8F595C872D8B80627F01D0925F2D8B716E87A2EB66ED46ED525AFF58E2DC1D4B39A5481D6B710DEED8B9B9E204584BE016002D605A3407895A847B9D72A2905720181F6EB47CFC04AA7B4F897B914D408955CBF1C9CFDD475CA725CF6B4BA716C7114A243601CD20434CBC3E4DF2AD856FA084643131C9F11F5C5F48145C4FD08C3D6995E06C3FB2271C6F08A0531BDE7F1D8016E9436134BBE72F38C1E604952AB5413AEDBD743F5AD565E8533E235BC4153DE04A979E35A10C1798DC629B28048AB84E808D6B3C2A5F4CA1D0868268DBE989DA74F447E80D9928826A702CA79C04D004208ACF5911887693D6B38BC2DD3F23D0B951024372B38D4CBAC67E9C9E9A8FA37A335165C12B015C09F84970014EB8DD2458BBD8EB829EAA3804445E54152C08F77E04582663E82458CADF25532E890B3996914844FEC7FCC513FF76FF72514F46D072C044A12DB9424870B49379F564149E484027825E773293BF4BD8DF0E5A7D24AF4174F3090075F984EEA4E0AE5092D1BDDBAA2E521C6E047EEC72DC887FD00FA4A8913CDF71F094BF561DA9E1E15515C95B1634BF0C8F815F97EE88C70EE84273227F7D02FEBEBE187CDACFF7197C7008A0531BBC7F298096AF8E1924F6C40DD80D2F9EB34696930DBD225C98ABDF835E733D4A76154A7A596ADFD05BD86B70F34812CC8EBD9BC9B6EE24C56E70C13E991F112F756C00A7FF28D6E127A4F8D49B6D6AC95C8C853F411D2678CB2772AA8F058A83EB7BAF39E071B878839D5E7B11830027195F9F78EF83412D71DC934C8A278B1B8F657812BF749B24075DDBF165CA2016CCB1B03771A583417070C224F9EBD74A779EB84F72184FBCEDE43113CC9CC4BCE3AE33DCEB9314C91312FEC78BC1C99F9FCBEEC0377B5606FF7E08A0531BAD7F39809620DD7F14F385CF611D7E32B5513A8B7B295278E95234D1E4925DFD4F310348468D6E92F5D8EBFCBABB72C21DC477FD1167DF23D8ED5B53BB6B45C558F07DF4C99F76696C12CF12803128FA3BE5C14EB9BA3E19609FC9523CC5E3BDD16E8327A093D8CAA43EC5B8D3CAB1FD4F2264754286E558642C47F778F35062F5343861F2465F9ADB8872266398DA2391CA5E43009DCA28BD83E44653BBDDC45EA230D3B08AE8DF2F3FEBD2A4295D87607C94CC412D5B885A3453B23F8410D3B9DA8E4764C948EDC497546868DBCDEBB18FBE407CE7DD6F7965A18DBA127DEE7FA266559EF5F4CDC9A3C8D31DA9D742E85906AB5321742A1E6129CE1F8366D8B33B34A73BA4A7F9B921804E6DE0FE252368198744BAB0F63D2C41C9AA7B4A0AF4FCD337CD8B923902357F028A2FD73DBDC85B8FBD113577EC391364B2F63D84D3B91327DCE946BCE14EECF66D38FDF5098EEF5B1C094F065AE902B45157A38DBE4EB62E27530F291D2965704AE968A9EF94F2798FEF783C33742A707F83387A505A69F05E838F3438F374F21B1994BE4970CEFFAF44C5A90FFC90607FAA63F52F0BD02E3259523BDADCF853ACFD8F9C5567F054BF80D7EDA7EAAEBE477A99747351726BE41F35BBF2F40C6CC53DF61DC16EDF21EFD56ED980DDB60527DC7ED69B770473C5B3E47F50472C3BEDDB1FFAE0BFC6080C45D0A97DCFFFDA002D41DA96AC8ED88A0FB985C3FF2B9BD075105AC8423E53F7CBBFD5FC4912B41105C761534E79A52212B69BD7E2F4D563F71C74279E7848AE1284F38C6BB1716E3625B302DF07F79E9B830F1DF51D330243009DDA573904D089718ABFFA23E21B7F8213EB4B6DE4FE37F63AE696224AF66FA0F9215B82651FE03905E3530D81EFD6032819679FA5F2BF31E443E73C37233004D0A98DEB1040BF669CE23BEE26FEF23771A23DA98DE0D05EAF1F01D5409F702BC6C21F82E61B1AA1A11178DD080C01746A0FC510409F649CEC96F5C41E7D979B0E18DA4E6B04145F0EFA8CAFA24FFC1818C2B6EA9FBF59B643DC168D1DAA94003D934D3492C4E289261551CBD514A96732B49DDE080C01746AE33604D0271B27A125BDE107D81D3BB17BF6E3F4EC97EDC843DB5B1B0125AB1263C10FD0AA2E3FF6C14387EBC98AB69ED095F86647D5F38713C82B427B0340EC0BC739DA1922337494EC78171E3B422866138C5964FB7514C34B9BA78C3E238FD2FFDFDE79874759657FFC3BBD646632994C7A01124A48082194109080D2150404042C14CBEAAA587077ADBBBABA826B57102B82B00A48D31510842010405A2091165A422009E965D22799F27BEE1D3229A4CC40767F3BCEB9CFC31F64EEFBBEF77ECEE4FBDE9C7BCEB9DE4AE855D2361FCBC2B8AF96D5A0C4500DAFFA0278D7E5C164AA4769553D98E8B32066AD4202B15C8962893F2A255A786A5408D0CADB15EDBCB25A949596C2B7F68AFDD9F54229AA852A54893D11E4EB05AD87C491E871FEE2C92BAD41655909BC4C8590F0D2A6B65629D2A0D623005DFD34908AED074CF2CFCE67E6C2B3361712763C582BAD9E9D1A2E54A256A28140AE81BF56CED3C83B3B7C9A04BAA36FBDED7312E8F638996A60CEDA03D3E185B0E4273B46947A351290282119F81788E35EE43FAB335B7170E90BF0339CB295D874B05D89B80FEA4193D12F4405590BC13199ADC828A8C4F9F42C18D20EA07BE15E04D4654165A96876F71AA102E9CABEC854F482266A38A68CECDFE6D37F39958FA28C53C0A523E85A9386D09AF3FCF4F096AD4AA842A6220279F2AE30870CC49851B7C0DBD3A3CDFBAE4ABA0C8F946F106DD867EF532354C220D1A350160CF49D8C4923A2F98ABFA3565A69C4D65D87E075612B826B2F4261A9B65F522809C0C9C049881E320203BA6979E53BD6D8BB65C7D2D711547A1C326BEB61A546811CE5622D0CF24094EAA2A1098F41CFB01084F9A9788A7967351268C748924077C4C96AE6F53B4C47DEB41D9FF51F8C80E86828AEF4B940E10D51C47D1047CD83C03B920F3DCF6084E4E33110189D731D6DF2BA1FE74326E391E18108F751345BCD5DB86AC06F4989D067EF4158D549A8CCED6FF2D60AE4C8D4F483E8AE45181C76EDD4962660734B6B70F8EB7FA24BED3904D56640CC0AF577D0D8AA334F1A8A8C417FC290C1B1F0F7644767356F6C85FFF9F65398716201D4E6EB2B2AB2B322777A4EC1A8079E819F57DB22DF70D7E2A2221CFEFA6D0C2EDFD5E2741C7698B70807D4637038F47E4C1E188CF8300DBFACB0A20E82256321ACED78239C15912A11FBE0AA220CF921A33164D46884FAA83B42E1F0E724D08EA12281768093B5B694AFA0CDA757C29CFEC38D257338F09CDF4B17A1361CA2B89720EA320602A5AF7D5A978A6AA0F97C9CD302BDD1EB7EFCAABD1DB3E2FC30BAB797DDD551536F41C6A144089396426FBCCA8BE13BD2D89FF04B23BFC0D8984024F4D4DAFDD317F3CA71E8781AC61C7E1A925656CC1DDD3B4D198B63114F60FAAD7D10A86DEE42C929356243E231CC38FD17C82CAD1F1E512AF2C6D6B88F317B4418BC942D4E9469F27096CC62C8BA00C3F2475A157B765CD651D52DD8E03517A3FA06E2DEC17EFCEA1BE1CF84BA48E2879CB8673068F8ADD028DA1E57477C9A7E4E02ED182D1268C738D9925A6A8AF83FD389CF613EBD0230B7EEC773F496BFB77E028907C403FFCCB30979981D3F84B5B1B5148862B10F1235139121EBD92E0A83480B9354831903FD3026D226D0C51546ECDAB50FFD2E7E05EFF2F3CD56917BD4E391EC3194FB724D1041CC4E3C178830B16C3D226A4FA15628C7AB418BE1A5D5E0EE81BE18D855836DC7B3E199BC0CFE4547A133E6DAC7735AD10FEC7E9542352FEBDA508E55663522ACF63CA694ADB6F735438412890F4E77BB0FA3A7CD8246D1180A995D5A8B4D89C7703717689B7B81CD3B47DA0509153BF9FF59E1A3D7821743E71F88BF4DECDAA6CF9DFDD2AEFD2111779E64AE232B7E55DDC67DCA31D547B82BA641A0D77BCDC56DD101981DEFDFAA40B7E42FB318799D0FEFFA224C2B5D05B5A571A57D41D51FFB42E6213CA217EE8ABDF9B20424D08EFDF693403BC6A9792F530D2C3907507FE0A5FF5A7DE91B19E67FF31A61403C24C31642E837B0CD14F596029D2F0904735F9C91F7ED70A8CC8FFADCF850F4F453C26CB62231E512EAF6AFC42D255B9A89F3173ECFE2A22C02CCB7CB1ADB57948A84A8B758A1AC37A0A7F10C2697ADC622FFB721947BE0AE583D8234429CDDBB0D83339743632AB18FA54E20E52F90ED9E77D9CF6254B033A57855552B826AD331B5601982EB9A9F1C5F2CF5C78E5BBEC41F4704DA45B635813EA388C125594F4C285B6F7FE62B811FC1ACF6C5A3C383B8CFBDB57631BF0A9BBFDF8CB957DFE61F3386CCE73EA2FC67EE5B7654A09BF2679B89CCBDCF8ECE62FB03D1352978A8E843FBE3D94A7AA9DF8BB8AAE983CF67F7EAD05E1D752081EE8890ED731268C738B5DA8B1519321D5E04135F4DDB0E0875AF2600441288639FE22B6781EC7A9F6E531E6D09F4798F180C0BF744400BB740D36BBBFB2810EEABE41B55ECC081CFD6ECC4942B1F40672EB2773309C4F86BE0125489D43C9A22CC478101A16AF86924A8309A7128C380ABA5B5A8AFAD42B54506854C8229B17AD4D75643B3E72D44571EB66F5E32713EE431025BB577A346A4844A2A420F3F056EEFE3CD43EC58D8DD85DC4A9C3B9284D1856B115A77C93E0EF67278ABC797B86B803F6E8BF0E23F6F4BA0D3E47D31D1B0DEBEAADEE639153BB49331384C87C76E0B6A35A263E5AE73084E5E82D8AA5FED02ED61A9C0AD3721D07D823C302AC20B4595F53C9C30EBEC09DC9BF697662FBF75BA0770C0E356AC7A38FAA6A33A48A01D530A1268C738B5D9CB5A990373DAB7305FDEC153C6D941B53CB5FAF7DC58BD105D044F4117068F80B8EF23FC40828E5A7B02FDCCA860C4863AB609F5536A1EAAF72EC7C8E20D4D56BB32EC578FC216ED0C683C9898DBC4B4A79FA2D9B0982F78EB89627E502C2B783F2E4A07D1A58350EE5F0C7DDD55DE97B91AD8EA7699FE2928140A84EAE4981AAB474F7F8F66F1D4CCDD71E862092EEF5A8DA1F91BEC1B94B54205FE11F43EC24303F05042203FE5A42D81FE453D01B71B3622CC6873D3303FF412FF9720D387E0A9512108D2367713B150BDE5EB133137E79F3C72833DEBDFDA7BA033156278C5CE1B5E410F09D360F6107F782A6CA7FFD4E45F42D6E78F416F2AB0F3DBAF1A8DEFBDEEC59B3322E1EFD976986247DF037EFF9A1AAC5A95823F3E7694775FBD7A14A64FEB0589A4737CDC8E8CC115FA904077A2952CC5A7613EBB9657C863F530D80AFB77D54452B05A1BAC0E8864E45208A48E096A0383CE12E867971DC0F3597F6AB69197A28CC78F5E335129F7C313B705A37F68EBEE8186B1B07866A3C9761C57F5B67721485E6B375595508D0FFDFF863C712017F0FBE3FDDB4C74A93359F06372367CF6BD8DA88A43EC5447D40964F8D26701323CA23131468FA9B13EC829BBDE07CD5E02ABF44F20BE722FC618FE0D0F8B2DBAE5B06A3836783F88F89E7AFC2121D03E2E16FBFCD1D6B318F9DB2BE85297CE7F7E5C19CF5F4A432B7F41424562A7097459411E5296BF8A986A9B80B296AA8CC35ADD83981C1F8E097DBD6FEAAB4D02ED183E1268C73839D58B9D7BC80A2F99CEFC0B5656AC88152A72F126F0898128E4560883D9BF040824ED0B606BD36D4FA01F1A16803E81CDC3CB989B4229634761358FBFFDE0D335989BFB8EFD116CC5FB8DF7A348560E45989F075E696783ADE5B8AE9619B940EBD236DA3FCA90F5C227BE7F419D508E3BFA78DBA320DA32E1EED3F928DFB302830A37436EA9814920C166ED0CECD38C45422F3DEE89F3454955FD759B844CA057FA3C8900731EA6172D47B031833FC220F2C23BFE6FA0778F103C39B2B1A6C9A5A26AACDBB20F0F5DFA2B77C5B0D573A27A029234E331CEF0038675A24057E667E1DCB23FA39BF1827DDA49EAB1F8413B0B63FB0674C8A4A3AF3B097447846C9F93403BC6C9F95EA66A58F28EF2D29E96AB0760C9DE0FABB1D4F9FBFC3F5F2150FA4018780B449173210ABDEDA66A6BB414E832910E3F7B4EC119652C220294D0B5082D1388C4080BF641BFAE5ECD328D535614000018B149444154E27E78F7650C2FDF6627C3922B56EA1FC329457FCC1FC9E27E3D1DA6969653C105BADB95CDF66B0EA846F28D37AB58863BFB7A63DA80C650C1D66E7CEC5219D2776F40FC956FA0B294DBE29055A3B0D96B167A87EA704F9C1F3F65A66514071768DFA721170B3035FF0B44571E811066B0B8EAF55EF36089BA1D4F8DE96A7FE47707B3E0F9EB12C41912F9CF7224A1D8A09B831C59379B4097778E8B83B96E8A2F9F43EDD70F43696974D7ADD13D8C43AA044C1BE08F293719C94102EDD8579404DA314E37DECB6C84B5221B564306ACA61AA09E09F76198D3BE81B5AE79B6DB8D3FA4F3AE64BE65E657E6E54CE53AB0D03996B2CD6A3D4374737EC79602CD36F58AC5BE2817B15864C1751B4F15224F9CF31D8DA8F8040CEEEEC5A331583BB8682E7AD59EB44F3A57128CF5BAB9B828EB85A5F745D8FDA88E50399651C2053A2A7FBBBDFB6A2E44C3E1AD9261D6205F0C096F5FF02F1454E3D09EBDB8E5EC07D09A8AF849E1A714B158A97F027EDE6ADC3FD81F5AA5A855815EE5FB34A2BAE8A02E3A8D11E73FE469DBEC2F824BB21ED81FFE38C60E1F80C86B7F59FCB8760D62CE7DC1639FD9EA394935063B3577422E93624CE9460C2EDD71C32E0E1631323652875A9305E72FE5A14FD60674496FF4F15F968563ADEE21E44842F0F74961E8EEDBDCB7EF08EBA67D48A01D234602ED18A7CEEBC5E2A98D06580D9760C93F064BD62E5872F6DB4F37E9BC07397727A1771F08BB8E85387236A0F4B3F997859DBB61E36CA2044FDCD04E87A8CF38CC880B828FDA369E33AF4F84BFC9B6A1C7DA39791FB0641626D45FCEE905A5B49D52AC2DB01CB958CC05BA6FE1CFF64F3EF57D1E698A6874F5566076BC1F7AF9B75FEC29D760C44F49BF21E1B7D7A0AFCBE5029B268FC6329F67E0A154F2CDB7602F699B023D2E360825A5E5884A7E13BDAA52F969E02C1264B7D714486F9983E9037CF90A3CFBCBC7A1CA39C237130BC57EDCCF9D270902D34AB6613AA0D8B9303BF617CC2ECD44B048120F99107E0A337415E98828DE037FE365EEAE6968EB74F370C86338EA0552AC7CB0F74D178A228176ECF79304DA314EFF815E565B46A2B90E96A2933067ED8535FF082C45A7612DCFFC0F3CAFC52DD90100BEFD210A1D0551F72910A8436C2BE4FF6079506705BA214E57DA7D08EE8BF747E0B588868BAF8D6D165EC7123E98406749BBE18B3911372DD05FEBE723C5231E11FE4ACC19128010DDF5A9DB4D695E2EAEC59EA443B8E5D45BD0D5E7F31574B2C72D60A22653D8043A54276B53A06FEF1F0C9D4288EC7D9B303A7BD9B5CD4F014E7A0CC2B1FE2FE39E41BEA8349AA15AF3006425369FF0554908DEF37F0D66910C7E0A2B4614AE775AA0D98B84F9CB994B8635E6E967BE6D96D8C35E020D8D25F92CD7CFC709C54048C5222C9F1771D3DF4F1268C71092403BC6E9BFDACB929D0473DE11A0240D968254582AB23AE5F942EF4808BC7A40DCE76108030677CA3D9DB9494B812E11EBF1A3E74C1CF318C2DD1B2D4BF188AC661E151115AAC37D83FDECA15D4717DD8BF0DAB3F647174802C0B2E6CECB23F1F99CDE4E097472BA6D05DDA7A07105CDA222767A4E4254A00AF386FA77185296965B8594DD3F63C8C54FE0692AE1598B873D12B0D16B36E44A0FDC1FEFD7A1402774F7C4F25FCEE3FE944721BF56F8E8A4A23FD687FE19B3E2FC915F548ABE7B16C0BBC656092F4BDA15EFF8FF036291087E4A0B12F29D17E8B66CC75E306C0ECC05C53228F7AAC6E1B07A38CC120FF8AA25786B5AB833666FB52F09B4630849A01DE344BD3A81409B511CCA18EED36C88C16DF9A861DD3D798C7443C9CBED6F3D83B8AAA4C6151E8458A17F12BF29073ABD823E9D5DCE053A3C6B8BFD7E29CAC158E3FD07E8759EB82FDE0FD141ED47AC24A515A264CF2A0CCAFF9EC7263337C05AEF87705439147E1A195F41EB55E27657D07744EB702ABB02A1DFDC09519D2DDCEEA2AC37BED1FF1152AD2F220DBF6254EE2AEE7FB66D428EC446DD3C0CECA286B7CC0C6DCAD74EAFA0596A3AF3F3570B9B47CFE48B0371411E89C3AA04B0841DC63D4023C59CA1FEFCA5D51965B049A01DFB852281768C13F5EA04029D1507FDF5E20F31A96855B311FDDBEB1EEC538DC6C773FB3AB58266892B55DBDE85FE6C63981D8B8EF8C0FF555EE3994560C475B355836BADD59BADD872F40A3CF7BD87E8CA8360AB7EA350CE57B7F9E2009EE4C256D09E8AB63709998B8309342B075AFCDE4428ABF3F8A3988FF827ED349C500EC2F4929588AD3EC4EFCFE2AC3FF17D0E59CA081E8FAC1699519FF485D302CD7CFC3F6A67F2BA254D1BAB3362821816A188676E0678CA3073A02F58B6617B35B99DF98A90403B468B04DA314ED4AB1308749640BFFDAF5D9891B1101A73E3B164D9D2AED8EC390393A6DC81E890B605B5E534AAEBCC28D9BE14D263DF72DF2B6B4C0057E8E7E38A672C26F5F7E31989AD3596EE7D2EB71267F6ED40F485E57C839035B6C1F762D0A75CE00677D370F70C7B4E6B61762C8AA341A059ADEB759F2DC6C8ABABB86B87B919CEC9A2902E8F405CD53EF8D6DBEE9FAA1CC4135C82F52A5E08E972BE01757B9D17E8A6B538FC3552BE19DAB4DE365B392BA54244F87BA0A7BF1252AA07DD09BF05CEDD8204DA395ED4FB26087496406F3C9809E9C12F704B5963681C1BD679791476F57E112F4CEEDDE64AAFCA68464A463182F54A74F5B1B92E4EEFDE02D9FE8FA1ABB7657EB2CD33B6E1B8CEFB21C4F48FC1CCC18DD97C4DA75F60A8C5FE7D071172F22B84D5A4D937D65826E28BC19FF00DB53B63BC79F5B7B652BD5B0AF4A24DA770D7E917E057DF18A5D2F4994CB417F9BF89324530CF729C31D0173B4FE4DEB440B74CF5BE09333B7429ADA01DC244892A8E61A25E9D41A0B3043AB7AC16ABD76DC1AC9C0FA1B0366669B24DADCFFC5F44BFB8384C1A1074DD908FA697E0646631B417B6C210311953E242789D8CCD072F40BF67217AD69CB48B2CF323335FB479E8C3B863D8F5C58158AAF885F3E9C8FFE96344180E354B3B672E8355FAC7D14527E7197751811E0E0BF496947C54EEFD0A634B1A63909B4E8455EAFBD4F72F50AB5578747820BFF78EDFDC53A0338FE663D93BC770BE85A5C57231A6BE3416D33B0A363118B0F5BB935899D85856F5AD1563D0CDA3A3F0520B3233B3F0F1375578F0A9484436F983EDC4D73BF0C64FED1FF220556AF1E8BB4391A0EFF8B78A56D01D33A21E9D44A02D813EA78CC1A8DE5E3CD2A1B5D6C3578960AFC6CFEACD16FC78E02C5447BEC2A0F2DDCD2E2994F8E357DD9DC80A198750AD185DFCD4FC6CC122430DB4977F41CFC2DDD0D417E3C3AEEFA247908EFB70F34BAB91BBF73BC45D5D0B0F73E3692F2C4331D96F32F2226620CC4F8D10BD12ACF6467E791D2E6415C133F7286EBDB4D45E898E0DA45CA8C552BF1790270DC6A0AE1A5E729495F2747405CDAAC9BDBF26090BB25FE0FEE6966DA5F71338E63118C13A055E9FD48DDFDBDD04BAB622137F1F73085B4B8DC8BC508696E7F3088402F41BD70B1FAD1CD7AA08D657D7E3B34736E29B320D6E9DD20BD3FAAA80736731FBA533903C380EA75E0B6BF71BBFEBF5B57866A710C1B70FC2BAE7BA41CDEB4B55E3E7D7F7E0B92F2EE2C4D5B6AB5AF67E7C0C563DE08F6ED13A783B90F74502DD49E243B7E998404B8166E15C6C43CD2C10F3129E2C9BB0B596E47337EAFB4EC1A47EBE50CB6D31BBC67A334E5FCAC7956DCB30BCF8876697311F729D5006E632158984B058ACBC3CA8D86CE42B5D9685F7B7A025B04A143C957B528C378A0C5558BB331513CFBDC12BC33534B6923689E4FC3E7C83CC6A85D90A98CC16882CF5CD4E47F9513B0BC714F13048BD111BCAC439080AA92DFBD1518166BFDABB4EE5A3F097551857B4A6D9BCD88A9E654C560A35E8E1ABC0AB93BAF1CFDD45A073362562F8B399C0E0FED8BC24026D2D40CB3727A2D76397A18E0EC193AF24E01F931BF6102AB072E646BC711C48393C03D55621942A295432216032A1C4500293C40BBE9AD657D0A3466D42E433133162D3A778F9B81E9B0FDD839E0A9B7D4F9CB022506F84556C81E16432E21EBE82E7BF9C8A075A943A97A8E4F052767CE66483E149A03BD615EAD149049C4D546978ECBFB5B3B0DF6B02660F0D44420FADDDBFCCDC0CE947F7C2B8F34304D465F38DB58E1AF32FB3C35E5F095A0CAB588A89D1DEFC54159B881AF1C996542CB8381F42ABE5BAB3FEDABA377BD1B01AD41FFB3C8FABD250BEB1F6CEF4EED02A6DA53B9D1168D6979D5FF8EEAA1D987FF535FBC625FBF932FD029C50C64220102236448567C7DA4ABCFEFE05DA8AEC1FF662FC82B3F826F501845D48C6B0B864844FEE8EEFBF9F709D592CC63AFCF4EA5ADCB94E8A67FE391A1FCCD0C354978337E276E0ADB42ACCDF361FEF8CECE89BD2F8B9C564C191CF7E42D9E4788C0E16E2ADC1FFC206930F528EDF7BFD4D2C16AC7EE4337C103E09475F6C2C74E5F8D39AF72481BE5172749DD304CA6BCC28FB6832A435C54E5DBB597B37F669C66174A4370F7B6B7ABAF4E18BC5D8FEEB694415EC44644D2ABC4D05FCF8A7968DC5FC321165A16F7BD5E378CC345B8D4FE9E783F17D74F6EE39A57558F7CDB74830FC0CBDB980C735B7753E215BA99789BD705A1E8B7DEA512812FB412814A2979F122F4FE8D26C082C9C6F7DE2714C3DF322AF1BCD5E14279503F0ADCFE3B8E35A985D43040573A3ACDD710C61BF7DCAE7C41ACBF8FBC8EF65644AC3E12113E381A10118126E737E269ECC43D5DE151850B40D4A4B252FB67444351CDF6BEF6D76E415CB78947E3E11B25ADBA9312C4D7C83D71C9C9347E17F7A93D05C84AF9F388CF484A17879A60A079EFF166397D461FAFD43F1DDF23EAD88A419A95B93307041019E7D7B34DE9EEA8577EFDA8A85BFE461E43B7761E3230E387FF95D2DA82A29C3D6A5C9F83C558EA5EF0F4278F96F18187304C27E3D91727C7C8B675B50FADD76043F7A05DFA5FD111303AE7D6CB6C02410F08585B3E7A293403B2515D4F96609ECDEF26F54A6A7C068B2F0F3FD1C692715B1C890F7C29D7DF598D6DF87BB431A1A5B451F4C372035B304A82A45B7F4F5F0AACBBBEEDE9542159255C3F87D2C4229BAFA78204C2FE7279E34F56FB3FB7E989805182BE0517C0E3E85C7E063CCBE6E98EC7C42162F7D54958052B11E569104DD7C943CD36E5A7F5F7BDD90860B0D3526FC7CFC0A7A64AC4775561AEA8552B04CC1E3EA04DCD5DF0FE3A3BDED616C2C1EFA6C8E01670F24C23F63339F0BCBBADCAE998272890E51412A3C3D2A180A89ED4FE5333906649F3A0ED5A5DD4059362A042AFE0262E7298EE9E3C7E3B0596363C8FC6131AA2F9FE46E1F1666B75B339E8F7F780F2D2F0CA5B956B0DF11BBDC4C1FA7A2380C065CAC9221D0478E334947F0D7F18791332E120BFE36140F0EBEBE6893D564C2DE553BF0F02639DEFDC740C48A4BF1D81B69A88C08C7B697D80BCE011783C984D2A222ECDD968D9F4F8A30677E6F0C0913E3C86B6B11FF4619864D4A40D2C6986B08EA9092528CFC82526C7D7937569C1360C3868695BD18BD033CA0EEA9825A2E4647DB8F2D999240DFCCB78CAEBD2102EB930B70B1A006D5751DBB241A1EE02113F1F303D999846DB8AAB9006D3856809CB23AF004943A33F76BB3F70013248D5CCC8FD50AD6CA30A99F1E7A55DBBF2E6C157BEA6A150E6794E37C7E0DAFE7CC0AE637D4A66E78B7B07BB0534FFC3D259810AD6FE6D6680D0EDB045CB8F5326AEA6D1B80BE6A29A6F6F741DF60765A4BF3F55546610D561FC9479EA1CEFE6C768C1713D286BA244D9F919C59819D674A70B9C476282D2B1AC542F1D8BF86C69EBFEA601E77E7B0D86C9140C0398C89D421AE9BBA5959D71B32AE83173925D04DEE19ABFB0CE7BC7DF1F5F6A998D146C679EDD56CBCFEC42F502E988CA7038AF1C6B349C8888BC3070B2210AC6A5F9C57AC3803639D19A8ADC585D3B9C8D20461648F86DDBC1AEC5B7C04EB2F8BF0E8EA795832C9F672284DCFC2276FFD8AF7D6E4A3B44A8D898F7641A3734389BBEFEE8191236FEC8003126807BF50D4ADF30830F1CB35D4A1B6DE71816685FB59324553F7466B232AAF35A1A0BC9E0B50598D893F83EDEDB14367BD144CA09998B28D21C72ADE95569B905E5083C2CA3AB0ACC1B26A5B0815BB1FBB878F5A8A102F19BC55920EC7D630DEA399155C1C1B049AA5B9B7362FC689CD23AFDCF66CF67208F751B4591B84ADBCAF14D772816652CF04BA9B5ECEC7D6B4B128942CF602339AF93D994077F196F339FDB7DA0D09B4211F5E5DB761ECA2F1F8F2317FB49E8E54839DAF6EC1A2CD22AC39743B2EAC3C84057F3D813F7C31110F4C0E477B8113977F4945DFC9FB515E757DF44C532E72B516EFFE3A174F44D97E5A9C568C038B93307F7536AC4313B06F5B3F3456F1BE39A224D037C78FAEFE1F26C0048B7DC18542F095A1B3FEBFD6A656516BE22B72994808D97F51D0FE8731DFD0D09C17E85A1C782F11E376E890B271287AB45A1EA51A89FFDC83173ECE44FFE7A660C9340196FC3511AFAC2CC1EAEF2762CAE4F68A3C95E1C0A622641973F1E97DA938DBB52B9E59D4B399D0161F48C5735FE643A80CC7A6EC0918DBA40AED63776DC18AD47A7CB4711C1EEDDF7E795A678091403B438BFA120122D029049C13E85A1CF8F4573CF7561A5EFBE17E8CEED7CA010AC55998F77436C63D158A6E56118223FD21CFBC84BF3FB9054B932C58F6FD44CC991CDEC2075C8375EBCE23C5A0C5FCFB03A03119316DFA16F49C702B1E1CA142AF18359A9691DAF2CC7798F9691E4483E2717CFF6074BF462273572AE6BE9F8B898F0FC01FC7FB40DD8929F124D09DF275A39B100122E00C016704BAE4502A1E7AEA30361FD7A3A86812B4DAA62E9B726CFEFB212CFC3C03FF5C3309838707E25A68322A2F6661D19FB7E3CD1FABE1A9EB820FF68EC6EC28158475F5D8F5F6F798F79901C366F5C2CBAF0E45A44A8C948F3662E4F1EEC8FE32069EADE44CAD9EB71A0FAF2E8464E4309CDA3E00216CC2E585F8ECF9BD7875BF0ACB360DC7841E4A34388AAA2F5FC5C7EBD3A18B8FC1C3C31CAF0FD3942309B433DF2AEA4B048840A7107058A0AD65F8EED9BD78FEA34C5CEE1B8D82DD09D0AAD8FE81199BB79CC6CC59FB20888FC486C5F19814D3BC6C2A5087D4F5C9F8D39F92B13BC7DA2CB2472291A2CFA8287CB86A3886EB01EBB163E83FF32866AE7F002FC4B69ED1BAE681D578E8DB424015802F5367E0BE50C0907A16CF3E9B84157B6A9A1C710088C44208BBFAE1C94523F1DE7447C3FAAE474B02DD295F37BA09112002CE107058A07372B070E111ACDCD5582FA3E1393D8786E295F76F439C57FB4F4EFFE9285E7AF70C52726CFDD46A298E25DFD3ECA2D3AB77E3A98FAE60F1CE7B10A5697D2B3177F31E4C78F90A4CFDC2B0F0E918DC3940CD725A7174E551BCB6341DE70DB65BCA3CA458B8F51E4C6A888376064C8BBE24D037018F2E250244E0C60830815EBD3A150B9E3DC66FF0D557233165720F4824CE460ADFD8F35DE52A126857B1148D9308FC8E08D4D6D6E2C08173F8FE87743EAB39B363111B1B4C024D2BE8DFD1B79CA642045C9480D168446E6E2ECACA6C872E04070743ABD5422C6EAC5FE2A253EBD461D30ABA5371D2CD880011708480D96C465555159850B3A652A92097CB21682B4DD4919BFE0EFB9040FF0E8D4A532202AE40C062B180FD634D24129138B76234126857F826D318890011704B0224D06E69769A34112002AE408004DA15AC4463240244C02D099040BBA5D969D2448008B80201126857B0128D91081001B7244002ED9666A749130122E00A0448A05DC14A3446224004DC920009B45B9A9D264D0488802B10208176052BD118890011704B0224D06E69769A34112002AE40E07F5EA05D01228D9108100122E02A04042515750DA7D2BBCA98699C4480081001B7204002ED1666A649120122E08A0448A05DD16A3466224004DC820009B45B989926490488802B1220817645ABD198890011700B0224D06E61669A24112002AE488004DA15AD4663260244C02D089040BB85996992448008B82201126857B41A8D99081001B7204002ED1666A649120122E08A0448A05DD16A3466224004DC820009B45B989926490488802B1220817645ABD198890011700B0224D06E61669A24112002AE488004DA15AD4663260244C02D089040BB85996992448008B82201126857B41A8D99081001B7204002ED1666A649120122E08A0448A05DD16A3466224004DC820009B45B989926490488802B1220817645ABD198890011700B0224D06E61669A24112002AE488004DA15AD4663260244C02D0808DC6296344922400488800B1220817641A3D190890011700F0224D0EE61679A251120022E488004DA058D4643260244C03D089040BB879D6996448008B82001126817341A0D99081001F7204002ED1E76A659120122E0820448A05DD0683464224004DC830009B47BD89966490488800B1220817641A3D190890011700F0224D0EE61679A251120022E488004DA058D4643260244C03D089040BB879D6996448008B82001126817341A0D99081001F7204002ED1E76A659120122E0820448A05DD0683464224004DC830009B47BD89966490488800B1220817641A3D190890011700F0224D0EE61679A251120022E488004DA058D4643260244C03D089040BB879D6996448008B82001126817341A0D99081001F7204002ED1E76A659120122E0820448A05DD0683464224004DC830009B47BD89966490488800B1220817641A3D190890011700F0224D0EE61679A251120022E488004DA058D4643260244C03D08FC1F8024C458BED69FBE0000000049454E44AE426082 WHERE `app_id` = '2';
@@ -364,4 +365,9 @@ UPDATE `fn_app` SET `thumbnail` = 0x89504E470D0A1A0A0000000D494844520000016800
UPDATE `fn_app` SET `thumbnail` = 0x89504E470D0A1A0A0000000D49484452000001680000012C0806000000EE2C29AF0000200049444154785EEC9D077814451BC7FF77B94BEF8D143A842EBD188A056CA8F40E52444405C52E62C5F2D995265644451114456C6001A4F7DE413A2421BDE7FADDF7BC7399CBE648729BDC5DB82433CF1325D9D9D9D9FFCCFEF6DD77DE99514024A1805040282014F04805141E592B5129A18050402820148000B4E8044201A18050C043151080F6D08611D5120A0805840202D0A20F0805840242010F554000DA431B46544B282014100A08408B3E2014100A08053C540101680F6D18512DA18050402820002DFA805040282014F0500504A03DB46144B584024201A18000B4E8034201A18050C043151080F6D08611D5120A0805840202D0A20F0805840242010F554000DA431B46544B282014100A08408B3E2014100A08053C540101680F6D18512DA18050402820002DFA805040282014F0500504A03DB46144B584024201A18000B4E8034201A18050C043151080F6D08611D5120A0805840202D0A20F0805840242010F554000DA431B46544B282014100A08408B3E2014100A08053C540101680F6D18512DA18050402820002DFA805040282014F0500504A03DB46144B584024201A18000B4E8034201A18050C043151080F6D08611D5120A0805840202D0A20F0805840242010F554000DA431B46544B282014100A08408B3E2014100A08053C540101680F6D18512DA18050402820002DFA805040282014F0500504A03DB46144B584024201A18000B4E8034201A18050C043151080F6D08611D5120A0805840202D0A20F0805840242010F554000DA431B46544B282014100A08408B3E2014100A08053C540101680F6D18512DA18050402820002DFA805040282014F0500504A03DB46144B584024201A18000B4E8034201A18050C043151080F6D08611D5120A0805840202D0A20F0805840242010F554000DA431B46544B282014100A08408B3E2014100A08053C540185C562B17868DD44B584024201A1409D56C00668C1E93ADD0FC4CD0B058402D7580185E26A8786C26C36330B3A3D3D1D7BF7EE8556ABBDC6D51497170A0805840275470102735C5C1CBA75EBC66E5A0A6A0668B3D98C356BD6E0EDB7DF46DBB66DEB8E32E24E85024201A1C03556C06030E0C2850B8CC12A95EA6A40EB743AFCF8E38FD8BC7933FEF7BFFF5DE3EA8ACB0B0584024281BAA3406E6E2E060F1E8CAD5BB7222020004AA5D2066985C964B2141515E1871F7EC0CE9D3B05A0EB4EBF10772A14100A78800204E881030762C3860D080D0D2D65453340171414E0FBEFBFC79E3D7BF0FAEBAF7B4095451584024201A140DD5080003D68D020AC5DBB1611111150ABD5A52DE8FCFC7C01E8BAD117C45D0A0584021EA68014D09191911503FAB5D75EF3B0EA8BEA080584024281DAAB00F7419305ED10D0AFBEFA6AED5542DC995040282014F03005F2F2F2D820A14340EFDEBD1B02D01ED67AA23A4201A140AD5680003D64C81001E85ADDCAE2E6840242811AA900B938860E1D2A0FD0AFBCF24A8DBC495169A18050402850131520400F1B364C00BA26369EA8B350402850BB15900DE85DBB764158D0B5BB3388BB130A08053C4B0102F4F0E1C31D5BD004E8975F7ED9B36A2F6A2314100A08056AB10234483862C408C780A6A9DEB367CFAEC552885B130A080584029EA50059D023478E940768B916F4C90B19389394E559777A8D6A131CE083B64DA31116E4E7B006B4BAEBD1B369B89496EB306F5DC81011E28F4E2D63E1ADF2AAF0760D46338E9E4B45727A7E5D9045D63DC6460431ED1CA582223D8E9D4F43464E91A3ACE2B80B15080FF6C375CDEA21C0CFBBC252C982960DE8975E7A4956159FFFE41F9C49CA9695B7B6670AF6F7C1FD83BBA25BEB7887B7AAD519F1C2676B71392DCF61DEBA902122C40FAF4DBD05D4992B4AD9F91ABCB67803923304A0B94E31118198FBD89D0EBBC9B173E958F8D34E64E60A403B14CB8519C8607B6A5C2F348B0F7708E851A34639B6A077ECD801B9801EF3D20A84852831F016C756A30BEFD9E38A3A7DDE88AD7B7578704837DCD8A9B1C3FA156AF598F2C62F68D64885DE5D7D1CE6AFCD19761DD4E3F86903E63F7127A242032ABCD5F49C42CCF860B5D0AD58A53F376A909A61C6B2574738EC227B8E27E1FD65DBD0AB8B0F9A375639CC2F3238AFC081637A1C3C6EC08BF7DE88364DA21D027AF4E8D1AE07745CB4171EBF2FD8F9BBA9C125EC3EA4C30F7F14C907B4468F296FFE82AED77963D4DD1543A906CB22ABEABFFC53842D7B7498FFF89D880A7300E8EC42CC98B35AE856ACECC74BF371F6A25116A0771F4FC207CBB661E45DFEE8D6BE6E1B05B23AA60B32FDBD59837FB6685D0FE8175F7C5156F5C6BEFC2304A0010EE80706779567416BF4B8FFAD5F0568007040CF7BACBF2C403F3A778DD0CD0ED0DFBD32DCE1F34A16F407CBB70B403B54CA751938A05F9844167494430B7ACC98318E2DE8EDDBB7E385175E9055CB7B5E5929000D09A00775419F8E8D1C6A57A43560EADBBF551A34B42D596A4A167C7DBD111651FAABA5A2631555283FAF083326BD872F57963DEEF0DFF18B58BCF037BCF9E1F40AEF6BFE9BCBD1A75F2774EADED2E1FD4B337040CF7DF40E4486FA57782E0D703D36EFCF4AEB4685EA7406688AB4080D0B2A758DB42BD9888E094351A11626931941C1D63AF4EF3103F562C3F1D5AAB2239AE8F89A9DF32B75AFAECECC2DE86F5F1EEAB0E8BD279231E7FB1D02D00E95725D060EE8E727DE80D68D232B2C98967B1E3B76AC3C403FFFFCF3B26A39FED59F05A025809E4A80EED0D0A17604E807DEF9BDD2A02198DE79FDA3E8DDB7E355C0ACE898BB014D909BFFD6720C1BDBB7CA809E33E37659807E7CFE5F95D68DEE7FFFAE9358B36A1B9E7BE3DE52728CB8E559AC58FB1656FFBC155792333179FA401BA02B02B02701FA9B978638EC737B4FA660AE00B4439D5C998103FAB9897DD0BA9163408F1B37CE31A0B76DDB26DB821680B636277771DC3FB0336E906141D320E183EFFC5169D0108447DD3E0B770DE98DDB06F44042EB9297C16F3F6EC6D67F0FB25D18B8B5BB73F31164665843F982430218D8291DDAFB1F2E5F4C63FF26AB975BD0E74F27E3D8E173B63E7AE7905EB0B7A0A565D2714A3F2C598BB57FECC4F36F4E46A3A68E43BEA40F01B7A03F98719BAC41C227E6FF5D69DD2A0BE82DEB0F302D67BE369155F5F285341CDAF71FFB77EF9B3B62E7962338B4EF349E7C691CFB1B69F4DF894BA574B37FD0A5BAD1B1FA0DA3D1BE4B82533CE016B42C409F48C6DC1F760A0BDA29C52B77B20DD0137AA37563C72E8E7BEEB9471EA0E55AD0135E5B252C683B40CBB5A01F7CB76A8026984E9E3E8001815B7BD46DC8A29BFFD5533677C43FBFEFC4C7EFFF883B87F6868F8F1ADF7FFD0F1E7C6218EA378CC27BAF2E45971EAD10DF301A17CF5DC1D18367F1C25B9331E7F56588AA178AD6D735613DF14A5206FA0FEE692B73D3DA7DB8782E15DE3E6A767CE4845B6C8096FE5E996E6C03F423B7C9B2A09F58E07E40FFFDDB0EDC747B17787BAB199CC9F20E090B64B775DBDD3D30A6FFF336F7C6B143E730EF8D65886B1065D32D3B330F0F3C5EE276A0B620D714E9A6D3EAB1F2BB7F31EB7F93D0BD57DBCA4875555E0EE8252F0E76580E59D0F304A01DEAE4CA0C1CD0B308D00E2C688A831E3F7EBC3C403FF7DC73B2EA39F1F55F04A025809E32A0936C17C743EF553E1A81FB8BDFFD74067EFD61133A7469812ED7B7C23B2F2F61D6715474A80DA66F3CF725E21B4661D4C45BA15279E1A7EFFEC581DDA7980B22F9523A264DBB9BF9630946CBBEFC9B41FFF79FB6E08917C6A25E5C046BFF3E6DEEC7E29F5EB49559969FF9D8A1B3D8BCEE00EE1ED69B01BFB28903FAFD876F9505E8273FFCC7ED16B4F41ECA728D48DD1BE41AD9B5E5281E7A72984D377BF707B505BDE8487B473EFFCAE8C701FDF50B831C9E46809EBF6297B0A01D2AE5BA0C1CD0CF8EEF250BD013264C700C68DAF65BAE052D006D6D4CEEE2900BE842AD01D39C00340DE82D5EF82B62E222406E06EE4795BA23A450A03AF2630489C0203F761E250E0C02F4DB2F2D4154BD305B0F3D7DE2522940A7A76663E13B2B70E1DC15DBA0E2E675FB997F77C6ACD155EAD91CD0EF3D7C2BA21C0C12A6E714E1A96A06340D1E92054D2FAFFB1E1EC85E84F680FE74CE4A844786D8EE9FBE3CA4FE6B01E82A758D1A7F92DB002DD7829EF4BF5F85052D05F4DD1DD15BE620E1B4F72B1F2E26B5BE08D0DF7DF117D46A2F141668B1E9E867A5FCC55501F4CE2D474B7D9AD31342B0914671F0688791B73ECB20E432404FBF459605FDD4C2B5D56A41930606BD115AAD1E1FBDBB02C3C7F7C3C3E3DFB101982C6872138D9BD2DF06148502080C2A8948A1B6D8F0F75E787929E11FE8876F7E7D05FE01BE4E03885BD05F3D6F1DD8AC28ED230BFAC7DDC2827624940B8FDB007D4F4FB492E1E2983871A23C0B7AD6AC59B2AA79EF1BBF09404B007D1F01BA7D0387DA15E98C98EE24A0E922F4E09375F7C33F6F22363EB214A0C9D25DF9DD7ACCF9E2090685FB47BECE3EB3DB76688A796F2CC733AF4E60FF7E78C2BB6C00913ED1673FF519C64FBD1337DDD6C5760F0579453640E7E514A2B050C38ECD98F81EE67FFD14E6BFF9BDC310BC8A04E116F4BB04E8908A67A466E46AF07415014D7EF6990F2D6083AB238A7DE79306BF82662DEBE3A36F675E15C5C1EB4CE17959C503AD4B3F5F83E1F7F4C343E3DEB2017AC35F7BF1F64B5F63C28377D974532A14C8CB2DC48A6FD6B1A8116A8BF65D9AA3792B6BDF50AB55888C0E65FFB67F913AEC3C920C1CD05F3E37C0E169FB4E5DC1020F07340F79B4BF9994A40CD6BFAB2365A4E5203C32184AA5D2E9CB7140CF244037B4BA0DCB4B1466270BD05BB66C815C404F7EF377B7039A0669E8D3BA4D87A66CB08B125992F4F9CD53CBB68D9845420FD3C5B329A5A21B9C56594601DCC571DFDD1DD0EB3A398036E0E10F2A1F2E46D6EB82B7BEB745177CFBF91A165130FBBDA988880AB10D68DDFFA875D0887CC63CBA80A2067854023F8FF2BCFDD123B63209363F7DB7BED41DCF7C75227B0950993F2D5DCF2C414A0BBE7E1A6B57EFC2BAD5BB5D02E877A6F59305E8673E5A57250B9AEA4C9114DF2E5A53EAFEE83EF8318A78E1AE1F9E895C43F3DFFA9EFD7ACF94FEE8D1A71D9E796801EE9972872D0A83AC68D288273F7F5FCC787614D3EA9EFBFBE3C2D9142C5DF42708349422224370EFF4012CE285DAA247EFB655EAB31CD08B67DDEDB097EE2740FFB4C7E516344135A938228857A2B2B1F0FC3CEEAAB3BF191A0BD97CEC7387F7E88A0CF70E7D950DB6F3787867CAB4017A5C225ACA00F4A449931C5BD004E8679F7D5656BDEE7BEB0FB7039A20439608B712A962E4F37CFFB5A568531C6D40801E36AE2F7B00C822E10F9DAC9B7041260EE8C97711A0EB3B2CB14867C02373AA168DE0B0F06ACC705BD78731F5B121CCAAAC6AE216F4DB0FF59505E8991FAFAF32A0AB5AC7B2CEAB4C1C7459EE266E5D3B53270EE82F9EBDCB613104E80F57EE7539A0798865E36671B63AF4BCB13D8B82A96CAAAD807E66ECF5B2007DEFBDF7D62C40D36729019A4299468CEF671B88224093EF930F4CD15B8F06CECA02F4AAEF37B24F54F209F2B0B0CA761C47F94B00DD5E9E05AD35E091B9351FD0F4703AAB6909A06F466488839984B94598F9F1BF350ED0D457A571D2D49F125A356031E8CEA4CA009A5C1C0BDD0468BA07693F900E60D331FAD2223F3D256968287DD11C3D74D6F6770234B9CDE86BA447EF76CC0547892CE8D53BE661C5376BD9EFD263F405A2D71BD8DFA59A96F5DC1337C87DB17FF729C604AA0B31837FFDF4E9DB116F3CFF95CB2DE8A7C75EEFD0C541617693274F760CE8CD9B37CBB6A0A7BCBDDAAD163401E0ECA9CBE8757307BCF3F237F86DCB07AC21E402FA9BCF56B306211FAB8FAFB7D371A7E53D4C1CD0F7DE49809661416B0D9831AF6AE162CE3CD09E782E07F45B0F12A01DFBA09FFDC43300BD6DE32190A52837D1E4A0DC9C02963D20D00F9D7BB4927B6AB9F938A017CD74BCDCE8FEFF52AB0DD0524389A25FB41A1D9B364F69FBA6C378E695096C22D0D9FF92D0B899756213BDAC6EE93C1D770CBC9EB991C828EBD3AF23DAB46FCA004DF1E76495EFDD71823DFF335F9BC0DC6B143EFADA9C075859BFAED8CCC652522E67D89EFBA2221D2E9EBDC25C74F4E2D8B1E908068DBA8131A16B621B3C39752E1B68A7AFC0437B4F83267CD1CC5257BA389E1ED34396052D1BD03367CE94D579EE7F678DDB01CDDFCED2CF1F29A0C9274B6FCB75FB3FBACA829EF5F04216DF2B9D7127EBC62A9989037A52FFEB6403FAD1F9558B46A864D53C3E3B07F49B0FDC240BD0B33EDDE01116B42708CB01FDF933251124E5D58B00FDD1CFFBDCE2E2E0CF28BFB614D0347EE4E7EF638B6AE1CF31195FF6E70DBEF1297CB8E419D46F14CDBE9CC9974DE0264053E44BE3E671A081EAB96F2CC3CDB7776183D78F3D3F061DBA24B0B5547EF8FA1F982D16DC31A827222283995126AD0B019A5E8E8347DDC88ED158D6E3F77D80FFCD7B88C5B0A72667E2F12973F0E9F2E75C0AE8A74677770868B2A0A74C99E2D882DEB46913E4027AEABB7FBA0DD06471905834238B3E9FA8610BF28BD8E83901FAC9FBE7C2C7570D8D468F795F3EC91AC9DEC5A129D2E189297370FE4CB25B17B69102BA673BC70BF6D35A1C8F2DA8FA609727C0C15575E0807E63EA8DB200FDDC671B05A08BC5E780FEECE93B1C360701FAE355FBAB1DD054B1579F5984ED1B0FB13A92AB912C54724B7C3AE767AC5EB9051F7EF30C9AB5A86F8BE7A77CF680960E12F2630468E9809E743D95E9F7BCCDAC6ADABDA8459B866C5C8A002D758310A09F7B6461A9312B770C123E398A00ED78C1FEFBEFBF5F1EA09F79E619870D4E191E78EF2FB7015A0A615E99827C0D1BCDB5777194F5E6B6BF81F2062064DDA8834C25806E87C4B68E01ADD1193D0AD0B48A9B5E6760964E75A71240DF8008073BAA64E669F0DC679BAA0DD0641048E3995DA90DC55693B5C72393AA523607F4A74FDDEEF0F403A7D3AA0DD004C64F3E5889773E7EA41468A992653D877C0C497ACC1ED07FEE9ACFAC5FD26DDE9BCB59E40B8FCFA7095B46A309BFADD884ECAC7CFC779C9641B07E39DB5BD0F6809E396D013EF8FC31F8FAF93057CC03A3DF642F0C57BA389E1CD50D2D1A540C680AB3930DE8A79FB6861E394A0FBEFFB75B004DE172BF7CBF914D9290CE50A34F9D4F96CD6230910E12960768EA28B9D956BF1F9537FBFDA98E6EA94AC739A027DE41802E19CD2EAF3002F4E31F961F8D409F6B278F5EB8EA749AE8E0EC023B65D549CE92A2144E458996E67465E280FEDFFD7D6401FAF9CF373B05687A60AF2465DA6E81D6C7E08351F6F745911A3FFCF3161B50A290380A97A39996AE986462BF7A5E5534E580FEE4C9DB1C9E7E9000FDCB01B758D01466278D9D973E6B149AE9A5F242A32631AC8E14D14216B4343C8FE7AF08D0348393BEA429AC94C2179FFBDFBD6C708F7E28D69F0661972E5AC3BEB8932EA6A349421C0B67A4D0492ABF2C0B9A9EB3E9E3DF61FE6A0AA124A690CFFCA7F5EFB814D04F8C244057FCDC10A0A74E9DEAD882DEB87123E402FAA10FFE710BA073B2F3F1D1BB3FA25BCF36B8F5EE1EB6CE478D1B121A88BB87F7C6A963174B1DA34C74DEEF3F6E61B1A7947EFC761DCB47C97E9949873DBA121938A027DCDE5636A09F5858FE6017F9C2BEF8F05756035A458DD6B8A0CE467E33BE825A25AAE730AB1C4097E5337458B08C0C1CD0AF4FE92D0BD02F2CDAE214A0E933F7E09E53A8176B9D3840FD69FA33656F19458026838056AE1B30BC0F830B4513B9624CC39580FEF8895B1D2A4D80FEE4D7832E07F4AEAD47B1F68F5DA5AE6FFFAC499F43AEB7F43C9A424F3E609AD0C3DB8216986AD834062DDB3462BA4F7B7A386302A55BEEEA6E1BF07FFFD5A56C012A4AD7756ECEDA89D2A205BF202DC5BAA175C326318C0904E0E8D87056264F3C469D7EA7F564766D3BC662DCC9A27636F138E8C747749505E8071E78401EA09F7AEA2959759B3667AD5B002DEBE21E94C906E8DBDAE07A9916F4931FC91BECB28FA1CD4CCFC52F3F6CB4DD3DCD0EA45956146E44FFA6639DBAB564032CF610A0CE48D623F9FF78D817851AD9039A9F4717A1E3741E9FAC41D6E688F1B7300B837C783CF489F2F2BAD0BF098494DAB66FCA46E5CB4B1CD0AFDDD74B16A05FFC62ABD3802E2FC48D5C67FB779F6455A5A9DB836F78128B57BEC4264591AB833468DBBE09C2A3426CE162A4DDE6F5076CB7C7A77C93654779E918856F11D4794818ADDB617FAC2ADD995BD01F3D6E5D55B0A274F04C3A3E7503A01D5DB72E1FE7807E6C4417B4A8EFD8827EF0C10705A0DDD16138A0C7DFD64696054D83844F7D2C6FB04B0A68F291CD7EEA73A45FC9C6B07BFAB25B2178D034E321373D8D81236E004DDAA185E709C434B59816463A7EF83CB3BCC982F874EECFB8636022FBAC238BE4E63BBA62E0883E367F1E8519D1E02A9D4729F97206060CEB8D4FE6AC64BFD3570D7DCED267FE0B8F7D8C944B1957D585CAEDD8AD05CB4F1318DAB4B72E5F5A56B2017A722FD0EEDE15A5CC5C0D5E5CEC1E40D3A0F49CFF2D6383CD34A87478DF69F629FDC682E9EC339A2C673ADEBD671B6685D18C437A71D1025364155248187DF5B4EFDC1C4FBC388EADDB4DED41D65BFBCE09AC2C5AB294DC547C6D6EFB78E1CAF6CD4A01FA741A3EFDED90CB2DE8CAD6B92EE5B7017A78175916B42C406FD8B001722DE8E973D7090B5AB216C7F8DB5AE3FA368E7DD03493F0E98FE50D76D9AF84F6C0E837F0DE678F21AEBE756D824726BECBDC371307CDC6A2152F3020D0834FEB418C9C782B03299FF54680FEF7AFBD78ECB931080E0D002DD04FEB4A48D79126F74A504880CDCFCA0770CA0B8BFA68E9B357D565E4ADB3644FCDE5807E75724F5916F44B8BB7396D41FFB96A1B028A1733E25B7DD157C3B18367F1E093C398B57CE6D465B628120734696CEFE2208B9BD6D97E7AF67836D59E26634C19F13AF361523BCD59F4B86D09526A272A4B3AF8E42A402F7CCCF14C4EB2A03F1380AED6F70307F4A3C33BCBB2A01F7AE821C7163401FAC9279F9475230FCF5B2F002D01F43DB712A01DEF2842807EE61379835DF680BEBBE763A506A9C8DA5DF6E7FF3079E8ABB65042FB075F0A68FBA541ED17FAA786A7B5260E17EF2012131FC966699605E81BDA4E454060C9AA6CBC2E6CD6E6ADCF22F1C6F678E99D2915F6250EE857EE4D9405E897BFDCEE34A0695D12AA1B250ECCB27CC2A48D2340DB6FA3C50716EDF779A401A9F1035F8682C646D6BDCDAEED2A407FF8A8F56BAAA24480FEFCF7C3C2827624940B8FDB003DAC131264B838A64D9BE618D0FFFEFB2F9E78E20959D59CB1608300B404D0E36E69851EADADA3D515258DDE88999FCA1BECB2073459753470651F12275D1BA22240D392A28FCE1A0DB5B70A85051A0CEF37B394056DEFF3AEC8821ED66F26BEFDEDD572C3F3E42C45CA013D7BD2F5080FAA7809CEAC7C2D667FB5C3694097E583E6CB864E796410546A158BB9A7A8024780FE75C5263CFBFA24162E47101E7AF3332C4AA1BC8D78ED978CE56B7A3BEA33651DE72E8EF98FDCE4F0F4C36733F0F91F4704A01D2AE5BA0C1CD033867644F378EBEA85E5A58282024C9F3E5D1EA01F7FFC7159B57CF4C38D02D0A500DD12DD5BC903F4B39FC9F3A54A814900A04F685AAAF29199236D6D447EDE817D9E90654193CFF4DE690398AFF4E907E723BE41149B8DC5634A69F49BA6DFDAC2A29EFFCA664167A466B3C819BA1E01FE9E012F213C22F8AABAD0C4204AA78E5F446E4E21C64E2E3F4E9703FAE5893D6401FA95AF773A0D6836D5BA78F7715AFA9366A8D13E84EFCEFE0663EFBB831DFBE0B5EFD804277B40D38067C3C6F5D8A0DF8923E7F1FCA31F23B14F3B0C1A75235E7EF233B69428C5D1DA039A5665A45DC5695DE91FBF5987573E78C06516F4BC876F74F8BC12A017AD3E2A00ED5029D765E0807E64480759807EF8E1871D037AFDFAF5900BE8C7166E128096007A6C3F02743D872D4C71D0B316C9F3A5528812ADDBD034C13A018606ED687ABB343DF3CA782C78FB079B3B8116A7090B0F66DB6151A2995CE46AE0162DED9F476B1A50A20D66A9CC75AB77B1B5A0297D3E6F159B8545897CDD8F3C3B8AAD9D4031A294E87A6111C1A0BDF7688D14FBBAF0BFD1E0202FB33C5138A05F9AD05D16A05F5DB2CB2940F32552797DC22282D8DA1094A4C7482F02368567EDDB7982ADD5406D21D58DCEA1DFE9EF3C7197CEA2F9AB986E3C714DE9CB87F290AFFF8F9FB7DAB62D73D869CAC8C02DE8B9D36F7078FAE17399F84200DAA14EAECCC001FDF0600274C98E3B655D832CE8471E79441EA01F7BEC3159F57CFCA3CD02D012408FE9DB4236A09FFBC2395FAAAC06B2CB24C7E55095729D398703FAC5F1DD6401FAB56F763B056867EAEACA735D19073D679A35F6B7A244805EBCE698B0A01D09E5C2E31CD0D307B59705E81933663806F4BA75EB2017D04F7CBC45005A02E8D13727C806F4F38B9DF3A556A51F7932A05FB8A7AB2C40BFFEED1E01E8E2C6E716F4070FF576D81D08D05FFE795C00DAA152AECBC0013D6DD075681E57B1054D330989BB6BD7AE45646424D46A3514B4771A0085C964B25086EFBFFF1E04E8471F7D54562D9FFC64AB00B41DA0BBB574BCB335B9385EF8D2395FAAAC06B2CB44332D0BF2346CB5304F49DC827E7E5C175980FEDFD2BDB502D034E188260C39B3951307F4FB0F5A3700AE281D2140FF754200DA91502E3CCE01FDD0C076B2004DAE658780A60C7201FDD4A7DBE0A50482839CDFBFCB85BA547B513ABD05451A0B46DDD41C7201FDE257BBE0AD0602FCEBB676451A33747AE0B9B19D6501FA8DEFF609DD8A7B787E81194613F0DE033D1DF67902F4577F9F84BF9F023EDE56CB4C24F72AA0D15AA0D559F0D080B66826C382A6E83959802667B59CF4F9EAE3B8946E5D8CA8AE275FB51706F76A82368D1C2F26A4379AB168F5715CC92EAAEBB2B1FB0FF055B34E1CEC6FDD73B2BC54A03130C8A4E55837AE150908F6F7C653233A3894E2426A017EDA721639053A87794506D729E0EFA3C23DFD5AA07E5440C57DBBA080CD3F7108E87FFEF907E4AC1649282014100A0805AA47017231D30C6E5980966B41574FD5C55584024201A140ED5680C2EC64039A02A645120A080584024281EA5180004DCB3C3BB4A0FFFEFB6F0840574FA388AB0805840242015280004D3B59C90234CD09AF6DC962014C6633BB2D15859E882414100A08053C44010234ED05EB10D07FFDF5175BB4A3B6A5BC223DD6ECBE8CD8707FF46A13CDD6E51549282014A85E05B47A13FE3D988C2317722ABC70937A81B8B9631C22829CDFD9A47AEFB06A5723403FFBECB3E5039A32FCF8E38FA03549F57AEB1632B52529BD5468D5EF3E04D76B06A3AE0817F7AD46FA4C14CCF10000200049444154993DB058AC16B5484201A140F528E0A5F645E36E0311D5AC6B8517CC493E89F3BB7F85362FBD7A2AE60157E9D2A50B7EFBED374444445C3D93B0A8A80857AE5CC1E5CB97919B9B0BA3D1E8015576AE0A168B0539857AACDE978E941C03D4DEFE0CCADE0A3D125B84A06D832078ABBD9CBB48359D7DF6EC59346DDAB49AAE563B2F939797C7FA757878C53B2C7BFADD67656541A552213838D8D3AB7A55FDB40613FE3D928993A96604453580B76F60A93C26830E7919971017A0C7CDED221011E45DE3EEB1B215A629DD7E7E7EA857AF1E1A346880D0D050D6BEB6A9DE66B3D9A2D3E9909393036A7C82B5C964AAEC753C2A3FC139293D0FBFEFB880139772E01B148EC0F03818F51A146426C3D7CB885B3BC723B16D7CB5429A560B94BEFC9A356B06FA71946EB9E516F6F9E3EA643018B067CF1E242626BABA688F2BEF8F3FFE404A4A0ABA76EDCA340F0A0AF2B83ACAA9D0A2458B101B1B8BBBEEBA4B4E768FCA43CB1CFCBCE50CF69DCBAF10D04D239418D2BB19EA85F97B54FDDD55191F1F1F84848430EB392020004AA5B234A009C8E4DA2050D3434B80ABA989EA7EE67206BE5F7B08074E5D81CA2F148111F150AAD4CC82D615E4A030FB0AFCD5660CEFDB1677F66A536D03872D5AB4C0F8F1E36DD2D29BF3EEBBEF46AB56D6A541CB4B74DEA953A7D8E173E7CE21232303DDBA7573BA89C8AA1C3264085B83A536A7A4A424B6D60C7D467EF9E5972CA4A96DDBB615DE323D0B6BD6ACC1E0C1833D4A9AF7DE7B8F595AA3468DC292254B30618275B9D48A12F519D2A0776FC70B2B392ACB99E3851A3D16FDBA1B9B0FA75408E8B6F50370DFC06EA81F5DF12243CED4C553CE254B9980ECEDED0D5F5F5F663DD3EF3C29C882A65F086C66B3B9C6C3F97C722616ADDA8EDD472E42E11BC22C6782334F0CD285B9CC920EF00126DDDD03836E6A0F7535B83BA2A2A2909E5EE2577BEDB5D7D0A85123870F99F43C727710A0BB77EFEE741FA3AF26B2CEC98AAECD69E3C68D0C665F7CF105860F1F8E175F7C111D3A543C459AB4A1BCEEF87271466B699F910BE85F7EF9059B366DC2FBEFBFEFCCA59D3E37BF488705CB3760ED9E0B1502BA6393503C32FA46348AADD9EEA8CA08C6AD660236776FD0F90A4BB1B95C93AD662EC4C5942C2CFC6113761E3E0F957F38FCC3EAC14B75B51F8B20ADD714203FED2282FDBD30F2B6CE18DBBF1BD42AF7FAA4C3C2C2909D9D6D6BB7575E79058D1B37C6C48913D9DF6EBEF966DBB1499326D9FE2E3D6FCB962D3873E68CED98F43CB290E801A644AB6351E84E4C4C0C4E9F3E8DAFBFFEDA768C5F842044D7DCBF7F7F997D495A1F8A8F1F366C98AD9ECB962DC3983163D8EFD263F6F7C10BE6F9695B359E162E5CC840C92DBBF2AE575E999F7FFE399A376F5E4A37FBBAD0D8CAAC59B3D82879CB962DD917C3CB2FBF8C8E1D3BB27197B7DF7E1B77DC7107DE7AEB2D562D5E669F3E7D70E4C811964FDA1603060C6071AB94E83CD298D2FDF7DF8F3973E6808E539D08EE543EFDFCF9E79F6C0088121D979EC7B528AFEDEDDB972C2CDE67487FD295A79F7EFA091F7EF8A1ED77D29ADA9EEE99DA9AEA4575A47BB2D7D45EB7323B84937F2C28D261EED2F5F87BF7B90A01DDA969181E1BD7B74E019AA49582994B6D03B493DA5FF3D3D3B3F3F1C6177F61EFB18B5007109C63A0F42A5957D5BE82F442A2A88E9C943308095063CC1D5D31EAF62EF056ABDC762F3400400F0A4FB367CF660F1B01A07DFBF6F8F5D75F6DC7BEFAEA2BB46BD78E3DE8D2F356AD5A8503070E80CEA54470FBF6DB6FD9BF09DE645DD3DAB237DD7413A80C2A9FE7A773A589EA42F9E8B87DA2F36813619EE8C1A7BA5C7FFDF5AC23F5E8D103CB972F6787A5C7ECCF7BF5D557D93993274F66A3D3524380D793DC08655DEFB6DB6E03FD945726E946EE1FFB7AF2F3A86EE7CF9F67FAF23C742DD28E2045C7C8BD44C709E094A64C9982952B57B26353A74E65F748FAD3CF9D77DE8977DE79078181D6C12D02AF56AB657A5379348643962A7DAED2A42FFA3B819F804CAE2C4ABFFFFE7BA9F3E86F15B5BD7DFB1248E7CE9DCBEA4CBA503D29D1F5EC279A51DB926B8CFAC18E1D3BF0D24B2FB117367D4A57D4BEEE7A00F20BB5950274E3B8087755A5C6945B2B00AD3718F1D8BB2BB0FFC4E552C2FB06472224BAD1558DA1C9CF4241C625984D25D12AC101BE983CB82786F5EB08959B2C697AC8294A8627B2E438682B82774580963EA4654196E05B1E842B02B47D59041B821B954580B6076D45C7E81C3A5ED679FC5859D793739EA332EDF5B107B414DE540702AD14E652F8F363D41E94087C04480E7CCA5BD631CA2B6D43E979F6C7E877E98BDBBEFE151DB3D7906B432F66AA1B819DA78ADAD05DF41280AEBCB2351ED006A3096F2EFE0BFB4F5CB2DDBD4E6F445EA19659D21501DACF5B89A08092DDA4C382FC316DD40DE8DCAA4129477DE5652DFB0C7B084B73791AA0093C04489EC83A240BDF11A02BB2842B826959D7231FAB23EB9ACA243FBE347DF6D967CCF2A6E46A40930ED2411C7A71710BDA194073B0F3FBA0C140FA62910B688ABEFAE8A38F4AB9382E5CB8C05EA4E501DA5E37FA5AA0AF1D772501E8CA2B5BE3015DD62D6F3F74167397FE8BB4426585801E7B47674C1FE57857E4CACB7A6D004D616464A1F3A810FA44A741C0EDDBB733DFA37DAAC88296C2947CDE04215AB3D611A009066421F274DF7DF731BF2BA5B2CAA4E3F6D635BF1E3F26B74CFBFBA3D03A1A202360F3E44A0B5A7ABD8AAC6BCA57190B5A5AAE14D0D4BE34B6402E137B17873D84C9DD71FBEDB75708E8EA1E771280AE3C4904A03D04D0349045C1EA3C113CC9E749D11A15B938C8C7CB272D9015D5B97367F600F35491D54ED7A070330A3B9326F21793BF92E04089C2F17EFEF967067947802690F3F3789904688A3D961EE365929B87A029F7584565DA1F2BEBDEE5029A62536910977CB66455D2CFBBEFBE0B2F2FAF5216343FE60CA0EDDB9EEE83BE00DAB46903FBF6A5AF98071F7CF02A401F3E7C182B56ACB04DC4A1496714B54110961E23ABBC7EFDFAA5F4E6BAF16395C788BC3304A0E5E924CD25005D8D80FEF8E38FD974FAF292D447C81F7CCA2B3D8FAC4B0AD5937E8AF2F30882DC5A9503688AF5A5B2ED13019AA0CFCBEDD4A913CB42E5D3C34D7F976E2E4C616CFC5859804E4B4B63EBDDD22C3EFB32A93C3E59A7BC63E59549EBC6C4C7C797F2AD523D49031AE82398D25642D244D114A41D852ED24B822C4D02134F4B972E65BF13A00972B404827D5B906E3CF163D2F3E8D8B163C758F9BC9DA46D687F8CF24BDB5E0A68E931D289EA4D6D43F05EBC78311B7CE589A271A82D28D1DFE9386F277E4C0A61FB6B0A40571EA0EE3E4300BA1A01EDEEC6B42F9F5C1C83060DAAD65967F67E66AA1359AD04037BCB5AAE1EE595C907E7CA2AC7DEA2957B2D91CF7D0A080BBAF2DA0A40D762405714E151F9AE22EF0CFBC13E3AEBF5D75FC7E8D1A3D92CA9AAA4F2CA1C3972240B692B2B25272733F7847440AF2AD716E7B84E0101E8CA6B29005D8B015DF9EE20CE100AB84F0101E8CA6B2B002D005DF95E23CE100A3850805690A09983455A1DF8D23E851A1DBEF8653BB61CBA5CE14CC236F583D89C84FAD1D678734A34812C34C8AFCEADE52E002D002D60231470B9021A9D01BF6D3C84EFD6EC416A665EA9F2553EFE15025A5F5832998B4EF4F351E3F6C4D6B87F586F848704B8BCAE9E5CA000B400B427F74F51B71AAC8046ABC7AF1B0F63C96F3B909557C4965EF0F60B8297B70F5B0258A52E992446B769361940B37C690906A34EC39607A62DEA06DE781DEE1BD2ABCEC1993411801680AEC1081055F77405B43A03D66C3D8A4F566C46A1DE8280B05806E7B2160662F762B140AF2D4061560A60D4606CFFAE187D47578404FA79FAADBAA57E02D002D0A53AD60B2FBCC05671E3891645A28914220905AAAA804E6FC0BFBB4FB1D9BD053A335B02D82730EC6A485B2C30E88A509099C4E03CE68E2EB8E7AE1E08F4AF1B7B1396A5AF00B40074A97E413305690BF8B8B838F6F77DFBF6213333F3AAD986557D58AFC579B4DE35CDC0A3597972122D35BA79F3665BD64F3EF984E93170E04039A78B3C6528406BE66CD8730AEF2F59C72C6982B477406809A46975498316F9E9976C701E795B973AE9D690CA27002D007D15A0F932A574A0AC85766A1A81681123BA27E91A2115DD83FD14715A5294EF7A51D3EEDD93EA4BAB4E12A4DFFB7A1D8A0C1604473580DA2F9841DA6CD423E7CA39580C1A8CBAAD33C6DDD59D456D94EB0AF1A41B73635D04A005A02B05689AFE2CDD3A89A607D3BA1D34FD98AF64C757C12BEF184D7FA6058CC8A2A5A9D43CD17AD634F59BA648DB1FA3C92A044A822C5F5C9FCE23F8F2EBD2BAD4F46F5E26ADBD4CB0A57D086991FDC8C848765D5AE7E2E2C58BB8E1861B6CD7A6C587E8CB81EA4CEB3C376CD8904DD3A615DEA44B7CD209E402E2EB3BD3EFB496344DADA64933A4034D33A775A5F9312A9BD66016092048FFB1F90816AFDA8EEC023D82A21BB2C1C29C2B67A18601FD7BB5C1D4E17DEAACCFD9BE8FD46A405FC9352120AC6401227EF3FAA23C14E5A6635CFF2ED5BA9A5D4D784009AEB4180FCDC2A374E2C409B6D12D2D144FC97E76225FCF81AF97215D6E54EE31AE0B2F5B7A9E54B3B22C613E0D9C8ED16C45BE79009DC72DE1B2CE23C012C079E2D3C6695A7A454BBF4ACBE5E71280F992A3345B927EA7CD5D29D1BFE947BA746B4DE807EEACA334042F334F0B28550CCE753594AE22AD6B35A0690BAC8AD23D77751780B6138840429626ED1AC2D73E96EEC44210E59B0CD0A9B4D810ADB8C701CD77F8A063F680B63FB66BD72EDBBACD949FCAA53C54261D236B9A438EFE4FA0A5414C6E9DD2DFEEBDF75EB6625B5910AE08D074AED4E541F748207516D0F67017802EFB09E42178DFADD98DACDCC23A1D4A57E7007D29351B3B0E9D436E81A64240B74F8847F776D6253545B22A20DD2A8BF6D3A30132FAD4E74B98F22DBAA47AD131CAE3C8BAB60734B912A4ABF211DCF8EA6B748CB669E289E04D10E63BBB48AFCF8FD9FB992B0234B949C865C293B46C672C680168F94F9246A7C71F9B8FE2F2956C4C1C783DC282FDE59F5C4772D64A0BBA8EB49D5B6E530A68BA80FD20A1A32DB66815396E713BB2A0A97CE9B2A5E5DD90D48D51DE605F652D682948D7AF5F8F69D3A631DFB6B0A0DDD2ADCA2D94763FA2088FBA1C4A57E72CE8EAED62B5EB6AF680A61D5A3EFDF453B6EEF2B871E3D83AC763C78E2D75D3B4E03F1D237873570165A0C1383A466B18DB839DD6B4A605F0C99DC11385B2AD5EBD1AB4B6321DE389A04CE0A7813EFA37F7EFF2E3B4EF624580969E479B0ED00EDAB488FDF8F1E3591134E8497E76FA122040F36334B848D7B21F24DCB66D1B033A4FE472A1DD5FFCFCFCAEF25F0B1747ED7A3EAAFB6E84055DDD8A7BF8F50866FEFEFEA596E9E40BD4D322F694A43B93D3EF04263AC621CC8FD3DFE818258ACCE03BBF7009341A0DA48BDF53281BE5A1BFD1319EA4FBF5E9F57AD0CE31D244C709B0748CEACE13BD5C424242D8AFFCBC808000B6BBB8F43E28FA82AE4D0BFC4B8FD1801FF9E2EDC3ECC8E72DDDFC97AEC9973D955E93AE4175A563555D6AD5C3BB8BA89E9B15B001BABAF72773F37D89E2AF81024D9A34C1B973E7AEC195C5258502355F81B262BE15665A171080B1A00085972EC16234D4FC3B1577704D141833660C962D5B764DAE2D2E2A14A8B90A28A00E09464043EBEEF4525033409BCD6664EEDD834BDF2D857F5454CDBD4F5173A18050402850C314B098CDD0E9F468F7F26CE60ABB0AD0E49FBBB26533F4070F2261E4A81A767BA2BA4201A18050A0E62A60282AC2DEB91FA0EDDBEFDAC67F38A4152693C9420319C99B364271E23812460840D7DCA61635170A08056A9A0204E8DD73DE478BD7DF6083DA522B9A019A46EE2F6FF817EAFF4E2161F8C89A767FA2BE4201A18050A0C62A60D01461D7DC0FD06CF66B080F0F679144A52CE8FCFC7C0668EFFFFE43C2F01135F64645C585024201A1404D53802CE85DF3E6A0C9CBAFB065162A00F429240C1D5ED3EE4FD457282014100AD458050C1A0D76CD9F2B03D0A708D0C36AEC8D8A8A0B05840242819AA60003F4827972007D12094304A06B5A038BFA0A05840235570106E80FE7CB00F4C91302D035B79D45CD850242811AA8001B245CF8A14C400F1E52036F515459282014100AD44C059805FDD14219803E71020902D035B39545AD850242811AA90003F4C7B2007D1C0983E459D05F6C3E89E5BBCED648416A4BA5BB3589C2CCFEED11E2E75DE55BCA2CD062E1FAE3D8FCDF952A97214E745E01959712A3BB37C5C49E09552EEC485236E6AF3D8A7319F9552E439CE8BC0271A101987A634BF46A7EF5767B6595CE00FDC947322CE8E3C791307090AC1A26BEF507140AC0C75B212BBFC8E45A050C060B4C6660E5437D111B625DD2B32AE9545A1E262EDE0C2F2F40AD126D59150D5D718E566741427430964CEE53E5E296EF3987796B8FC15B0D2895A22DAB2CA41327D2AAA03A3D705FEF044CE9DD42564906AD16BB3EFD580EA08F2161804C40BFBD1A71D15E78FCBE60599510995CABC0F7BF1762CF613D563E78B3F380FE720B7A77F5C1A05BC59643AE6D25F9A53DFD663612A283B0E45E2701BDEE381E1C1B88668DAC6B5E8B54BD0A24A51A3177713EEEEB458096F73564D06AB0EBB34F6500FAD85124DC3D50D61D25BEFBA700B42CA5DC93C906E8A9373A09E87C4CFC7AAB00B47B9A4976A936404FEC25FB1CFB8CCBF79EC7BCF52704A0ABACA0F327DA00DDB339A6F46A2EAB4066412FFA4C06A08F12A007C82A34F1BDBF04A06529E59E4C3640DF7F83F3805EB24D00DA3DCD24BB5406E8A8202C99D853F6395703FA02E6FD2B005D65015D706209A09B614A4FB980D660D7178BE400FA0812EE9209E8F7FF168076418356B5081BA0A7F4711ED0DF6C1780AE6A43B8E83C1BA0272456B9C4E57B2F60DE8693C282AEB282CE9F6803742201BA99AC02998B63F11772017DB7AC4213DFFF47005A9652EEC95402E8DE2E00F40E0168F73493EC52AD800EC412A7017D4A005AB6EAAECF5802E8A6F2014D511C5F2E9601E823879170974C407FB05600DAF5ED2BBB441BA0EFEBE53CA0BFDD29002D5B79F764B4017AFCF555BEC0F27D17316F830074950574C189A5009DD85456892CCCEEAB2F6500FAF02124DC7997AC4213E7AE178096A5947B32D9003D3911B1C14E84D9A5E763E2D2DD02D0EE6926D9A5DA003DAEBBEC73EC332EDF7F09F336FE272CE82A2BE8FC8936405FDF0453AE6F22AB4006E8255FCB04F41DFD65159A387F8300B42CA5DC93C906E849D72336D8B7CA173995518089DFED1180AEB282AE3991013A32104BC676AD7281CB0F5CC6BC4DA705A0ABACA0F327DA00DDA331A6F4682CAB4016C5F1CD1219803E7410097201BD60A300B42CF9DD93C906E8893D9C07F4B2BD02D0EE6926D9A55A011D8025639C04F4E63302D0B255777D461BA0BB37AA1CA0BFFD4626A06FBF4356AD133FDC24002D4B29F764B2017A4277E701BD7C5F8D0674618106BBB71EC34DB777718FD8D550AA0DD0A3AB7E0FCB0F26615E0D0674DA956C9C3F938CEEBDDA5683E2EEB9442940776F24EB22CC825EFAAD0C401F3C8004B9805EB8B9D280FEEAA3DF90975B68AB74C76E2D70C32D9D65DD84A765D269F5F8FDA72D1836AE2F766E3E82A09000B4696FF539498FB9ABDE2580EE86D820275D1CDFEF7739A0CF9CBA8C3F7EDA72D5ED07870460D23479A19C72B54B49CAC01BCF7D89055F3F5DEE29C70E9D437E6E217AF46967CB43FDD1D575915B67FB7C36408FAAFAF3C000BDE5ACCB2DE84D6BF7E1C0EE53B62ADBB7213D0737F4EB84E0D080AB6EBFA2633CF3FC379763C6ACD1D8BFEB24D6ACDA86E7DEB857B68CF66D48D7EBD1BB2DA2EA85C92EC395196D80EED610532A03E8EF96CA01F47E24DC7ABBACFA267EBCB5D2801E71CBB3A5C43F7AF02CEA378CAE91968FD168C2B9FF9290D0BA21162FFC15317111B87388751698F4982C31AB90C906E87BBA2236C8A70A25584F39955188892B0EB81CD039D9F938F75F32BBC6E7F35761E8D89B111119026F1F35DA769037BA2DF7A6E4007AF5CF5B7125391393A797CC94A5FEE7EABAC8AD7399808E08C092911DAB5A04961F4AC6BCADE75C0E6802684C7C24125A3560752BC82FC289231770FFA383D9EF67FF4B427CC368F8F85C3DBD7CD6C30B3163D628C4C647967B5F04E64EDD5B5609D0C494156BDFB2954D75A167D13FA0EA464B951B00800DD05D1B604AB786B28A6216F4F26532007D80007D9BAC42133FD95625404BC5A44FD3AF3EFA1DDD7AB5B17DD690E03C4D9A7637EE1ADA9BFDCAFF4E0FD4ECF7A7B2BFBDF3F212F6694B292A260C1F7D3B131BFEDA8BC2420DE8E1A363743DFA749A7ECFDBB8E9B62E98FE8C7553DCA71F98C7CA9934F815F6BBFDB1F36752D8DFCBBBDE57AB5EC6BB2F7FC3CE7BFBA5AFE1E5E5053F7F1FD0DF29D1315ECF85EFACC086BFF7B2BF0704FAE2AB55B3593DD352B3917E259B1DA3F30202E54763D8003DAEB39316742126FE78D0E580967622E9434A6DF1D1BB2B589B53DB3FFDCA78D6F6E5B5EFC8F1B7E0E907E7DBDA97972B6DFBF95F3F55CA82961EA3F6A7BE30F3A10530994C080CF2C7BB9FCC40E3E6719876CFDBACCF50FA61C95AAC58B2D6566D7E1EB513F52D3AC6CF93F580543213B3A023FCB164849380DE76DE2D80EED3AF138328253240D6ADD98D944BE9EC0B84F49EF4D00044C784D99E357EFBD959F9080EF167CF07D774F7D6A3ECF01F2BB7324DA97DE918B7A0E3EA47B26394F8F34B7D46FADC53BF98FDD467A0E794AC65FEFC525DE818B52F7FEE795D785F9B347836167E3B933DFBD2E7BE924D5666F65280EE6A7DA1394A0CD0DF2F9701E8FDFBE403FAD3ED4E039A2A4E6F676A78EA007DDADCCFDE7E1CE2FCD8FC37BF67D6CFE6639FB346DCBC6EBFB5F1BE5987C53FBDC8AC583A975C26FD07F7C49BCF7F8537164CBBAA4CB2A20AF2351839E116DC3BF4559C3E71C956E68C49EFE1DEE903F0DFF14BD8B2FE0056EF98C72C8591B7CE6265C6C447300B82EA49293FAF08CF3DB2907D56DB5BD0F6C7BE5CF85BA97A366FD50023C6F763F59CF5BF49CCF2EEDF6306D6EC9CEFA82D6DC76D801EDBC97940FF74A8DA004DD62E694AF74F9FB594A456106F5F3A4660A7B6A076975AC9D23E43E757748C975D96052D3D26ED33D41694DE58301DBC5F90E54D7D66FE574F2128D8F58B4AD9003DBC83EC3E609F71F9A114CCDBEE7E40D375E919A4B6E2EDC4AD647B8BD6DE8266E74C7A0F8F3C3B8A3D8794E8D9E5CFB6F4187F467FF8E7CD522F602A73F2F401ECB92FEB7AFC1867027F46F97348D7A044CF5B59FDA2CA0D20B5A0BBD4C794CA00FA87EF6502BA9F55344729F1F39D6E013435064F6461F5EEDB010468A9E56D0F76E9434A30E51096363EFDDB1ED0D2878D3714019A37309DC3DFEA04D590B040B4EFDC1CF562C35158A0950D68A9FB83E04D1D840025FDE4AE32A0C774446CA0132E8ECC224C5C79B85A015D96BF98204B89ACDD6307CFDA1E7CDE16520893DF31B641146B0BFA74B677716467E641ABD5B3F2664C7C8FF51D4780B6777F507B10A0A53ED16A01F4D0EB1C3D7AE51E5F7EE40AE66DBFE0760BBA22403F30FA0D66E90604F8319F74598026B8F397B33DA0ED7DD004D9AA02BA3C78D3F3C78D21B701BA733CA674A92FAB2D0D3A1D76ADF84106A0F7ED45825C402FDAE51640F7EE5BFA136FFCD4FE78F989CFAE39A069E0E29BCF5683069B6EBDBB3BBAF56CEB19801EDDC17940FF7CE49A027AD7D6A3F879D906D69973730AD0AA6DA30A014DF9785BDC39A427E8E5C9A14F8393BFADD88CD4942C561E7D25D5184087FB63C9D092414C594FB7241303F48E8BD714D0F4727CE7E56FD0B8592CEE1ED61B1FBEB3A2940F5AFA85C4AB2EB5A06B15A03BC7CB6A4206E81F57C80474DF7EB20A4DFC62B7D3803E75FC2236ADDD8F9B6FEF82662DEAB34F9D675F9F68F33BF38AD09B70C4845BD82711F995922FA5B1F38A0AB578F08961080D0FC2A205BFE0E09E53CC1D21D782EE7B47578C9F7A272BF3E3F77F4483C6F5988BA341A3684C7974300C7A233E9BFB333445BA52839B645DFDF0CF5BB2017DE97C2A1E9D359AD593C0B2FECF3DAEB3A047B6776E90902CE85547AF29A02B72719465414B3BA8BD8565EFFE90EBE2209FEA132F8C65835DAB966FC0A7735656BF054D801E52F510B3E54752316FA7FB014D63472BBFFB178D9AC6B028ACB20602C9A7CFBF40A583848E004DCFE153B3C7A345EB86F8FBB71D786DE617A52CE803BB4F62CEEBCBF0C25B931DBA38EE4C7C14CFCC9EC08210E8CBEC9D9796B0F3AAC582EE1487297201ADD561D7CA1F65007AEF1E24DC2C13D05FEEA912A0FBF42BB190FD03FD70C32D9D586350A246FD62C12FB86B68C99AB8770DEB8D1347CEE3AD17BE6650A32880EB8B43A5A8A19AB5AC8FD0B040FCF9EB76D6184545DA4A019ADEF8345897969285479F1B839CAC7CBCF7CAB7E875730706E8837B4FE18917C7C162B660E79623AC9EE4E2B87368EF52803EB2FF0CB31A1E787C28F47AA3ED18758C796F2C43FD46F5583D7FF9611366BE3A810DB4B8C4C531E23AE72CE8AC224CFCE5D83505F41F2BB7E0CCC9CB4C5B6A8BE87A61155AD0D2B02F8A2EA03EC52D687A80776E39CA421DAD9FE2076C16F42FDF6F6483BE6326DFCE069638BCCF9F4EC682777E804AE585F8065158B57C23B3FA1A358DAD5E1747B81F960C7202D04753316FD725B758D0BC5D48531AF0A3F11E7A462849014D2F484AFCD926BF2F85E5D1E0380FA5ABC8C54180EEDEBB1D8A0A34F8FBF79D98F0C05D8C07F485959591CBCAFAF7AFBD3640DFDEED1176BCF5754D70EBDD3D585DF84B9D8CB6D52BB7B081407A0E9B348F6306DD98FECFBBDFC5D1310E533AC5C932769905FDF34F32017D535F5985267EB5B7D280A64F59FEE0D045E21A4431CB599AF80020FF5BEBF64D1019156A1B180C090D44FB2ED69D0A8E1D3A8BCCF45CF66F1F5F6F160D909A9CC9E0479690F501DD6F1BD8931EE3FE447AA02945C786A3651B6B60F9BE9D27405602257EBD0B675370F19C75DFBEC41BAC7E427277505D2A3A46F94E1EBBC05E00AC73ABBCD0F3C6F6AC9EE427250850DAB6F110FBBBDC641B241CDECE7940FF7ADCAD80A6766A9A100F5F3F1F68353A9C3A76D1D686FC7EA5EDCEFB059DD7B0490C8BBC909E476E8CE44BE9EC541AB4B52FB3BC7E415F6C9468509ACAA4FEC8274548DB90974BA182E42A91F60BF27BABD42AB9CD243B1F1B2424400F6C23FB1CFB8CCB8F11A02FBB1CD052BDA5CF1ABFBEB47D793B4ADB903FA3D456A429FD2E7DEEF933CAF5A617A5B47DE93A74ECF0BED3AC1F911B8CF70B7E3DFEFCDAF799DDDBAC515E94384BA4CF9AFD735865F18B4F319C0DBB0000200049444154B44571748CC5948E7201ADC5AE553FCB00F49EDD48B8E96659754CFC7A7FA5012DABE06ACAE4CE019FEAB8051BA087B5456C60D5378D3D95A5C1C4DF4EB815D0D5A1474DBF0603741801BA55956F65F9B134CCDB9DE4724057B94275F0441BA03BC4604A47ABF1E528310BFA97557200BD0B0937CA04F4920302D08E9477E3711BA087B6711ED0BF9F148076635BC929DA06E801D658E3AAA4E5C7D2316F8F007455B473D539A500DD214656B1069D16BB7EFD5506A077EF44429F1B65159AB8F4708D06B4AC9BF4E04C36400F6E85D880AA6F107A2A5B8B89ABFF1380BEC66D6D05B42F96DC296FA3D1B2AABBFC4406E6ED4D1116F4356C4B1BA0AF8BC694F6F564D5C4A0D761D7EFBFCB00F42E02F40DB20A4DFCEE8800B42CA5DC93C906E8412D101BE0848B8300BDE6B400B47B9A4976A90CD0A1046879FBD8950DE84CCCDB27002D5B7437642C05E8EBACE3608E127371ACFE4306A077EE40426F79DBBE272E3F2600ED4879371EB7017A4082F316F45F6705A0DDD856728AB602DA074BEE90B78F5D99803E998979FB5385052D477037E5B101BA5D14A6B48B92751506E83FD7C800F48EED48E8655DFBC2514AFCE18400B42391DC78DC06E8BB9B21D6DF0917478E0E13FF3E2700EDC6B69253B40DD0B7C9DB85A34C409FCAC2BC036902D0720477531E1BA0DB46624ADBF21788925EDEA0D763D75F7FCA0474CF9218E48AEE2171C54901683735B29C626D80BEB3A97316748E1613FFB920002D477437E661800EF1C192DBE4EDC25136A0B331EFA000B41B9BC961D13640B789900F68B2A0FFF95B06A0B76F43825C40FF784A00DA6173B92F830DD0FD9B3809681D26AE1580765F4BC92BD906E85BE52DF25E26A0FF2340A70B0B5A9EE46EC9550AD06D22645D83B938D6FE2303D0DBB62221B1A7AC4213579E168096A5947B32D9007D7B23E701BDFE92B0A0DDD34CB24BB502DA1B4BFAC95B43B84C409FCEC1BC431902D0B255777D461BA05B87634AEB70591760805EBF4E26A07BC8DBF63D71D559016859F2BB27930DD0B73544AC7FD567B69DCAD563E2BF9705A0DDD34CB24BB501FA66792BA09509E833B998773853005AB6EAAECF680374AB304C69256F5717E683FE77BD0C406FDD8284EE3D64D53AF1D7F388085362447FD7AF8D2BAB02753CD3BF3BB43879D68895B7D4771ED01B93715D4B357A75A9FAB2A575BC399CBEFD4FBE2B4042B03796DC246F7A7099803E9B877947B230F0163F663C8954FD0A64649BF1E39A22DCD73214535A86CAAA0003F4C60D3200BD65B36C40F7FFEB1272F46659151099DCA3808F5281E57DE310E357750BFA4C9E1E0F6CBD8242A3C53D9514A5CA56A05D980F3EEF2D6FF6595985AEBA908F3947B2201E4BD992BB25A39702B8BF6528262684C82A9F017AD3461980DEBC0909DDBACB2A746D721132742659794526F728E0E7A5C0AD7101F05729AA7C817C83199B5335C83388976D954574C189D482B17E2ADC10237FDB33FBCB5E2C34625F86165AB378D9BAA049AA5C845A01D0CBB66588BC09640CD05B36CB01F4462474E956E58A891385024201A18050A0720A30406FDB2A03D09B08D05D2B57BAC82D14100A08058402555680017AFB361980DEB801099DBB54F942E244A140752960B158401FF2791919C84A4F8351AF8752A140786C2C82C2C2A152A90085025577FE54D79D88EBD4750518A077EE281FD0050505B8BC750B52BF5C0CB3D100D6F345120A5C73058A3BA2055058CCB098CD5058E81705A05440A150C26CB1300813AE554A6BE402FD9B76C0A1FC2090B3FC4AEB79F4634B02DFD7BC894505A05028E0DBA4099A3CF50C222222A056ABD9DF28294C2693A5A8A808A9A9A9B87CF93272737361341A856C42816BA7004158AF8745A301B45A78E5E6409D9509EFCC4CA87373A0309B411634C1997A2AC19828AD54ABA1B258A0A4F38B13C1D91814047D44240C1191308584C2E2E707859F2FE05BF501B96B278EB8726D528040ECE7E7877AF5EAA17EFDFA080D0D655F7F36409BCD668B4EA76360CECECE06C1DA6412D119B5A913D4847BB1984D306667C3989303537616909509A4A743919101456161097009C83E3E30F8FA41EBED0DEFCC0C98743A1428BDA08B8F4390AF1F7C755AA8345AA8B41A28B5DA52B74F70B6444402111140743D788585C12B2404AA901028BD451C784DE82BB5AD8E3E3E3E08090941585818020202A0542A4B03DA6C3643AFD783404DD6335927220905DCA500EF5FC68202685392A14949863E351586D45418333260CCCC80456FDDF49525A512E6E060988343D88F29240486C040688C4644FCBB0E3ABD1E3941C1D0F4EA8DC0C828F8984D50E7E7C3AB201FCAEC1C78E5E7C12B2F0F8AFC3C40FA75A8544215150D556424D4D1D1F08989856F5C1C7C6362A00EB6C6B0724BC65D5A8872850204646F6F6F10A8A5EE0DD6FFC882A67FB04F46F2D915FF5BC826147087024529C9283C7F1E0567CF409392027D7A3AF4599930E65A37FFB525B274C3C3618E8884392A1A0808802228088AA06078F9FA322BC370603F14EBFE8141A984AE556BF8F7BD0521A1A10CAA068381191D0672931414C0929F0FE4E742999909655626149999405151C9F5140AA80283A08E88807778387CEBD54360B3E60868D4187EB1B1F0F29617D3EA0ECD4499B55B01EAAFF4437DDADE2850588ACD196135D7EE4E70ADEECE505888FCD3FF21F7E851E41C390C436E0E4C4545301615C1623094AE5678382C71F130C5C533382B7DFDA0F4F385CA3F805918F4E3EBEBCBFE6F361991B6E833E84F9D623E65EF21C350AF5367F6A9C8014D5F845AAD967D19D20F8D961B8A8A60D66860D669A1C8CA84322505CAA42480DC2AC5060A7B48BCBCE0E51F0095BF1FBCC32310D8AC1942AF6B8F90D6ADA10E0CBA56728AEBD66205CAFA5AB301BA16DFB7B8B56A5280BFE43569A9C8DAB717D9FBF7A1E0CC19180B0B61319960B11F7CF6F1016262616EDC18A6F8FA4040A075A08F60ECE3C33EF9E887A04CFFE790A68E9C7BFA342E7DB21006F253C7C42062DA2388898B431059D90A05FB1AA4B114B2A4B9354DB02E056C72E9E9F5301A0CCCCFADBC7C09CACB17A138778E457F481301DBFAA34250CB1608EBD819611D3B22A041C3127F61A908916A125D5CA6562B20005DAB9BD73D37C7414CD0351B8D6C902EEFD449E41C3C809CC3875074F162E90B2B14B0D0E71BFD040642D1A4294CF51BC01C5D0F0A5F5F366A4DBE377B20739F1C81D98B2C5A0264B1FBE2C2CA1F91FEC7EFCC1A56F5ED87F80183101919097F7F7FF6A9C8E2A48B7F08D6F443E32B1CD6E4FE90029B8FC110D429AF3239095E17CE4371F9122C3939CCBAA6E8117B70FB444723B463478477EC8CD0B6EDD80B4649A3F05E5EB6903EE1C7764F3FAC0BA50A40D7855676F21E39902946DEA4D1C2585800437E01728F1F43CE9143C83F791246F2F14A93B7372CE4B7F5F165111396F87858E2EBC3121AC6804C3F7C60845BC8DC4A2658D3710232C1563AAA4D7529C8CEC2E90FE723FFC001C0CB0B010F3C8406ED3BB010252A530A44DBCBC40ED8046229B0B91B845BD8DCF236190C0CD0CAD4142BACC962D7E9A0A0414C72D1482C6DA58F0F825AB44448BB760869D90A3E915150F9FB434523F36AEBB66402D64E76C63A76BA00741D6B70B9B7CBAD4F02AF36231DFACC4C14255D46C1850B283C77169AA424E6B6B02502504020CC0101B0909B8106F6222381A8682809522A95CD4DC12DE5B280CCAD643E7022851AD589A09ABA67172E7DB304FA9414A07113D47BE021C4C4C4203030D0666597779FE5019BCAE5C026384BFDD7645DB30147830126AD06484B8322231DA081C6BC5C280A0AA0A01794C48543163459D734C818D8B429FCE3EBC327228241DB9BFCE464610B60CBED8E75369F00749D6DFAD237CEC165D2EBA04B4B83E6CA15145DBA88A2E414689293A0B9920203455A4806D228B2822C624B6808FBBF223C1CA0FF878543EDEDCDDC16DC4AE6BE64FA5D6A2173204BADE4F2C04575D469B5B8F0E30AA4FEF13B2C14EF3C78281ADCDC97CDC0A2807F3E122EA759A503E33C8A89FF5F0A6CEEFEE056361B70341860D4E960C9CB85252B0B168ADBCECD8532271B0AD2C9EE8B42151808DF9858F8C7C7C32F3E1EFE71F12C3AC42F2E1E5EE48B17B096D364752E8F00749D6BF2921B6680B25860282C40C1B97328387B1645172F409B9E067D5616741919304BE391C9EA8B8880393C0216FA090B83323818CAE01078050430284B812CB59009CA04633E4B4A0E90A54DC32DFABC94149CFBF20BE4EDDDC3FCD9C1D36720BE6953E6DEB08F21AD6CD396056CEEBF960E3812A0B90F9BC39BFE4FD129E6DC1C6B485F4EB635A42F3303C8CA2A6D5DD38B2B2C0C3EE164514722A0491304346CC4AC6D5FFAEA10B0AE6CD3D5DAFC02D0B5B669AFBE31E9E73D4D0EC9397A1479278E337785213F1FC6FC3C16FE56CA4AA678E47AF560AE17C306F594814150F8FBC3CBDF1F6A0A6F2B0E7DE36E0B1E69C1FDCCDC8F2C8DF3E435AB8C3F96EA4E904CDBBF0FE7177D06435A1AD0A60D6226DC6B736FD843DF99A6B587B574C091EAC181CDDD1F521F36738768B5301516C24CE184458550A6A6C22B3D0DB89202486646521DD9CB2D3010AAA060665507B76A8DE0962D11D0A00194EAD23E7567EE499C5BF3141080AE796D56A91ADB66ED151522F7C40964EFDF8FEC03FB98854C11182CF4CD7EE66854141BD033366A0C0BF99069504FAD869A42DD24A16F3C26D9DE6D611F785F1520DBDF249BEDAAD1E0D29A3F90BC74295B12C967F418D4EFD587B937E8055119F7466544B49F23207DD1F170BEF2FCD734E8C880ADD382061CD917495626BC2E5D82F2D24520230390FAF269D20245AB50644B501042DA5D87B04E9D11D6A103BC838285755D9986AB057905A06B41239602088594198D309B4CD0A6A723FBE00164EFDB8BFCFF4EB14FF0526E031EFAE6E303456C1CCC8D1AC3D4B021E01FC0DC11F63E64F2F1961769C1A12C1DDC73A5B464B1E6255DC6D9AFBF42C1BEBD40541442C64D408376ED58ECB3B3EE8DAAD6D51ED6F6C0E62E101E1D6203360D389A4C50141640917419CACB97818B17009DAE24A44F522902764093A608EFD205611D3BC13F2E8E59D74AB50A8AE255FC846BA4AAADE8B9E709407B6EDB5458331B94E9D35FA301CDD8A309218517CE23F7D851F64353A94BB92BBC54B0F878036A6F202418888D87393E9EC18E66ED1194A533F6ECDD16DC8F2C0D7DB3ADBAE5C6491A2C7AC36040FA91C338BB601E4C14F6D6AD3BEA0D1884D8C68D59EC33D5DD13922D24B138F6BAAC093357CD70A401478A27D7EBA1484F63E17C484981222F97019B85F4D94DF2A10891E096AD10DCA60D0BE9A3D996E476A2B03E451953863D411B5187CA2B20A67A575EB36B7E06455AE8737260C8C9812E3313F967CF300BB9E8C2056BA445894F814D83869F3F2C01FE405838101BCBDC168A9050781547599435B027755BD803B932BE63578845D0D31616E2D29AD5B8B26C29E0E303BFC14311DBB317A2A2A3AF8A7D76C5355D558674C20CF7A34BDD217CB091FBB0B94F9BAC6B364126ED0A14A9A9B0646640595404057D05D10A7D92681AA5B737029B37476093A6086A9E00DFA8683608A9A6A52BA9FD45AA110A9439D59B2F9674A5508BAD4959D018C552A31ED59AC5338EFDB50508CFCD42784116FC32D3A04DA655E052A0A54127C9C3AAF55221D3DB0FE9F4E31B087368280B81A3F037F8F9C14BA5663F349D9AA22E54DED615B4C8C76C3D669D1CE2A5F482822D8A4F0B87172F1E5E5DEBDB5B006F830E26A5174C5E2A982D66B65646E35FBE05CE9E4672783492FADC0ABFE6AD1010140C259B61E851AD765565AC6E7E9ADDC856232B5ECFDA0CB389A6A45B63B0E92B81A69E1BF4D675438C06EB34749A2064214B3A3B0BCAEC6CB63E76A8B610D1BA2244E98BE06B92ACDF4EF1D7E1E12C7C8F061C8D91F590191C8EECE070E4FB07C1AC28FED2F070BD3CBB355D5B3B6A8A06417EE8533F823D6F5250B3D5ECE86DBD33390BBF5FC842C7D870D75E5D94566905582C2EC5DAA6A6407FFE2C74E7CFC13B3B0321857908D2E4C35FA729B5959339300886C828E8C322A0090D439E8F1FF2BCFD51E0EBCFAC6495DA9B0DF0B1D8646F1F2B8CD5DEF02A9E92AC2C863114927568D9035CFD4F31DDBB3EE932749BD681D656F4EF3F90458EE84E1D47836F3E829A1649EAD403598937C32F3A063EF449AFB0AE0256B39275CB2EF61FDB2C4702B6894D003291CB83AD23A287516F5D3384AC6B82362DC5EAA7D3205857C47EFCF36843832CA833D3A1CCCFB3EE3A539C742A6FE4F907B11F6D781454F10DE0DDB829BC1B3606CD7C64ADECE96FB79AD5B095AEADDE64C6FEA434BCD5BB150B43950E76B31D55A8E1379E4FC5A1423346B76B52E90B88139C53C03649A4B000DA93C7A0FBEF14F417CEB2B591CD05F930D9AD636C51AB610C8B80AE5E0CF451F5D82E2134B00716FE56128F6C8DB8F02D8E4F2640ABA1F252318B53E9A58492C0267963973CA7D50F66AB82144A6746C1F62DC85EFA250B4F0B9BF6187CAEEB84CCEFBF81FEAF3F60F20F80B9FF4084F4EC83B0F00878FBFAD602C0145BD67CA9DFE2DD6208D6F4C35C224603B3AAF5E4DED2E9A1B7ADD0A7835943A17C45405121BC7273E19D7E05DEE9A950A7A5D29649259D931E7EF2550705B1979E4FB304F8346F019FE62DA18E8A622F646B1FB856EDEFDC735453CF2E3218F1FEE68378B76773361BB6D482FD04E8C2C2426C387705C70D2A01E86A6865DBC83FADB6967C19DA13475174601F0C17CEB14F598B5E675D8A536209997D7CA06BD018BAD838E8A26360F60F601690978F2F543EBEF0A14922B4146771289CD587EC0D959AD6B4A091FE92352D6C037BFC5E3DC482620B1A190CC8DDBE05053F7CCBC2D17C060C855FFF01C879F16920330386FA0DA11C320A11AD5A233028987D0DD42A0BB0B8CDB90D2C8DBFA63D16AD6B8810ACADD6359B3443A17CF47FB6A4AA0E26AD967D81C1A0876FF225F8255F86F79564280B0A4AF76E5AD889D62E2137575C3C7CAEEB08BF36EDE09BD04A58D6D5C0017E0902F47B1BF7E38D6E8DD8AE2AA5B6BC2240D3A6B1EBCF26E3A4C9072385055DD234C533ED6C0ECECA828C03963E614D14736C6271B0BA9347A1D9BF17DA83FB61CECAB05D8F3D94C52BBF59542A18C323A18B6F004DC3C6D0474431CB97ADFC563C63CF9BC05CBC14A7756A3501D93A638FBD858BA15CFCB4556397ABDAA5084034953BE7E07E687F5AC696FEB45CD7115EBD6E84F993796C453C43C72EF01E3402016929306EDD04FF9E3720B0F78D564857B67DAA56CD6B731607377787144789306017478130EB9AD6BF2E5E039B7E67BE6C8A773719A1CECC60B0F649BA0475F1D88575853E73699BD9CF0FBEED3AC0AF4B37F8B668C3B605A3303F5A6AB5CACF02FB40A299AB66902BADA6F4C9EA686C0D59D01BF7E3F5CEF5CBDE34363F3F1FFF12A0CDBE18D156B838986390A640275D8621F9125471F150C735280E5F72F4F967B57DC84F489F9E3493CC989106DDF163CC8FAA3F79AC54C81441875C1666B537CC3EBE30C4C4401B5B1FBA9838906FD91A8F6C1DD0F3F6F6818F6FB1DBC2A704C8CC6F45502E8654C94083A3BA5647F7937F0D8BC50AE8ACD3A7A0FB693954278FC1141E01D07A15470EC144BEE8DE37C18FEE75F3BF6C1D0C655434EABDFF91D59F5E237DD1F2F5299DB3B89F4997542D7687988CB49B0C59D9D68D0AB8754DFF27EBDB4481009A42F8A624C1273909EA8C3478513CB6410F2585FA49D75BA1094AF51BC2A74D3BF8B4B90EEA7A3150F8F9B3D98F647997BC142BEA6BD6BA1AD252A13F730AEA060DA18E8967D017EE148000FDC1C67D78AD737DB664EE55BB7A73409F30F962445DB7A0A9C39B4DD09E3C8EDCC51FC3989C04DFEE890899FC109B8A6B75D1493A23B76CC8A2217F714E16CC140277E922F4E7CF407FEE344CA9A940F1483B1B13527BC3E4EF0F939F3F4CC121304446431F6DF527B305EB556A2B907D3894ADAE0BA9852CB5924B8DFCD6602B922C68B2F8B25253A0FD6939BC766F8785E29B556A28755A1849AB464DE17BE6141445855637CF4DFD103E78147C8BD781AED55674792C97B8454843BEE093D57F6D80D140EB6097F65B5BDD21D615FAC898506567C23BED0AD4A92950D11E8E5A0DBC0A0BA1D0EB4A59D74A5A08AB49337893DFBA7E43A8C223A0A490CDB0705BFCB57D1B509DC87D95BDF8136837FC0375424B040D1D0DDFD66DD9649B3AD96692B62440CF910BE8E17519D034384333F00EEF47FEF225305EBCC0769056F5E98BE0C123E01B1A566A8495DC15C6B42B30A5A7C2987A0546B2B82F5F80293909661AD82B4E168582597FC6A06018E9FFA1E130444432178685F6D82B5EE18D222C4A7CC8C551172CFC4DC57E4AAD8D4C837B1EE643AEAA2D582294850123373B0B85BFAD8472D33A2825DB6259945EEC6B83606D080E81B66357F8F6BD0DE131B108A0DD588A17F477BA1E35BD003B7748C9824F46161D422E11F261EBF556DFB56D3BB06277084582786565B2A810554E1603B63A2F976DC22B8D1051F8FA41151307557C7DA81B3686574C2CBC22A3D946BC5E926DC1D8347D9D0E39BFAC8071F5AF5090BBA5452B040E1A09DFB6D7313F785D4E04E8B972007DDCE48BE175D6C5618573D1AE6D285CB502A6CB1761F6F282F6BACEF0EE773B429B25C0DF3F0096DC6C182F5D80E1FC59182F5F84293303A6AC0C9873B26DAE0B66257B7B431F1E69FD098B609116E6A0600664859F1F0B7763B3F6D8564E3ED6752E282E9962948B07F628D2823EDB4B5C173622D7D2FE6C5DEFB9202F0FB91BD741F9D76FF0A2D9749244DA6AEBC5A2B04317285BB743786C3C42C3C3E1439FDD5EE4DBAC596E1DF7376419112236FF7549FCB57D848841AF6510A7F5AF09D84A722715E4C12733033ED95950676740491BF24A1259D7F4E3151109755C7DA81A35818AC2F922A3A1D5E99075EE2CF46BD7C0F7C06E284D2678356A82C0E163E1DFA96B1D734F956E7502F4BC4D325C1C04E8617511D0DC723EB817052BBE8589A6DA9ACDC86DD711BA6E8908F5F5454056069417CEC194960A4B411ECCF9F9B0684AAF6D419FE0BAA87AD090BB22321A165F3F16FEA6A0D0265B7445692B9906F5D80F597F3CD28206F88A5D15B5CE4AAE8848346DDD6C4651413EB2F7EF8162D5F750A5A596FA12D1D48B456EF7DEEC333B242A0AA1E111F0A3CD5DC9075D3CC5D9FDD0ABA157B08F10217708A8AB9BADB1D7B65D6668B20CB9447874089F3CA38399DC1E9A22280B0BA0CEC9826FDA15F8A45D812A37A794750D6F1F288BC3F994E11150346A8A82D070E499CD50EFDD89C09347A1341AA18CAB8FA029D3E1DBA2B5DB16BBF2F4D62240CF9703E863265F0CAD6B80263853F4C0D1832858F635CC17CF5B07088382A08D89876F7616545A0D144603406B224806502C5E2AE8A3A2A1896B80C2D878188343016F6F2829F4CDB738FEB838D282BB2EAC16329FB157126D61756DD742B745659E8EE2B6D06A34C83CFB1F14CBBE82FAC2395602B9890AE2EA233BF146F8356C8CD0C828048784C22FA018CEB53D8AA3323ACACD2B05368DBD14C761B3BD268BF770249788BED87F6D28768710B8597488566B0B0B5515E4C32FE512FCAF24C33B2589C1D796A86D680B342F154CDEDE30F8F94395970B75A135EC4F41BBA64F7F12BE2DDBD4494813A03F940BE821750CD066B309FAD3A790FFF90258922E3BECDAA6804006E482468DA189AD0FB38F759121DBBA16148BCCA22D7C6D6E0B1ADCB3F9908BFDA4D5B1C890C39BF1C00CD65D5334C8A6493A5F7F0AD5B1C3CC6991DBA00932FBDE8EA0E87A088F8C42504828DBED9B74AF5571D01ED226D23544C8F5C736D3B5C560170F38DAE2AFAD96365BF0C968648B3BF9A52621E0E279F85F3A072FDA12CCC17D31483FFC147CEAA0254D805E2807D0478DBE182C13D045855A68B43A0FE94E55AB067542BFF42468BFFA1896CB763B5153589005285478411B1C0A4D7C431451F85B58048B2AA019792A6F8AB690FA90A5037BC5F1C8CC8F4C33B468D69E6BA7D5AAD52A0405FAFDBFBDF3008FA2DAE2F83F7D534880449A020A22F60E4840408AA4808A58F0292A3E8C140141A58874E9080822D828FA0011450445514A22A0204BB161C702811084501292EC6E92F79DBBDC65B26C92BBB39BD9C97BE77E5F3ED89DB97377FE77E63767CE3DE75E9F5EEDC952CACBA3398BEDFA44F4732DEA13B2CE4E934F7FDD2A847F63C591FA8D70AA5922626A26208E6EE4D8589121E94CC0A9E8D6F7F30F0460890847748CF92621A2688DDCBC7C918DE9CFA28535BD5DCA19FACE0D389E7587882CC773F388D01C2334D748C4F1A388CA3A8CC8CCBF6039FE0FA2838A11EEA1DB82292AE4FE47E1A8DF182567EF177F9E8751C70A090E465434196ACE85822B2A04E8F95B147CD0DF7B01E8F90B5663F7DE5F2B6ADBBCDB4B4A105662478FFC9FD0B8F8142CCE99114A95ACA2106CB35BB0BF3802A783C2702A380245C10485B0B3E9D261622E5EE79F73404F264C0867C5390772A5E8D0A07E2D0C7AF21EC4C645EB3EFEB17F4EE2B537D762FF1F87751FC3AF15455C6F311CB6025C6ACB46883D1FDF144522343C122111D10809A389F94344B243A0D292AFBBB6319EEC77B75F4FDB1F07FBF6DBDFB1EC9D0D3876FC5C04913F8E5BFA189423E09C42C439F993336780FA4C84F8151789BFE2624A8EB10BAB3BB8D88ED8E242C4C2817A4185681B968F8B424A4FCA46C7B321083F86D4C0A7E117232784E658A1368C7F00FBAA595C6C34BA776B83962DAF563A14017A812AA0EFBC522D5125ADEF74444706E186ABAA66880C5D5821B602D4CF3B826A79271173261FE1793658F21D08B39DCBAC729400C7118AC325E13858AD06F29BD4454854C4D9013D9A45CD99C156FA35BBF22FAA5FFEB023FB583126BF9086F8F838A50BC1D34E070E6663C2C425A8573B048DEA53E240E08B00344D689F9F87429B4DACE8425993A194DA7E16CE81FA955FED29142EAC97660E0CD44F28B3DD0D9BAC7877E5665CD3340C71D58C9A40EA9C61730ED6CE5C0211DE576043C48F99B830EF24EAA21009410E846A6E0F7B6810F2A3C2608B0E437E4C148E45554776543C0A23AAE6245879F925D8F3830D5D5313D1B54B2BA56B8400FDEA56450BFA0E45403FD1773AEAD50AC1E07F3B97E1A94AC519C85F8282FC429C3A91879339A75178E20C824F1620F474212CB93644E6D91193E780E58C1D4167AFC1E2F82814F5B809A1B5AA39012DE07CEECC8DF485AEF8280FD6EF6C98E42BA00F64E385494BD0FAE608DCD9292AE0DDE87C9DA68845070A0B9C596F1476181E118AD050E703D1489DDD051935F3048282C331DB8480DEB8D18A77DFDB8C86E9E67E00001894494441543EFF8A41E3866AAFD7FEECF052EB38163B23721C874F2274F92E716F099B3B0828B484222F260C6762C2504070AE168E92B84884D78C415C8D18C4C5452322325C844D06B2AFF5689379C481D90B4FA38B97807E4D05D0DF392CE8AA08E8BEFF0380B6DB1CC8CF2F407E5E210AF269E219FAA3D84F3B82CFD81156E84044810331A76C88CE73A0A44E2C42DA5C0A4B02A56007F6E291807EC147401F3C908D892602B4B889CF3E4045F85709101C1C24FE020D67FA6D12D0334D08E84D1BAD581940406B812616277014A3202717451B7F4648E649E4C685233736028591A1B05B425014158E104B1822C2C3106E0983253202515116444653D62C256605F661EC0BA0535313D145D1822EB03BF0BA0AA0BFF502D0FDAA38A0497CB2A2C50ACD8E22D8ED34E94C110A690E8342BBB0DE68E0ACC85E04388A10161484A8B868C4D58A4374B5489735A7A713FD5147027A828F803E70201B934D0868A911DDE8668A7891807ED1A4807ECF4480A6FB8906A04F669D405E4E2EECF4B619162CDE88222268D2AF3084478489C1B4F070E71B122D18E15C34422E1251F9EE427FDC8FF218D2822640A72A029A5C1C6F2A01DA6E4117450BBA7FBFAAEBE2D07608419ACCB44F567F89C399FFE0A1B414016CBAB808D0B6429AC7C019D369B1842326360A9648CAF80BEC1A7812D0E327F8E683260B7AF264F3B838CABA59A86F263DB70873973CEBCFFBC9EB634940CF78D17C3EE84D9BAC78DF4480A6689282021B724F9E41C1D9882FB110B18073A8B09245886AA8762A5C67975435D7863BA05308D0A9EA3EE885DB147CD0DFD82D485504F4804A06F4BB6F6DC0E2F96B111DED0C679AB3E419D4BD30017BBEFE19C3FBBF5C2A72416EA3FDD67DB00D2F4F7BF7BC7A15DD89542F2BF3181EEDD75500BB5864173AE7DFA50B8D404E6E0DBAB008CEDA550F2A3A76656C97801E37210D357D1824CC3C908D293A004DC0ECD9750C6AD4AC264E6FE088FBD1B2EDB5429B76D73C810B6AD7709D76EF4177A1437233B14D3C045347A16682736053BBAD3C9DCC06E869260474BAC9002DDD1CE44A74D00AE6414102C602CAAEF0D3B3095A5578922FED752B2DE8E4D444A428029A5C1C8B54019D72855A14C7C0FE956B4113A0A9DCF77047F1EFAD573E8E2DFB5E1780DEB2710F068EE8E1D265C023D3D16748775C755D2301E8DCD3F9E7D52BEFE63F7DEA8CB0A063AA4522A59BF3A9F7CDAE5FE0B0533C69096AC4C7A2C125755C3E50BA9608DADFEDFEADD4619B5ED550C43F1A5124A0C712A06BEA8FE2C83C988DA93A013D67F20A4C7EB9BF385DEA83E726F5120FD17B3B0EC7CA0D535C32BCFED26A5C7E7543DCDAE1060168AD253CE2C97902EE54AFBC427D4E7D2FFB7DFFAF993899E3CC44A3D764EA7BF7F2EDAE5F4BC504D7B930BEC2762AEA3B69414F9D613E0B3A7DB315AB4C6241938E72C057C651D377EEF3CA54554BB9ACEBC405E8944424AB02DAE1C0621540EFB55BA00AE8412602348925A1A007D074E313A00930543E5BBB1D5347BF853BEF6B233E47464508EB9020202FA8158B3FC391C3C7C5F61FBED92F1217464C7CB494E558D1CDEECB7609E831E37DB4A00F66635A25035ADB3F7A01AD85FEDE9D3F63D60BCBD1B8E945A85E23465864D437ED3ADFE49294FAF0E77D7F8BD8DCEC2339F8F3F7C31830F43EB4B8552D36B5ACBE91809E6246406FB2E283F70317C5519666DAE88EFF3520BB9FB30474923780B63BB0E44B0517C71EBB05C98A16F4600301BDF895B578F3E535655AD065017AD9C2F5983FE33D51AFBCE20EE85E778F47FBA49BD1332D455413EE8F43C7F058FF3B5C87496E31109FEC98233E2F9CB70675EAC5BBAC6F5FC0AB5A57027A941F003DC347407FB16137664F5C8E79FF19E6D1822E0BD0546FDEF4F7307BE1900A2D5B2DA0E74C7E0794C94A6F4DD56B563BCF2AA7F6A80FE72C7E06D562A384E5AD7D00AB6AEC693F023482C331D98480CED864C56A1302DA17BDAB5A5D09E8CE29894852B5A0ED0EBCAD0AE82445400F3100D01FBFBF15F5EA5F809D5FEEC398E9BDC52BB22717873BA0572CFE5CD4A37D474EEE25EA51D9B5FD2711FBDCEAB6EB4AF5BB27405F50ABBA184DA6927DF8385AB5BFCE94807EDE0F807E5127A0FB3E3005575C7B09C8DD90D22D11F73FD249844AB9BB38DC01FDF8BD1371CD8D978A7AF4207CA44FAAA847EE0E59BA746F5DAA9FDC01FDFDDEFD88BFC0E9DA292CA089E71DA506102B1BD0934C08E82F18D001E7B916D09DBD00F47F5400BDDB6E41D2E56A3EE8A79FAC7C1FF43F4772D0A94B0B217A932B1A887F5500FDE76F87CEABF7D3F77F62E4A0F90222D2AF2D7BD313A09F1AF900A2A29CCBD253A1412D0904FADCF6EA3434BAEC22B1EDD60ED7E39E073B20B6BAFE946B6FAF2C69418F1CE7BB8B63E614EFA338C8553179E4620C18769FF8E91736A8E5F2BF5704E8514F2DC0B0F10F8B7A752F4A404C356782CCAF3F3AE743F9FCA31D48A85DA3543FB903BA76BD78DCD8BCA94BB6C8280B2E6A58CBF599004D83BC34A776C34BEAA0EFD3DD41757C2DD2829E38DD7C3EE82F365BF1215BD0BE76B14FF525A06F4F4944E714B5280E1A245CFA95828B8300DD5911D0CF18006852CA134CDD0709E50022EDEFEE83D6AA5DD6364F80FEEDA703E7B946C8C27BAC7F57F1B0D0BA38DC7BB4BC6D3EF5BEA6B204F4737E00F42C9D80D60E126ACFCB1DD0DA814095680CF701623AB63BA057BEBD110BDF1FE57A70BBF7BDD68276D7BCBC6D15F58F04F40B2605F41A0674455D58A9DBB580BEDD0B402F5301F42EBB05B73755B3A0870EA85C0BFAE3555B8590A977B72E25280DC88D7DFAB552DF692306D2D7EF425E5EFE79F5CA83371DF3930FB6E18921DD85CF92CAA3778D455EAE333D5500E2E18EF8F3F743B8AF67475C7C693DF17A3EACEF5CD7F6071F4F466AB756220C8FEA2E5E3DB6522F0409E811E3D250C387288E4399D998AD03D0D95939220C72E838A725EC0E68EDE767C7F544F3565789AFA8DE2BD35762EC8B69E7D573388AF055C6B7F8FDE783CE70474D79A2C7244C9ADBDFF516336DCC5BD8B96D9F6B0F314878FB4DAEBEFF27FB0486F49E85FC33CE19175BB4BECAD5BFCF3EF192685FCF8C7412D0E3A799CF82DE9A6E4520009D73EC94087D3DFECF29D44C882DD54F957A1398F0E012D09D9213D14911D0850E07962B01DA664127450B7A582503DADFDA5328DDD2373E11376CAFFE5D51BD86337E57164F0381E5FD06772B9942C7EEEDD9A19445E7EF73D01E4F027AF8D834D4F0210EFAD0C16CBC34D57B1747659CDB86755F63E91B9F62E0F0FB85CBA4569D73B1D42A96B7F637B95BC9DEF66F59E727013DCE8C80DE6CC5DA55C646711CFC2B1BEF2C5A8F5EFDEF100FCF63474F8AFB8CC22169DBD123392E296F68DE14741FCAF048DA264353698A857DDFEC2F25BBDC46061485B9D25BADBC2EC865291FBE141E2B5DA0DAF04BD91ED5A37249937AE7DDF7FEBE8E25A03B7A0368BB03EF6C57707158BD00F4F02A06E8BFF61F16373F95EE0FB547D32B1BFA04E8A9A39688812E59FEFE230BDD7AB4F38B9F53E5A291801EE623A00F9B08D0F49093A5636A7397D54DDF790BE837E67E88DA756B9E5DA710C2BA6BD8A88E6BC05845634FFB48408F3529A03F3218D0145143209403F152331A079A33658548F4AA5D375E44D14C98D5474C86F4F66BEB70C5359708781384BB3FD81EAB5764B800BDEFBB3F109F108BE726F612F75397C4C178B84FAA00345D1714563969E4225C7BE3A5221B91004D6F4F140EFBD9DA1D3879C2191F4FE3481FBDBF55D42BEBBED77B1D94554F0BE88E8A1634F9A0DF55057447450B7A44150374451D411714CD1BE029E1C1535D4A035FFD4E866B53F3C42B85EBC3A822013DD40F809E63120BBA3CEDF272F3854B431BEB5C91D6ABDF4987CDE64CD3BFB871DD52C0AFA86E59DB25A0C79810D0DB365B611640D338C2DE9DBFA0FFB3F708AB973EAF7C6B83C835A090594A4EBAEC8A06221C72D1AAD1E78D3168A19FD27210868E7DD8D5F734A651BF612D91854AF378C831244A446A72797DD7C3C2DB87BADE6B425B4F02BA437222BC01F44A1540EFB459D051D107FDDCC0CAF541FB43ACFFE56348403F4B80F6C1074D16F4DC69E670715485FE92801E3DD57C3EE86DE9567C6C120BBAAC815E02B476905F05D09E069DE9812DC710C862BEA8412D3CD83B091F2C4F170964A3A7F51613FE7FBA663B766CF91E1D529AA1634AF34ABFC4B480EE90AC1EC5F1DE0E05170701BA8322A04732A02BBDB3CB6B4002FA9931BEF9A009D02F33A095FB52027A944901BDAE8A02FAB6EBFAE0E2C6CE37D04EA9CD71C77D6D5CE1979E004DAE8E0617D776F51BAD2A44EE904307FF41DEE93398396119E62F1B2E129A32FFCEC6964D7B71FDCD97E1C616972BF7B59E1D25A0DB2727C21B40BFAF02E8AFBD00F4F30C683DFDE7B73A12D04FFB01D0F318D0CAFD2201FDBC0901FD65BA1546039A9284268E58245C1904C823878EE1C509CB7073CB2BF0EAAC559830BB0F12DB5E2BC25229DEBD2C0BBA7B876158FCC118D10F1116E714A4B27802F4AEED3F62D5E6692E88BB77A0FB203E65FB6ADD1FCA1DEEE58E5A40B7F7C2825EA502E81D8516DCA668418F1914581707AD8442E174B2D0C08176D4DF4B5D3DEEEE29E142EE6844ACB38A053D78741AAAFB10C59175301BF3A7FBD7C541A174B22F643FD1EC76349B1D85D2D1E010CD52E89ED823B7D179934544AFB0142E4759829E2653D26EA32880FC3305E78DD297D7877AAE1109E81153CCE7E2D89E6EC5271F181BC52135ECF7D0541CCDCAC105756AE095FF0C135FD3140D1FAFDAE69299C261292263E7B61F5C619414F238FDD541E27B6DF82CF997DB77BE5984ADD2B1E531E5C1A81ECDAF220B0D1252DBE4E7166DAF1E23C264FB3F34557CA63059F79C0A3DFD5F511D09E8764989B84D11D0857607567FADE0E22040B75304F4D800039A468FAD5FFD284685A9D0D35926915424A2EAF6AA00E8A7FC00E8057E06F49D6D9EC6AC3787A051930B21FB893E5318160DDCDCD769840849D4CE48487D42BE49E9BB6CD1FA6A74B9A73506FF7B961885F7349F0AF92FE5B6B2E6DBA82C400F3729A03F0D10A055EFA9B2F6F36425FBFB7EF6F537AAD4D702BA9D1780FE5005D0DB0B2D68AB08E8F12600B476A4F744CE69BCB5E063116E73ED4D4DC4BC1BF44AB375F35EB18C0E8DFE535CE6B7BBCFAD44DE29B585784253ECE68EADDFBBF46F7DDBF5C2BAD35E349486FCEBD9701DAA3773C252D196AFB3A3A974BAA77DA48B63A01F00FD9A9F01FDFC53F3C572474F3CD54D845A757BA09D6B647DF9A2F57865FA7B689678A5887796912F14A7FCC7AF87D07FE8BDE27429DDBB41A33A98F2FC12D18FF49AAC8DE0A0FEA5C996562DDBEC9A44CBD3844833C6BE2DDAF6573F91055D121C8E612604F48E742BD6575140533F5DA9993296AE857B1E6A6F58D8AADEFBD0BD9E0474DBA444B4F502D06B5500FD9517809E60324093505A2B8A42712896B2E60571C2BAA6F932283599C2E32894EEC3151948BE2B110FF64EC6DC292B047C699F8DEB76E286669761C0881E6262797A2D2338D320832C54C75668C77303E6056C850F09E8017E00F4EB7E063459C9CFA4BD040A7BA242206ED8A8AEF83FB986E875935E69C94A769FEFDBFD82F734CA4FFBC8B4FBC7BA4F2817D0FE0EB592801E6A52407F5645014D092C2BDF76BA27A8D0020FF29AF1173C8D388E04741B2F01FD910AA0BF2CB4A08DA2053DB10A00FAFA669789C99124BC656A32C565EEDEF11386F59B8BB7D68C1329DB23A73C269257F67DEBF485BDF9FE683C76F77801684F596874419901D0FD7D04F49183D978C3CF80A61903972CF858A4C3CBAC407973C8B792B21664280BD0EBD76EC7DFFBB3F0F8A0BB44F201B59174674B24B7181410403F6342407F9D6EC5E75514D046C0D3883624A06F4D4A441B2F2CE875AA80BE5511D093AA00A0B53E2C4F3E4AB2E616AE1A7DDE5A77324D58029A06BADE5BBA115B36EEC5B817D344DAA95900DDCF0F807ED3CF80A6C13B5A458532F7126A55C7ED5D6F11F706E99A4B96D28629C2D7BC7CE17A8C9AFA6F11FAA49DF04A7B23490B5A6B096BB3D7B42BED787271549605FDB44901BD81016D0487CB6C430BE85BBD00F4272A80DE566841EBCBD4264B9AF25460A3383CA598BABB38FC0568EA0D8A1220B7C6D03E7330FDD581B46CA1292CE8BEA3D310E743A2CA91CC6C2CF233A0098AE44EA231026DA815C19456D4888EB1880C3FD273D2DC7EC247AC02E80792468A745E5A717DDCCCB452F5CA1A24AC2C400F9E6CBE288E9D19566C64409B02D0AD9312D13A492D5185A238D6EF5488E2D85A68412B45404F3301A02FBFFA62B11415150ADD5A307315A6CD1F203E6BA706A5CFB43EDD90C7678BC9E1EFEAD10E4FF69C26328E96AC1E839E778C1193C30F19F520260C7D037BADBF8818CB5EDD9C2E0E5AF4925627A6623640F7199D86581F009D9D998DC57E0434BD59C8370FD28B1EA4B29F526E71BA236491DB28E98016E17DF88E316255162A8BE77F849B6EB95C58E2940A2CDD54031F9D8101C3EFF7B856E59A955F883E9485E668A09570FCB91AB8F4410F3221A0AD19566C62409B02D0AD9212D14A11D036BB039FA9007A4BA105898A809E116040D3725634D22F4BC20571229E52161AF8BBF3FEB6C21D21CBD64D7BC53C00B2CC7B7BA898649E66C6A2350865916E0C19A3A9AD27B77DB7E737AC5BB50DC3263C12900B420E12A6F901D06FF911D0E492D0F6857B3F49D8926872DBF40503852B845C23CFF6712E23F640AFDB856B64CC9057316EE613E23BD94F721B7D275D20EE7D48DBA87F694C81067EFDD54F12D0034C08E85D19566C664007E47E948D4A174762522212BD00F4065540DFD244CDC5317370605D1C01ED85B3D108724DC240FC1609E8DEA37CB3A08F6666E3ED19FE4D5409841E65B5591971D02541E1E86F4240EFCEB0227D75601255CCD4E781FC2D12D02D3B27A2A52AA01D0E6C5201F4170516DCA26841CF6240BB168D0DC4052101FDD828DF7CD0E4E258CA8056EE4261410785A39F49019DC18056EECBCAD85102FA162F004D3EE874AB820F3AA3C082168A807E69F074445A827055937339F39571C2663DE6E71FEF0025AC04AAFC71D0816339C5E8E5070B7AD98C25A8151F8C06F54203753A95D66EFA67BB444291BFCA9E1F6C08098F405F13027A4F86155FACDE8CA68D42512D3AD85FA7CCC7F1428133F925D8F79B1D2D3A27E216550BDAEE40860AA0D30B2C68AEE8E2583A6D218E671DF3E2A7F3AEFE562022D2827F3DFB0862AAC7EA3E744EF631AC5EB012B9274EEB3EC6FF5BC5EA0935D0F3B9DEA63BED9FAC3F20E3838DB0E53B97F9E2121805424243D132B9356EB8AD99D20FB0391CD8A20AE8668A80B615DA50525CACF40378A7CA522008E1967011BAA6B7501FDA6D769450DC2017250582828285EE662B458E2238ECB44001F76560FB2608A161212050AB148AE2D8BA4BC1C5B1B9C0829B1401ADD230EFC30AB002AC002B50BE02345BE3972A80DE4480BE542D8A834567055801568015F05D0172716CAF08D0E9FB0F634D4E092EA95BCBF716F908AC002BC00AB0024A0A388A8A91F9D79F187FE345888F8F47585898CB6D1954545454929B9B8B1F0E1CC6C63FB270A6A000C5EC5B561296776205580156C0570508C80D6AC6A16BD3FAA859B3E6F980CECFCFC7D1A3479195958553A74E89A5D279D0C857D9B93E2BC00AB002E52B4003FC91919148484840DDBA75111B1B8BD0D0D073167471717189DD6E475E5E9E8073015BD07C4DB102AC002B6098026441C7C4C408385B2C1601671999154480266BD9E170883F726FB0F56C58DF7043AC002BF07FAC80043159CDF4476BAB6AC366F507D0FE1F8BCAA7CE0AB002AC80110A30A08D5099DB60055801564087020C681DA2711556801560058C5080016D84CADC062BC00AB0023A146040EB108DABB002AC002B6084020C682354E6365801568015D0A100035A87685C851560055801231460401BA132B7C10AB002AC800E0518D03A44E32AAC002BC00A18A10003DA0895B90D56801560057428C080D6211A576105580156C0080518D046A8CC6DB002AC002BA0430106B40ED1B80A2BC00AB0024628C0803642656E8315600558011D0A30A07588C655580156801530420106B4112A731BAC002BC00AE8508001AD4334AEC20AB002AC80110A30A08D5099DB60055801564087020C681DA2711556801560058C5080016D84CADC062BC00AB0023A146040EB108DABB002AC002B6084020C682354E6365801568015D0A100035A87685C851560055801231460401BA132B7C10AB002AC800E0518D03A44E32AAC002BC00A18A10003DA0895B90D56801560057428C080D6211A576105580156C0080518D046A8CC6DB002AC002BA0430106B40ED1B80A2BC00AB0024628C0803642656E8315600558011D0A30A07588C655580156801530420106B4112A731BAC002BC00AE8508001AD4334AEC20AB002AC80110A30A08D5099DB60055801564087020C681DA2711556801560058C5080016D84CADC062BC00AB0023A146040EB108DABB002AC002B6084020C682354E6365801568015D0A100035A87685C851560055801231460401BA132B7C10AB002AC800E0518D03A44E32AAC002BC00A18A10003DA0895B90D56801560057428C080D6211A576105580156C0080518D046A8CC6DB002AC002BA0430106B40ED1B80A2BC00AB0024628C0803642656E8315600558011D0AFC1776FEC638DDA41D8D0000000049454E44AE426082 where `app_id` = '5';
UPDATE `fn_app` SET `thumbnail` = 0x89504E470D0A1A0A0000000D49484452000001680000012C0806000000EE2C29AF0000200049444154785EED9D079855C5F987BFA54957AA882E282088051535D244EC0876A3222A2AC1462C11A3F2370A0AA8281883062504BB066C815829828A801A4540015B0451A42ABDB848F93FBF91B3DE7B97652B7BCFCCBEF33CFBECEEBDE7CC7CF37E737E3367CECC77328C040108400002B12490114BAB300A02108000040C81A61140000210882901043AA68EC12C0840000208346D00021080404C0920D031750C664100021040A0690310800004624A00818EA963300B02108000024D1B8000042010530208744C1D8359108000041068DA0004200081981240A063EA18CC820004208040D30620000108C49400021D53C7601604200001049A360001084020A60410E8983A06B32000010820D0B4010840000231258040C7D43198050108400081A60D40000210882901043AA68EC12C0840000208346D00021080404C0920D031750C664100021040A0690310800004624A00818EA963300B02108000024D1B8000042010530208744C1D8359108000041068DA0004200081981240A063EA18CC820004208040D30620000108C49400021D53C7601604200001049A360001084020A60410E8983A06B32000010820D0B4010840000231258040C7D43198050108400081A60D40000210882901043AA68EC12C0840000208346D00021080404C0920D031750C664100021040A0690310800004624A00818EA963300B02108000024D1B8000042010530208744C1D8359108000041068DA0004200081981240A063EA18CC820004208040D30620000108C49400021D53C7601604200001049A360001084020A60410E8983A06B32000010820D0B4010840000231258040C7D43198050108400081A60D40000210882901043AA68EC12C0840000208346D00021080404C0920D031750C664100021040A0690310800004624A00818EA963300B02108000024D1B8000042010530208744C1D8359108000041068DA0004200081981240A063EA18CC820004208040D30620000108C49400021D53C7601604200001049A360001084020A60410E8983A06B32000010820D0B4010840000231258040C7D43198050108400081A60D40000210882901043AA68EC12C0840000208346D00021080404C0920D031750C6641000210C8D8B871E33630400002108040FC08646CDBB6ADD408F4EAD5ABAD4C9932F1F3021641000210D801815225D04B962CB12A55AAD010200001087841A05409F40F3FFC60D5AB57F7C23118090108400081A60D40000210882901043AA68EC12C084000024902FDD4B41FECE5E94B774AA5FF59FBDBA199D5BC24C71487976EC36808945A024902FDE0846FEDB559CB770AA3EF194DAC7DD31A5E0243A0BD741B4643A0D412608AA3D4BA9E8A43000271279024D0CFBCBFC89EFF68719E531C8737F073250423E8B83747EC83000412092409F490B716D82B3397ED94D05D6736B176FB33C5413382000420B0AB0930C5B1AB09933F0420008142124812E827A7FE602F7EBC64A759DD7966133B6ADFDD0B595C7A4F638A23BDFC291D021028188124817E78E2773666C6CE97D9F53BAB89B56DC21447C1307334042000818213608AA3E0CC3803021080408910C816E8A5ABB7D9C4CFCD14DA2EA420D1671E9E615576FB9525531C25D2A628040210282602D9023DFA13B38F977F61AD1BD6B41E2FCDB46F7B9F6815CBF91F9AF38BC56607EC854017537B211B0840A004092409F46D6FBF6DB37B75B0F7E6AF70E2DCAAC16F73CD0FCD5A6D0BD6FE6255CB97B116B52AD8B94DAA5AB709CBECE993EADAFC35BF58BDCAE5EC9C3796D898CEF56CF20F1BEDB87D2AD947CBB2AC56C5B2A688D3B52A95B1B92B3659FBFA954AB07A66087489E2A6300840A018092409F4F1076EB6BAFDC759A5F2656DD59D1D938A397FEC12CBAC5A2E49A02F1CBBD44676DC3349A05BD4AE60F7B5A965D316FF6C99D5CAD9F8051B6CE2C28DF6E3CF5BAC41B57236E2F8BAC5687EDE5921D07933E2080840209E049204FAEC96664F4DFFDE2E3D223387B50BD76DB6BA95CBDAC08F57DA21B52A58AF293FD9ECAE0DAC4AF90C27D07B552967E7BFB9C4469C50D75ABFB0D06675CDB455595B6DC2771BECED1F7EB6EE0756B36BDF596EB32F6A50A22410E812C54D611080403112C821D0C598772CB242A063E1068C8000040A41205BA0376C321BF34978AF273CEFA80C2B5FF65732ACE228440BE1140840206D0458079D36F4140C01084060E70410685A48A924F0B7BFFDCD264F9E6C071E78A0DD7CF3CDB6FBEEC51FBE60CB962D76DE79E7D9BFFFFDEF9D32D6CB8C7BF6EC99744C6EE75C73CD3576EFBDF7DA1E7BECB1C33C478F1E6D679F7DB6FBEEA1871EB2F6EDDBDB61871D56641F47BC0E3AE820EBDDBB77915FBE7CE9A597DA3FFFF94FAB50A142A16D7BE38D371C87366DDA14288F49932659870E1DAC4C99F82F2346A00BE45A0E0E81409F3E7DAC65CB9676D65967D9BA75EB6CFAF4E976ECB1C7167BD50A22D02FBFFCB2FDF18F7FCCD38665CB96599D3A752C2363C7DBC9CE39E79CEC0E61EDDAB556B162452B5FBE7C9EF9EEEC80FBEFBFDF0E3FFC703BE9A4934C79CE9831C3097F51D2A2458BAC7EFDFA45C9C20A2BD037DD74930D1C38B0C85C8A647C3E4F46A0F3098AC3C22170C71D77B851D7A9A79E9A542909EAC5175FEC8443CF2B9E7BEE392B5BB6AC1BDDEA77B972E56CF3E6CDF6F0C30FDBFAF5EBEDAEBBEE7202DFAA552BEBD6AD9BFDE52F7F7102B66DDB36AB51A386F5EDDBD78DA03552DBBA75AB13CB7FFDEB5F39406A04BD2381D6B923478E74E75F79E5953662C40827E283070F769FA9CC7DF6D9C724DACF3CF38C4978E6CF9F6FFBEDB79FDD77DF7DF6EAABAF5AD3A64D4DA3DECB2EBBCCD925FBAA54A9E28E57521DDF7BEF3D67DB01071C601D3B76B47DF7DD37C946E5D5BA75EB1CA22C5E5DBA74B1CCCC4CFBEEBBEFEC85175E70769D7BEEB956A95225AB5BB7AEF5E8D1C3A64D9BE67E2BA903515D2FB9E4127BEAA9A71CD7E1C387DBCC9933DD685A9DC9A04183ECDB6FBFB5FEFDFB5BF5EAD5DDDDCD9D77DE99835BA2402B5FD5F5ABAFBE72C7457720BD7AF572EC656BDBB66DEDC71F7FB42953A6381FAB8356C7F3873FFCC1715CBD7AB5FDE94F7FB2430E39C4EEB9E71EEBDCB9B3F3B1923AA9264D9AB8BF2FBAE8225737B50171555B12C70F3EF8C0B50F7D76F4D147DBFFFEF73FBBFBEEBB5D5B58BC78B1F3654113025D50621C1F0481010306D8279F7CE244FA8A2BAE7075BAFAEAAB9DF84A2474B10E1B36CC6EBDF5D6A4FA5E78E185EE62DCB871A31364DDFA2B49602444895315A9236809EA934F3E99E3D65A02AD119DC44249827AE491473AE1FDEB5FFF6AFA5E2226018B047ADCB8714E647EF7BBDF25D9973882D6744724D0BFFFFDEFEDC5175F74236FD557222FE1934D4F3FFDB4CBE3EF7FFFBB9D76DA6939045ADF492C35724EE475DD75D7D99021435C7D366DDA6462DAAF5F3F27D012612589A3044DE2A4CE4CE22BD1534728811647899FCE4B4C3A479CA34EA45DBB76D6B061C3A46352055A9D9F3A9A7FFCE31F6E0AA359B366AE43489D2EDAD9085A763DFBECB34EA035FD251157DD24DC8F3CF288ABA33A4EE51D2509F5D0A143ED965B6EC916707580127E7D5EB972E5425F330874A1D171620804341FA90B5BA3535DCCA973BB8F3FFEB89BA3D6A8F3DA6BAF35895224D0121A898B92845DA3494D3F442955A06FB8E1062750A9F3AEB98DA0958FA663F6DA6B2FD3DCB35224D01AA15E70C1056E54DCBD7B7737F255CA4DA0BB76ED9A3D7A57672091AE55AB961B753FF0C003EEDC51A346B9BB81D41174A29F5F7FFD75577F3153F9E2122509B538260AB4BE133795A10E43234B8DF023811E3F7EBCEB104F3CF1C4A4E6A40E45A367A568547AFCF1C7EF54A0D529A8037AE79D77DCB99AC67AEDB5D74C3EDC73CF3D9DC0EAFB4481163FD5435C0F3DF450676B24D09A27DF7BEFBD5D99E2A539F3D4BAE93BDD81A8038DA6927497F2C4134FB8CEE2FCF3CF7777130F3EF8A01B7517342509F48A152B0A7A7EEC8FAF59B366B68D2CB38BBDBB4AC4405D94D11CAEFED645A751D68E2E3E19A4D153345296D0E902D6C82F51A0256E8D1B37B6A38E3AAAD8047AE5CA95EE81E082050B5C99128044818E0A927D9AB691E01654A0AFBAEA2A37E25492A81C77DC7139043A91978E8B38258EBE131D97CA517717CB972F777724D1C83A12E82FBFFCD23EFCF043BBFCF2CB937CAF291189FDCE52EA087A47021D9DAFBB113DDC9458270AB446BAA79C724AB678268EA07724D0EA841F7BECB1A48E4953195F7FFD758E29B344DB773492CF4F6367049D1F4A1C1314014D4348A0759BFAE9A79F5A8B162DECFAEBAF3789C5983163DCADAAA62B340570F0C107BB51902EE4F7DF7FDF4D03E86FDDBA270AB4FED7ADAF4445F3AABAF5BFEDB6DB925671147404AD919D845923F11B6FBCD11E7DF4D16C81D6A84DA3448D4835BAD3E850237309811E786A24F8CA2BAF644F71E43682D67CA9EE10347DA0FAA803481D41EB7B7548E2356BD62C97A718CD9933C79521E19B3A75AABBFB10AF548196C06B6AA8418306D9771C91408B95F86A84A9C194F8AA3CB1D31CB0E67755374D3FE9D8C49497406BCA481DAB58687A46D342EAC8F46C60B7DD76B34E9D3AB9ECD4396B8E5BD31AB367CF767712FA7B4702BD66CD1AD3BCB63A1BCD93FFF4D34FCE07AA836C974F7497A472C4453C357216FFA8732AC8C58440178416C7064340A2118D0C135744E4F6B90458B7F089A3C9E8B34428FA4C295AC29578CC8E8E8FCE8DCE8BFE8F1E2CA6E69398C78E6C8D3E8B6C557EAA5FEA798975D677FAFFF9E79FCF758AA320BC72E3A232A272538F49E526BB732B3362A4EF73AB5FF4799447A24FF4775467D993CA2CFA2C9551E2B2BCC4F3537D987A5C6AD905B9887208B4EA9CCB0A9E82E41BCB6399E288A55B302A8D04BEFFFE7BB70A4349A358CD67EF8A35E169ACA2D74527BFD57BCA3CFB79F3561BF4EE37B6E8F693AC42D9F82FE42E087D04BA20B438B63410D0148FE6A0B50C4C73CA5AB5408A0F812481DEEFBEB76CDEAD27DADC656B6DF9BA4DD6A151AD6C4B35EFA6B58BBA1DF8F9E79FDD7C979EAEEAC185FED71A51CD95699E48437CFDAF792B3DDD3EF3CC33DDFCD5860D1BDC13CDE8964BE72B1F2D458916E9EB182D4BC9CACA72652B1FDD4E285F7DA627A32A4FF9143421D00525C6F11080403A092409F4B275599679EF5B6EE4BCB65FF222FEFFFEF7BF6ECDA5567AE81648B743BA356AD4A8917B70102D44D7F21BED12FAF39FFFEC045A02ABA7B4126309ADD66E6A82FEDD77DF75EB0CA3759C9AFF6ADEBCB95B485EAF5E3DB714470F1E162E5CE8167A6B725E1D8496BAA84CED642AE80E29043A9D4D8DB22100818212C831073D78F2377663BB4656B64CF256D28F3EFAC8B4665473547ADAAADD387AEABDFFFEFBDBAA55ABDCAD919E324BBCAB55AB66679C7186136889A8D6251E73CC316ED1BD9ED06A6792D639EA69B046D37A1A3B77EE5CF7A45A4F40F53B9A84D712966FBEF9C68DC0C78E1DEB9E866A81BBF2296842A00B4A8CE321008174126015473AE95336042000819D1040A0691E10800004624A00818EA963300B021080409240EB619E7611E9815ED5AA55DDAA0B45A8D2CE2B45ABD2C339C50DD04A0AFDE8819EE20468894EB49632CE4813E7A065BB7E14C12BAE49DB47B5C32BBF3173B5253835A04C71D74DCF066457F4FC20357FADB4D143E01DA52FBEF8C27D9C177305A7513E7A9641824069269043A015C54B1787045A1788566868CBA9B6BE2ACA96B636EA619DF6FD2B5A93A27D69F585B66E6AC5469C53A2402B8297D67D6A758A02A2E83BD5574B04B536F484134EB037DF7CD33DEC548018EDC157D272430544D777A79F7EBAE3A3285D8A68250E7A98AACF274C98E0E232A8E3D203506D1356795A8AA82DA75A7AA80032DA22AA73B42A45DCF5E0554161B49450F10B74BEECD183586DADD5F2426DCFD59662F1D7AA16D9A6F2E4336D6955D017C517506C051DA380318A52A687B68A68A6E3B5ED542124D5E1469D5594AF1E048B83DA42547785AE94CDEAC4552F7D2F16DAD6AB108FB25D11D8548602E8285E81F251EC03D910EDCA52E7AFB6A4B815F3E6CD73211915874151DEB41D58E2AE87C962A8F08DF2C3C71F7FEC98C8663DA056601D715084340D22947F648B56FE6820A1BCB5C5560F97359810BFDC82DCC7B9CD625BE926B04381D6084617A72E420984566A684FBB02AB68B99B0446610725D4DAAFAE2577DABB1EF7942AD08A9DA00B5D9F6B59A04687AAAF56986894A7D082123D8D18A3D0870A5EA33B0A45175327A52581BA8B9050EB78E5276E123EDD7D28908D045AE22D6E1268C54A50BE1220899AA25F291E80BED77A6F2D558CB69B6A1DB946C5B251DFC907EA10140B41211915E376E9D2A556BB766D17E74002267193684ABC155652F629C9A75A65235BF5B7444CC2AAF8B75AF2A8E03CB7DF7EBBF3E9C9279FECCE579C07896A62E72B51543D141FE188238E308582D49D978454E2AD7C159F409D85CA57A84A89A692F252A728A6EA84541FD9AFF8063A473131D41189AB96574AB83540500728C1958D8A4FA1A872126889BA56F928EA9B96668AAD6C136FD55BAB8DD4F12AB2596A2C87B8B757EC8340A99D837EFBEDB75DE42E2509A20276FFF2CB2FEE7F858CD4F240ADD5960068599F8443499D9136D548B0156C45AF4D9238456BC1B5D450EBB5D5C9693427B1D4765A8D5C25D61A792B088C924675FA91B84AACD5112A088EEE46D459A82C95AB7325E8DAC0A3602E2A5F1D66B4645122A7202D0AE7A8BC14B94B235B8DD015B92B8A0D106D02529017E529115647A20E401D93469A2A53C165F4B7C4508163947F9487EEA0C44382AA0D462A471D8C6C175309B6045165EB188D86B56C32124789A7363B296F754AB249DFAB23126BD92F5E1AEDAACE9A5A93C8EA0E409D8B3A27F9450CC54A62AF3A8ABBEE7634D2572C604DA768E9A78ED19D8882EE48F44910F08940A915E8743849C2A48D373ECCD7EF4A3E1A592BD29846DAD1C87A579647DE10F0950002EDABE7B01B0210089E00021DBC8BA9200420E02B812481D6DB8D434B9A138D125BBD43F32EF58140D804184187ED5F6A070108784C0081F6D879980E0108844D2087406FD9BA2D4724BB501030C5118A27A907044A07812481EE39E633BBEC884CEB39FA539B78651BDBBDE26F3B03B53C4C6B59A34D0F05C1A3B5BE5A179CDB6BC7B55141AF454F4DDAD4A06DE4DA2451987253F343A00BE2358E850004D24D2049A05B0E996C1F5E7B8C8D9EB3D89AD6AE6A87D5AF9E6D9F3621684BB43674BCF5D65B6E1DAB767069E75C93264DDCAE3AED0C536C676D858E5E63AF0CB4A9429B34B449415B87B5414431A2B57B4DDB8CB541449B0824A0DAC1A7EDCEDAFAACA4E3B56B51C768A79A369068D384DE1E2C9BF45D7E13029D5F521C070108C481409240676DDE6AD5FBBE69D52A94B31FFB9E92649FC4308AB52031D63666C544D0AE31EDECD2E60BC53DE8D7AF9F7B8DBD624F68C79BB6DF2A69E7DAFCF9F3DD2E37ED4CD3CE33E5A11D631264C5F950BC05ED3E53D20EB448A0B56B4C82AF2DC5DA55A6D1B4768C699BF2C08103F3FD6615043A0E4D0E1B200081FC12C831073DEEABE5764AD33A39CED7565C05B2D1765C05C351901B05F151DC0AFDFEECB3CFDCD65AC54E50AC0A1DAF2DC31AED8E1933C68DB425E8C3860D7379286684A63624D08AE9A1EDD2DA82AC91B93A03C583508A5EB5A511B7B6F00E1F3EDC89BB5E95A500398A0791DF8440E79714C74100027120E0C52A0E6D9196786B34AED80C0D1A3428143B04BA50D8380902104813012F04BAB8D820D0C545927C20008192208040970465CA80000420500802087421A0710A0420008192209024D05A8D115A5200F72831C5119A77A90F04C226C0083A6CFF523B0840C0630208B4C7CEC3740840206C023904FAF365EBDC16EFFAD52B065773A638827369A12BA477362686A22D74469C586402DA613C69D2246BD5AA5591F30A2D8324813EFFB9E976EFA9CD6DC0C4AFECDE8ECDAD5EB5DD5C7DB50E596F6B563C0DBD2F4E2F19CD2D45AF338A2328043A8E5E29799BF47670BDC19C142F027AB72529994092401FF3E8549B70456B7BE4FDF9767AF37AB67FED2AD9476B37A0E26668B38876F4DD7DF7DDEEA5A3EAF524E07ABF5CE3C68DDD4E42357E8D50264E9CE8DE7EADB73A77EBD6CDBD9C349D09814E27FDF894ADB795472105E263159620D039DB4092402BD468D53E6F58A39A556C4EAF0E49474B7815284923E9050B16B8DF3D7AF4703137B4055CAB2514752E12E8112346B8A0491A711F76D8616E6BB8822AA53321D0E9A41F9FB211E8F4FA42033D4D6B282546B144A0F310687DFDE5F275D6AC4ED51C476A7A4391E4A2ADD653A74E75C18BF47AFBAD5BB7BAC8744AD3A64D73236AFD2F2197384BC4EBD4A9136B815610A7281CAA22E7A90E152A54C8C1418D28B7F94B71C8C8C870771AAA2F299E0410E8F4FA4561841F78E00177579D18461881CE8740EF0AD729EA9C46D9E94E3B1B417FF2C9272E509342A67EF4D1473674E8501B356A9475E9D2C545E8D38FEE10F4604902AC8EEACA2BAF74C7D4AE5DDBFAF4E9636BD6ACB19B6FBED956AF5EED824029ACEA8409135C1C6DDD3D2C5AB4C83A75EAE442A516477CEB74F3F4B57C043AFD9E9348EB7A4A4C08749A043AFDCDE1570B7626D01A358F1B37CECDAF2BEEB446FE125AFDADBB028535BDE79E7B5C4C6C8DB6155255E2AC39F6D1A347DBE0C1839D40EB2EE3F2CB2FB7962D5BDADCB973DD485A3FB366CD722155DBB66DEBEE3C24DAA4F41040A0D3C33DAF52116804DAAA57FFED25048938D6AD5B6755AB5635FDD6685F3DBC42A4469FAF5FBFDE854ED58FA63F3495A1E334E2D6D446E5CA95DDE74AFA4CC72969AE4DC7EA1889B7460D3A0E81CEEB72DD75DF23D0BB8E6D517246A011E85C05BA280D8B73FD228040C7D35F08741E02FDF9E79FC7D37345B0AA79F3E6D967B38AA30820033A15818EA733116846D08CA0E3796D96A8557A5D5AD7AE5D4BB44C0ACB9B00028D4023D0795F27A5E288993367DAA1871E5A2AEA1AF74AEA398D5651E93576A464023962716CDDB6CDCA646404C989298E20DD4AA520102C812481DEB465AB55EBF3A6952B9361EBFB774AAAF4800103AC7EFDFAD6BD7BF7A4CFB5A350EB86F5C66FAD6448779AB772832D5F97654767D6B08E8F7F6063BBFF168005814EB777281F021028088124815E9BB5D9F61F34C9BAB5CCB4FB3BFDF6704D19EA4DDB999999F6D34F3F3941AE56AD9A7BBBB7DEE67DDE79E7B92D9B5AEF3B64C8103BEDB4D35C5C8E74A5E3864FB30FBF5F651B523A19043A5D1EA15C0840A030049204FADC673EB6D7BE58EAF259D0FBC4EC687691406B67DC871F7E68471F7DB4CD9933C7962C59628D1A35729B37B4A9A366CD9A367EFC78B79EF898638E298C3DBBF41C047A97E225730840A098092409F4D2B559D6E6D129B677F54AF6CE556DAC4CC254B476DA69A345F43BDA8CA10D17FAD1E60B4DF62B66876258A46EE32C66BB0B951D025D286C9C040108A489006F544913788A85000420901701043A2F427C0F010840204D0410E83481A75808400002791140A0F322C4F710800004D2442049A0B5842EB454AB56ADEC2AF1903034EF521F08844D801174D8FEA576108080C70410688F9D87E9108040D80410E8B0FD4BED2000018F092409F4DC656BADDDA3536DFDA62D967577E7A46AE98D20F3E6CDCB7EF16BF4A691E820C5924E8CBD9C2E265FFDB8DE662E5A6D671D54CF0E1BF2AECDED751C73D0E972468CCBCDEDC5BF313679A7A6E9FA9C346992DBE54B0A87409240EFF697D76DD59D1DEDFFC67E6EB316AFB1B7AF6C935DD3912347BAD7405D70C1056E3BB7760F2E5CB8D06DF1AE57AF9E6B18DA45F8EDB7DFDAF1C71FEF5E1795AE74F5E84F6DE4CC1F6CF55DA72699C043C27479245EE5BEFCF2CB76D96597C5CBA862B266D5AA55BC4EAD9858C6219B24819EB374AD1DF9F07BA690A3A923E80F3EF8C045B3D3BBF6147B63ECD8B1AE2128AEEED9679FEDEA2281D68B5157AC58E1E272C42D21D071F3487AEC09F98D2A08747ADAD4AE2A9539E85D45967C634B200481D69258DDD12A068EEE60A38440C7B6D915CA30047A3BB665CB9659DDBA757340D4DC5EF486EEC42F57AE5CE90247EDE89CC48B456F11E72DDE856A9BBBECA44481966F468D1A65CD9A35B3962D5BBA32A74D9B666DDAFC36BD976A885ECD3479F2646BDDBAF50EEF14259CB9050BD3F4E082050BAC478F1EEE6DEF854D0A4C3678F060EBD2A58B356CD810812E2CC8989F87406F77905EB973F8E187DB4D37DD6477DC71875D77DD75F6ECB3CF9A2EE68B2FBED8CD59F6EEDDDB1E7CF0417BFAE9A79DE8CE9A35CB5E7AE92517BD4FF3F11D3B76B42953A658BB76EDEC9C73CEB15EBD7A59DFBE7DDD05F9C4134FD825975C62F7DD779F2B51F9DE7AEBAD2EEFB66DDBC6BC9984655EEA085A7E79ECB1C7AC7FFFFEB6DF7EFBB90EB943870E56A3460D173AF79B6FBE7142AC51AB845CBE97303EFFFCF3EE554DEFBCF38EA983EFD3A78F55AC58D1962E5DEA62A32F5FBEDCBD624D0FD4D5564E3EF9640772F6ECD9A629C3134E38C11DDBA2450B77AC3A7DC55DBFF1C61BF3055C22AD69C6C4C4083A5FE8BC390881DEEE2A8D86C78D1BE72ECADAB56BBBF9F69E3D7BDAD0A143DDC525D11D346890B56FDFDE5AB5FAF52D2DFA5C6F94C9CACA7217982E565D987AD79D1E940E1C38D0162D5AE4E6E875BE8ED7C5AFEFDF7BEF3DF7D203AD7C89C39B68BC69B1C56068EA085A235EBD68425305F2D58B2FBEE844531DB646B9EBD7AF77A176F500BC69D3A6B661C306F7105C3E9460EB6F75C037DC70838D1831C2BA75EB961D9637BA03D36F897724D0071F7CB0EBA40F39E410F7807DC68C19EED98EF292A8173621D0852517CFF310E8ED7E89960DEA628C045331AFA38B4A17A5DE2023418E56A8E8C2D6C3D2CE9D3BDB6BAFBD66A79F7E7A763C6C65AB63A3F3D5014471B3A3DB5F95A9D1B77E482547202E73D01A317FF9E597D91D7E711040A08B83627CF240A0E3E30B2C2921027111E85D515D047A57504D5F9E0874FAD853729A0820D069024FB10526804017181927F84EE0D5575FB5AE5DBBFA5E8D1DDACF083A2CB72609F49AACCDF6F58FEB6DF3D66D7674E61E61D5D4CCD8A8129C4B0B5D216DB0D283C050921E424E9F3E9DADDEA138747B3D92047ACCDC2576EC7EB5ACDE80F1493B09B5AC68F1E2C5A6DE590F35F424FBEBAFBF764FB9B506533B07F5E4398E2F8A4DF417021D58EBA53A10089C40BE045A0C860F1FEE56253468D0C01A376EEC461FC3860DB3ABAFBE3A5BA0759C845B4BCEB4A44CAB21B49E54C22D01D78A06C54190A05F7FFDF5258E16812E71E4140801081481409240BFFAF952B7CCDFC7480000071A4944415408FFBCE7A6E788C53171E24427CE5A642F81D6FACD175E78C1054F8A46D0D10E2A6DF0D0C27EDD76299D71C6192E129ED608FFE73FFF71427FD5555715C1ECC29D8A40178E1B67410002E92190E321E1A62DBF8A6A85B2658A649176D669E386C4392E09818E8B27B0030210C80F015671E48712C740000210480301043A0DD02912021080407E0820D0F9A1C43110800004D24000814E03748A84000420901F0208747E28710C04200081341040A0D3009D2221000108E48700029D1F4A1C03010840200D0410E83440A74808400002F92180406FA7B4CFBD136DE32F5BF2C3AC588E295726C396DE7E52B1E44526108040980410E8ED7EADD56F7C897BF8F5CB8EB2560D6A9478B914080108F8410081CEA740972F9B61B7B46F6CF74F9E67BF6CDF0E5F5417BFD2ED486BBB6FCDA266C3F9108040A00410E87C0A7493DA556C5DD6665BB236CB9DD1B375436BD3A0862D58B5D1AAED56CE9AD4AA62F5AAEE66173D3FC3BA1F9969FBD6A8EC824EED2C21D0815E55540B02C5440081CEA74047BC1BD6A8640B566EB4DE1D1ADB8C456BAC53B3BA56AB72799BB36CAD8D9AB9D8F6D9A3A2CD5AB4C6F4F283BC12029D1721BE8740E9268040E753A035C571418BFA3672D622EBD2A2BE7DBA648DD5AE52C1366CDA6295CA97B5951B7FB1792B3658950A656DF9BA4DD6B1591D7BFD8B658CA04BF7F545ED2150240208743E05BA489473399911F4AEA04A9E10088700029D4681FEA0675BDBBF7695705A13358100048A950002BD1DE7D8AF96DBA52FCC742FCC2D8934E0E466764DAB86255114654000029E1240A03D751C66430002E11340A0C3F731358400043C2580407BEA38CC860004C227804087EF636A080108784A0081F6D471980D0108844F00810EDFC7D4100210F0940002EDA9E3301B0210089F00021DBE8FA9210420E0290104DA53C761360420103E01043A7C1F53430840C0530208B4A78EC36C0840207C020874F83EA686108080A70410684F1D87D9108040F80410E8F07D4C0D2100014F0920D09E3A0EB3210081F00920D0E1FB981A4200029E1240A03D751C66430002E11340A0C3F731358400043C2580407BEA38CC860004C227804087EF636A080108784A0081F6D471980D0108844F00810EDFC7D4100210F0940002EDA9E3301B0210089F00021DBE8FA9210420E0290104DA53C761360420103E01043A7C1F53430840C0530208B4A78EC36C0840207C020874F83EA686108080A70410684F1D87D9108040F80410E8F07D4C0D2100014F0920D09E3A0EB3210081F00920D0E1FB981A4200029E1240A03D751C66430002E11340A0C3F731358400043C2580407BEA38CC860004C227804087EF636A080108784A0081F6D471980D0108844F00810EDFC7D4100210F0940002EDA9E3301B0210089F00021DBE8FA9210420E0290104DA53C761360420103E01043A7C1F53430840C05302199EDA8DD9108000048227804007EF622A080108F84A0081F6D573D80D0108044F00810EDEC554100210F0950002EDABE7B01B0210089E00021DBC8BA9200420E02B0104DA57CF61370420103C01043A781753410840C0570208B4AF9EC36E08402078020874F02EA682108080AF0410685F3D87DD108040F00410E8E05D4C052100015F0920D0BE7A0EBB210081E00920D0C1BB980A420002BE1240A07DF51C76430002C11340A0837731158400047C258040FBEA39EC8600048227804007EF622A080108F84A0081F6D573D80D0108044F00810EDEC554100210F0950002EDABE7B01B0210089E00021DBC8BA9200420E02B0104DA57CF61370420103C01043A781753410840C0570208B4AF9EC36E08402078020874F02EA682108080AF0410685F3D87DD108040F00410E8E05D4C052100015F0920D0BE7A0EBB210081E00920D0C1BB980A420002BE1240A07DF51C76430002C11340A0837731158400047C258040FBEA39EC8600048227804007EF622A080108F84A0081F6D573D80D0108044F00810EDEC554100210F0950002EDABE7B01B0210089E00021DBC8BA9200420E02B0104DA57CF61370420103C01043A781753410840C0570208B4AF9EC36E08402078020874F02EA682108080AF0410685F3D87DD108040F00410E8E05D4C052100015F0920D0BE7A0EBB210081E00920D0C1BB980A420002BE1240A07DF51C76430002C11340A0837731158400047C258040FBEA39EC8600048227804007EF622A080108F84A0081F6D573D80D0108044F00810EDEC554100210F0950002EDABE7B01B0210089E00021DBC8BA9200420E02B0104DA57CF61370420103C01043A781753410840C0570208B4AF9EC36E08402078020874F02EA682108080AF0410685F3D87DD108040F00410E8E05D4C052100015F0920D0BE7A0EBB210081E00920D0C1BB980A420002BE1240A07DF51C76430002C11340A0837731158400047C258040FBEA39EC8600048227804007EF622A080108F84A0081F6D573D80D0108044F00810EDEC554100210F0950002EDABE7B01B0210089EC0FF036DA3CE30CB0602C40000000049454E44AE426082 WHERE `app_id` = '6';
UPDATE `fn_app` SET `thumbnail` = 0x89504E470D0A1A0A0000000D49484452000001680000012C0806000000EE2C29AF0000200049444154785EECBD07985C57952DBC6EA8D039A8BBA556CE39675996836C30C1806D8CC3100C0C434E33FC93FE6F12330FFE37BC37A4218C8D033080C1D8B2B171002CE728DBB2AC9C73ABA33AA7AA9BFE6FED734FD555BB2575CB92BB35AA82B6BAAB6EDD7BEEB9E7ACB3CFDA6BEF6D60885EB13BB6073E4C78A601D83E0CCF80E9039E11C0924F4C38A605C08411F80810C0E04F60008105183E8C20800F1B811CE7C30ABAE103088C5878570E10F8308C52048103580E3F95FFCB8FC1D358300C1B3E7A6106162C1FF00D0F401C7E1043607A809196F3C5DD243C38F0631E0CDF542D32B21D18F7D2181D0FD0DCE3A0335688C0F0D91898B0E049CB72AF5C0FE47AE0BCEC814F4E8BCCF4B7EF0E86E4A2BC3DEB8E1D816F98080C8B180CD333041C5D9320EC0B180B780BC01134F93E60868818185E088E1602D84040E07541ACF67D82B70D83C7C04760E409221B410AA6C177D4790358847F04BE8FC0F678115881058FE00F0B084C48A39046E073E1C8938522301CB05582F37D007AC594B17863CF0174984918310B81C7EB5AF009D6B957AE07723D707EF6C00507D077ED0994B54B20B4607A81401E41CF277ED29C860F33A02D6DC0353CB19E2DDF80011FAEE9211073D704021BB012804760766897C33613083C176EE0C2B763E0B74CCF4310A441FBDA342C3866026EE0C13003048101C3A4B51E082E7391E0F9D4EF2E2C0B705C1B26AD737E66A8B6F605E825134661EBBE43E88C17CA31B2BCF8862C30B957AE07723D709EF6C08506D0B8636F209C062D509F904900239DC0F76833F3C785E959423D109079A8007400B8B68BC052562F7C521C363F15F0B682344A3C179E6DA1DB00D201298B18EC208698E7A0DC74916701C71C07BDB6095AF2088A60F2DA6E1B4ACC143C33819E20015FAC765740BF302F0F1DDD2E3C338EA02F400740C24B63F954654177DAF9F0030F961583EF04C2CAE45EB91EC8F5C079DA03171A401B77EE0DC44A3600D315A2412C66E16D058A099C81B2A005A05DB1A04DDF16ABD5176ED8156A83C7D0A8B52C1BBEE7213FDD897F7CD72CECAC69C1833B8EA1CD8EC3430249C7C3F25185583C65040A8A93D8B87B1F5ED8D78AF678114CBF105ED08B3CEF383E75D12404AE8D751B0EA0D1CC9376CC1D5F85E5E392B8FF89ED684B94C3336815472CE810A0974D1983CD7B0EA03B5E048F0B0E2DF31CC5719ECECA5CB3733D10F6C08506D0E65D7B03D9F6FB2E92A91412AE0BC37709D1300D039E69A33399079871F537795F3AF482187C43CC6E18A055EDC3F0153D625806E0A430A3D0C66D37CEC6EE3A17DF796403F69AC5E8461CC54E37FECF876662FD935B51D3DA814F5FB702FFF2DB6D386C16C30C12308C1E94FA4DF8F92DABD1D191C6771FD880D7508E1E04B87CD6447C6806F0EFBF7C0DC70A47C1A3639100CDE7C7E644007ACB9E83CA82A62F53AD26390E3A37D3733D703EF7C08506D0C69DFB02C3F061B91DB87EE1447C607A12493FA43C60A0C907BEF8EB6D48E5952A879E410B9A0EC198B01F34B44DF2C5A44108944100C3F451D8D3822F5D371F9D0D298CF4DAB1E18D8378AAA7046DF142E4F5B6E03F6E988D679FDF85E30EF0CE55D3F09FBFDF8966BB04DDBE8DB8D786F72D9D808B475968D95F83DADE387EBEAF13A9781CABA78CC34D734DFCEB2FDF406D4925FC8056FF89009D24C531798CA2386205F0CC502A22FC46CE49783ECFCF5CDB2FF01EB820011A2E926E07D6541978D7F42A24D38E58A49669615F0B70EBF63AB4E79522F0E96A235D403504019AD486098B5237D3814FE7A049D43630D36CC7D7AF998D6FDEF53CD6CCAAC6D4C9A3F1CF8FED423A9EC09462139F5A568D31234660774D1DEEDB741C134795A0B327C0B3C73A5062B4E11BD72FC06F1FDA85D18934DEB17629BE74CFAB688F2570F1ACA9F8B39906BEFEAB4DA82926C511CFF21B94EB690E3A07D017F84CCEDDFEFFC81EB8D0009A4E42133E4A8C1EACAE32B176E22824BB7B94751C98A8F312F8DE6B7BD156504ED20326A570E49A058809D0593DB472345222E7E183D3F270CBF2B1787C73272A8A63583831894FDFF512F2E301FEF2BD73F1E853DB5196CCC33B574DC2FF7E602B6EBC74165E7861135E748BB1A03A1F7FF38E69F8E3B66E94DA1E2E9E5E847FFAFD4E6C6F6AC392393370F3AC18FEBF5FBD82C3A5A3E0D2B1498947487110A069412FCB01F4FFC8F999BBA90BBC072E348026C54180B67BDBB1B02885198900452E19683A0A2DB4D97978E4B88FD6781160DB80A7647614AE09BF21AF501A2194878702A7079FBB680CBCC656EC74E2703D0FEF5E361ABBF7772375EC20AEBC7401BEF6D327E0C48A307F7415FEDFF74EC08EDA1EDCF6E8661C0EE2F8C8CA3128F55CBCDE6AA327D58B8B168C4071CCC0F7EF790533172CC64DB34DFCEB2F5E464DE928F8A0059D03E80B7CDAE66EFF42E9810B0EA07FB22730292EF6525834A104B3CA02C425C084BA3603DD00EEDBD482B49D0CB5C62AFC4F685D58E24C14AC0EE2C243C7D18D2956376E79E732DCF3E04B38E459481BC09C71D5F8E2CA52DCF7C0ABF8C88756E1972F1EC09EC3CD9834B202372C9F80E3AD1D787CCB51EC69E9C547AE5E82471F79053BD27948DB0646C55D7CF3BA79F8D6BDAFA37CEA1C5C37DBC437EE7E1D35855514F385DEC1302231624153C5D191E3A02F94A99BBBCF0BA1072E34808EDDBE27F04C133E290BAF17063D7D0C27F13D188CF6A36ECE64F0099D7F2A1E4549EA18319854E1D8B4A4FDB83807E35E2B568DB23179CC48FC7E43233A8D387A6D2096EEC0D7AF5F80C79FD88DCE542FAEBF72018A933D38DA968747D6BF84CAA23CBCFBB269F8D5639BB17CD542FCEEF1FDA8B31370AD00899E66FCD5958BB0E9600D9A8D625C3E2B0FB73DB015C7F347844A122E126AE1202D93F05CAC985CAD22094F00E8210BD8BC10A64EEE1E733D70CA1EC838F3DF4A3F5D68006DDFB93BA096382030D3720E3B2FC848E818C742EE42E91FC8430B102A37621873187E28A1D92E980B8324B66B508A6781E7A2742FCFEB45400588C148C4B45CCF372D04760CA6EF21F01C04B6054334D631A419BC627A30036AAA1DC633226D9960C60ECAEBA8A90E2CB6818B890B33F0256F47CC0BB0724A15B6ECDE8F365AFE565CC2C8E9C00CE30E33923CCD5D2B9D5E56AAF7B6FC2E1709E999B7326873DFCDF5C030E881306A22D3121D49A1A61583D0B29B5D9D868754EAA0E6DAC7A70F899535241765C7C4EED81DB80468432549A29E99FF95FC1BFC8D099328A313ADB10693FEC2A5255387EA6C5AD71AEF088AF2A7B26E331992784265ACCB7F1470F2453D3503C2B968D007A93E31E53D15B0A871548E91187057A21DD9F62088C3F2022C9F320ADBF6EC41A74D999D5296A85BCB2C412138EAA112695BB808A9B69EC3F7A3F1E9C36082E59A90EB81B7DC0382137A471BCE1D0689454E1C450FF5FEC0E760F0C90B0CA0AD9FEC09486FD026D6C9914817303B9DB29409D04C76C46394F0596F5574E72A1863C225E6D208D986307824F30004A54F0468D229D44DCB47C46B02A92070F8C0981F247CD14A968304D4A87D563942C43A97DFD946BE6CD85E80A533C663C7AE3DE8B26C3812B26E48DE0F394D36895EEEF7AC5113357072BF67C65D6843E4C64C76777D8A3123D3F364E6667497AA0DB830E422625C9F72EC059F9A3A24C6EC905C947D14BF9DE9466D655932C844108C16B30268041E83BD43EB59BFA71D837AB50C019ADF531F85917D2A039E4A51AAED5EF594C4FA0DFF27A02B80CE4522C858C9729CB678FB18ED593E2B4C7F4ADAC38C096D62071EE22EF9730F6ECC80CB044EC2ABD3F9990D6A1916BF2B376B9FDE191E0C4C9433CCFD9E7B46031A0394E09E04CD749EB2BED6B48E021EC87C743E357348B072482ECA21F79947360741600B0093C755004DDB9499E708148C1CE47B613AD113D6515ACBA1C9ACE90BD2256F829B28ED116E77C23BEEBBA82A4E4A511C4C0DAAC19DD18BEAA532D86552D88905CDBF0DB826179010A07D0B0101DAF4E1584C830AD8F2B5E1144918AE6619888EEC0373BFE67AE07CEC012D79157A347B030AB4B5A1161AD9326D355E0CEC666F7DEFDC21C1CA21B928BBE468437DC034A1CCC96C48427CE50A0C100F1D810467460F12FC420B3AD397CA7A95ED89847B872C44F421F101841CB402DE88234EACE390E2D0DF059D824C37CABC195E98EE34900C784C454AA7A1247292AD912116B6D26573E556ADE1596D9FE70D44A2CD2C7A261354BB014C72EBC326E5A81EC1391B3AB76738FFC7809A7959287B33EFAC8C394E3FF9119FD2E09CE463AB2A87042B87E4A2C4C48686BAC0800DCFF560C74DF801415A25161238A5152BD55068851204C9F512E8C284FC3C4A142012DA0293923D2AEF0498D5DF1E734CD3E127CB6810FAE9A29FFBB06D0B8EE3C0B419ADC816510512A8A4FD868118131D312FB4654ACA53A63B65EA3CD30AD4F98D9858C75C4E4CCB86492589D0DEB4FC5D499D1A786A30B04D02DE62D8AB36EABF4FB68E6BAA458A1084F7D6F75C9A92899E5BBFA7AFA5CF23394B42FA46F52F171BB6435BF87A4868764E1DEF33EFAADC83B0392133C5CFB80352560AFB599D5FAF8619062B7C966AD154F711EE58C2C55203A5FA2CF4ADF242B218EABF436B48BEA317591FA66987FDA8DA1C6D83FE9D0BA5EF7B52CC41164DF514C2E3553F64CFA9EE2B7A8CFE5DB74DF56BC4F71B5E57F529FB246B04E8FB55FD1CED9FF31F1C55BF0C8884D004E439385E194C7CB6966872A99CA28748D178BA9795474815E890CA1EE177D41C50E3E664AFAAAAAA21C1CA21B9A802E84631482DCB82EB39A1EA4B292ED828710F1274D9971CD85234CA874DA0745D58026EA1A0261C1FC2251B047B72BE66F87D5FAEC187177DE907C2F76DDB0EF33EAB24FDCC96E79B74EE5196C7B25510758964D163651583B23A5AC774519AF0180169B3AC156BBB28BED90F3D906AA2EA89A9BA3B7A6D9EA3BF575F00EF0FDC4F046D0D646AA04601592D568A42E2FBBA5FE5186EF7C2C542FA2DDC1D084FAFC13C8223AC2C230BA506B030519538D043054E94DCE6F1A6C574B0A1FF20036491F7C3052BFA7DDDA610FAD5E409C1BDEF738CDE6FE6B3C8C8566D668E9750EE18AE3DD1C54A0177E439F5E1C0F4E4CD4CE4485BE4ECE1DF99059563532F466187B0CFA2D739291AE43E18540F48C2487892C387F357CF778E2731EBC4C7CFB91C3EA78867508F01CE8F53194C55179A055D57DB18D8E2C9736158317802684AB32103DB8E21CD20955072C7D54E56455AB3BE0268095C09C1978068D931B1F494354D8DB29A70323168E7FA1E62B1385CC79187C889AB141DB4D643558658C7363CC9FD41300E0364EC185CCE3926E1A7A8841699CB14A8016C2B297486944A0C5C59A12DEAB025FB5EE8AC147F647691E0ED3A4E5ADA9351E0458625277A2AE5A0BBBB53FED51699B678792FDA2A947543163B02B19BB11015C829CB512896701B28D63017C2D06AD0D6875A2CF46EC310508F8296E7F988C763B240F2A5813F0BFA6AC1E4B5FA82A6BE86B23C9555DE7711918537B298CA330AD5363CA70649DD2E35548213BE93DD3D850BA858CB6AB1E9BBC3E0F9F9D2A0291658E4FA5100EFBB28E8FBD08B9EFE9B6D8BC5380E15E0F3EFA88576B2730E0A9172079FD003B296DA406B4B3352DDDD2AC56F38E7619B70B9401BD9621F314B8D4FDF77C5382B2D2DC5B871E332464C7FDD7BC159D08D4DC703234823F0D212364DF506C19225AB3888E92CF4600B18FA6E0ABEAF26683C1693BA827C59EC685ABC0104E8BA7B52B0E3545410344DA452291414E4A3BBA757A80C9E3F9D72E4779ECB66B51306AA10944DD21A161C97F23E17F9090544298545D28E98D0C906528E02A2980124F84110834340E7B8487AF0520EE0D0824FC0E5CA1E33614921DAC82B00BA7B7A909797CC58B6D18F1558D8282E2E423CC66394E5AA64276A9B2C4669C60912EE1CD4D9B29CBB06655AFCB26884AED43E4E92701D525BC590EEE00E820B1FFF55DF535C3BFF16608B7CA61743B5D81134E937085B1D5E53CE935926420A20D3DA2CF5230C5164F1E079B860D242CA5AF9EA3EB58E5D6FB2A34CA48C2379B66A57A65E590A47EE295411292A253C5F8606D2540C0F0B7541E177C2BD5064039DDD4AABBE0C9F56781FB268CB82F0E696E6F0F6ADF70077D8FBF7EC456F57376C93735DE56B7768B0C46292972766C54451253B2A06A2596A47D3D4D484B973E62863EA2434C7C8CA5143C2360CC945F9381A1A8E072652ACDD8D96B66EBCFCCA265C71E51580DF83279F7C0A8B96AEC2BA071FC33BAEBC0C7F7CF4618C193D56B8E2B56B2FC7EF1F7C08EF79CF5528292941437D1DC68E9F80DFFEF65E2C5AB404E3274C806D5978E8A1DFC98ABA68D142CC9E3D179E949FB270C7ED77E283D75F879FDCFA137CF92B5F41617E3EEEBAEB4E5C73CDFBB06DEF11ECDE77185E570B16CD9B8E9EDE5E6CDA711485C545282B8CE38A4B57E057F7DC8F92CAB1E29C9C376B0AE6CE98863BEEFA3592B1189A5A1AB0F8921588053E1A0FD7E1D9173661E9CA155879D11294971487A0A90096A0D1D5D585BC3C16B415EEE14419A7800B50565E86782CAE060E9F56264C2A941646385C050A04500231690E8E38E59C543B095AF43AA827B4ECC39D48067043D0D3F487DAC22819627F0C9D962D4639BC13E899108F32D63AF7116C5BE4BAEABE14588A851969C389ECE6891249C5D084C79F009C272E1EAAFD2136862B9B8E57D256B87A04E174088FD17A790DEC72ADCC795431062E52C46EE5300EF97A2F14D9469F69664555EDE8F3B4DF3A425DE0672095B167D76EA47A7A90306D668808A94A139E01D8B1189C545A7C4C2AE59A32CCB8DBA9AFABC7FC05F305C44F068855552387042B87E4A21C4BF504E8202D72BACECE1EDC7AFB4FF1852F7C113DDDEDF8E5CF7F8A4FFCC567F1D9AFFE3DBEF4854F61FBA64DB8E5968FA1B7B717C5C5C5B8EDBF6EC5ACD933644BF29DEF7C170F3EF4206EBCF146DC76DBED48C61372CC876EB80E9FFFFCE7F0D24B1BF0F77FFFF7686B6F432291C4473FFA51FCAF7FFB377CE31BFF4BD21DFDEC673FC7273FF971FCDDDFFD2DEE7FF419BCEFDA0FA0C00AE0F7B6E181DFFD0ED5539660CD252BF1A95B3E8A1FFEC7D7B1EEE1F5F8D047FF0231C34251D2C30FBFF71D54544DC2B5D7BC176DEDC7F1D2E6ADB86AED25B05C1F1FB8EEE3B8F7FE5F4BAE10521EC2AF1B4CCCA7ACA9CEAE4EE4E7E56B7C3EC1132DD66710A0ACAC14764CC9F5387A3A3A3A919F9F8FCECE4E141515A2A7A71789784214267B76EFC6C44993D0DB93427979195A5A5A51565A2ADF7B62FD13B8F4B24BD1D3D38DFCFC027475F7A0AEEE18E2311B63C68C81EBD2C36A21DD9B4651713EDADA5A515A568AEEEE5E241209A19476EFDC81AA5155300C0BAFBFFE0656AC5C81BC645C38F6C3478EE0A9279FC6B8F1E370E9259728478CF84A2D74B4B763FFFEFD98BF6001DA5A5B656165FB3B3A3A6417316DDA34384EAFEC82FEF8C73F62ECB809983163067ABB7B108B5978FA99A731A27C04E6CC9D2FF7C26D69575727F2924901BAC71F7F1C6BAFB842EE2D954A63DBB66D72AFB4947A7B7A905F5080CE8E0E24F3F26457C5EFF5A65378E38D37B062D972A41D07896402DD9D5D28282C14ABF8D9679FC6D2C54B104F26A4C27BDA75B071E346CC9C395316D5981D83E7BAF258928904DA3B3B505458848E8E769494940AE7F4FC0B2F60F9CA1572EFCDCDCD58B972A5A2D5F8284FE27BB8C071F6F4B79F49FDA0EC15EDC1E1FE74F7EE3D6241C7E8A0374D89F1756C1A4E2DD87FF010C64F988251E52588B929E52B0AE7584B730BE6CD9B2B7320B348F76949E5C88A21C1CA21B9A800747D6D4085867472E0E0073FFE216EBCE923D8BA631F5AEA0FE103EFBD0A1FFDCB7FC4973FF3E7D8F0F493B8E683D7CB13193F763C366F7C03DB77EDC04BAFBC8C19D36760F1B225F8F6F7BE83471E78101DCD2DE84DA7F1C52F7F113DA914FEF33F7F805FFCE297F8CBBFFA2BE1993FF1F18FE39FFFE91F71FFBA7B5151568291D5A3F0FB071FC4BFFEF3D7F18B750FA12B0D5C71D1522C5D380D77DC711BCAC7CDC38A95CBF0E5CFFD396EFFCFEFE2CE9FFF0657BEEF7A246D0B13C68FC0873F7C23EEBDE731781E69985E58B142785E370A0BF2F1AEAB6EC4430FAD43DAE9128F7F945E601F747777CB64EF6F5088E45A00BA4C0089AFFBEFBF5F76115CA82A2A2AB075EB56F93E0166EEFCD9387AF4286AEBEAB16AC56AECD9B317A346560B20BDFFFDEFC1ED3FB91D9ED3231CF29871E371ACA10D89A4896993C760E32BAF61ECF8A978F0A13FE1C337FF19366FD980850B66A2A6AE160112686BEFC5A73EF111BCF0DC134249D5D4352330E258B56A15B80BDAB97337BA531EF61EAC4141320E27D581B815C7F4E9D3316FFE7CB1989F7DF6591C3B760CF3E7CFC7E6CD9B6551A81E3D5ADA77F1EA55D8B7730736BCF232521E29A17CF89E09279D42220EE425E2282C2CC5A1A37502DEFB0EEDC3DCD933F1EA8697F1FEABDF87DFAD5B878B2FBE1875F5F5282C2D41322F894B2FBD14F7DD732F46565662D7CE9D9831672E9E7EE619AC5DBB5680998B426343038E373763F1E2C502BEF3E7CD934569D1C205F8E177FF032525C5385A5B8BD56B2E456373336AEBEBB174C972ECDBBB17B66162D3C6D7B07CC9521CAB3D8645CB5760D78E9D183F6E1C1A1B1B71D38D37E06777FD0CD5532660DFDE7D98396D3ADEF5AEAB32522F4196219B7DA7C7C1E17384DEF1291F4A8FEF637F5D235CD29D4680A963AA4584CB8DE19E3D7BD0DDD589189DFE1C99664CEA91BEBA710BAA274CC52B7B0E62ED82C9981C4FC3A0892D34A925CF8BE3523BD2FBBBF70B8E836E68AA0B028F8E3A03899887471F7B04A61DC7FAA737E06B9FFB042ACB0AF0675FFD477CF50B9FC11FEF5F874BAF5C8B82C212CC9D33171D4D0DF8E92FEE466D731BFEEA4B9FC2F77EF45F9830753ABEF2E7B74836BC4F7EF22FF0C5AF7E055BB76FC7FE03075131A20A9FFBFCE7C57170CB473F8A7FFAA77FC02FFEFBE7F8BBBFFE1ABEF7DD6F63E78E1DF8CEFFFD36F2478CC23616927DF24F282BB691EAEDC6FEFA1E4C9D360533268DC1CCA953F01FDFF901565D76050AE2092C5F3E0FB7DCF211FCE4D6BB5158948069B9686AE84249693E0A8BF270D53B3E88871F7E10DD3D6D198765742B7D2A8026A213D4694193CF25886FD9B205CF3FFF3C5CD7C1F8F1E3D1D6D686499326A1BDA3031B37BE8A2BDF71255E78F165AC5AB95AAC095A7274722E5EBC100F3DF8200A0A929836653265D9D8B4750F8A8B92183FB6022F3CFB1C4ACAAAD1D4D48DCF7CF616DC79C7ED58BD7A311CD7C581C30D48E69560CD45CBB073DB6BF0BD340223819E548059B3660B2575E4E8511856125B77EEC7BC3933B1E5F557B060DE7CB11A972F5F2E2CCBA64D9BB07DFB762C5DBA542C674EA677BEEB2A34343460D2C40928CE4B62DDBA7B317AFC38CC9EB314CF3DFF02E6CC9E8DEECE66343735A0B878041A9ADA5058568EBAC65A4C9F32095B36BD8E0FDF7433EEFFEDBD282D2F434D6D2D0A8A0A3172743566CF9E838663B5D8B97DBBB463DEC2453870F020AEBDF65AB1B8B90BE1E240FE916D7CE699673067CE1CB1EE274F9A80DFDEFDDF58BA7409B6EDDC85254B97E3A5575E41D98811282FAFC0CEED3BD0DED28A919515983861826CAD17AF5C29F754565C22BE8BE5CB96E1B1471EC588F1A365B7505D5185CBD65EAE92D41273CCFE29A3E1038C43DD124D6EA9B40F622B0726BA8200871B9BD1D1DB8BAAD222549716232EEC9F8FDDBBF6A28B16347D4CCC926327D0E0D9786DDF514C5AB612EB37EFC59A91492C8977C92E89AC1A8D1F8EC11C40F779DE750D750135C4B661C1F37AE0B8295C7BDD0D98BB6019BEFFEFFF86EECE16DCFCF9BFC657BEF859EC7CFD357CECE31F4347AF87BC781E62E9767CEE2FFF166BAFBE0ED7BC7305AEBFF123F8C6B77F80A533C6C2320CBCFF9A1BF00FFFF40F22ADF9E297BE8CABDFFB7EFCEDDFFE1D6C3B869B6EBA01FFFAF57FC1CF7EF653FC9F6FFD6F3CFBCCD3F8ECA73F8B471F791877FDE237F8C0F51F42FD9183D8B96DA33810A7CE5B81CB2FBB0C66D08BD6C646FCEC97BFC1473FF917B002A0B0C0C22BAFBE846FFFDF5BF1EDEF7C0BAFBCFA1C5E7E6933FEFDDFBF8182C23CACB9E82A3CBEFE8FE8E9ED384167A92DE6530134396A5ACB23468C9041C4EFB4B7B76754016234F85455C4433EBB03050585B26BA01E9C8A0E7E87D6444141015A8E1F17E967221E87E3F848516520F4743A942DE6C17503949695A0BBAB1D011CD9C2DB89022A9750565282544F1B9DE268EDE886652785FAA00A87DBF69E942399FE0AF2E2707A7B51985F20967E6161A100344159288F50D9C07B2B2A2E462A9D42716101D8E88E8E3698311BB178A1502BC9441C81EC4C3CECD8B10B400233E7CE426FAA572894643C26D7E1B9A9DA217F44C78F158F212F3F1F5D6DED2A9B2059C7507E49A72B81D971A8F2005C4A24439F00DB979FAFEEABA5A116C9FC7CA49D344C2B8694E3209E501489A4E7F294239AFDCBEFA743D59015EAF34B8A8BD1DAD20A2B3F2974515141210A8B0A613068893C57CE821EE00AA072DF5022C5F99CF2811E8FC5A54915062849C4608B23D81380EEE97104A0391E0233861E3B1FAFD534E2D59A26380523B0ACC8C09523131248465A84738B3BBB050B16BC4979146DE0056741D7D613A04D91A97102E6E527B0EEFEFB306BEE52CC9C3201DD1DCDF8C30B1BB16CC912DCFFEB5F22EDA690760C7CE0EA0F60DEF4B178E4F1E73077E92A54151B78E4F1A770D12557A224E6224699146CDC7EC74F505C528A1B6EB8110F3FF298586ED5D5D578F0C107B1E6E2D5D8BCF90D5C7ED92572ED071F7800EF79F7D5A86D388E7B1F78002585F9F8E8876FC0B66D5B51505225562A8182C073F73DF7A2A5BD0BBEE360D5454B71C9256B70E8E011DC73CF3D9830613C6EBCF166A452E44E13B8EFDEDFE1BAEBAE851F38F2F007437168995A79797946FAA565679A9F8E4AD5A2722EE56C53C34B17D4CD48DB94870AA49C2D2B749688DC904013AA2CC489C7F692665165C624AD95687B55C51B5A1FA28E08AF132AF7F8B14A6F1591C569899D76146AEDB796BE8904D067508F9247392EB96BA5BC30696E8A32841F33D5ABF227125C0528459A670BE72B4DA1F6551C770C1072C5A32F1AEC50A3CD7ED2F2BAA8CC4FEF6CB2F240B5B5566D578E521D64A39CAFA11A260C7C60665C19CF5A19C2558D3C68E8A02525E205D42B850ECBD07F3B4094BAE00E535239E6C7099F43266A97F923C38C0B546FD127211302D8B977073ABB3BC549089F11CA31B81C87DCB6C492E87192E8AC3F84716509799FCF954E425AD00B172E1443E5642A8E0B0EA0EB1A1A5C7546510000200049444154A4DFC4692225ADD288C52DA9F547599D0483089FEB2261873EEF80BA525FC0D2B69348CBB3EB8561D15165C1777A2437B365DAB062319166893EDA8A094FCBB923123B9F9394166A4A30810E1F5A95D43F8B1C8F2B752FAD44EAA855208D254807B1A294D6DA80EBA6A57D0408FED02BCC874CD0A723CD32132A7A2D5045080603D03A228E1A4DF2C61A70952A4CA90594B39152210D88BABA7956879CD53A0BCE654047A9F542DD7998AD208C055196B568AB55549CE4E8962016AD0A51EA09514744C08B8E4A3EA98C0C2F1230A31126AAF638F177AE06047F95BD906D5116BE8A209511C0A2C1E17555702875EA0602EAE523CE2339948109A2A157578E120A99C54A4BE0C2FE8C6A944505A3B5E33A4252161D755DE93B06E09CF860144067648E2A5042B740DEE7B5D8759467E65E27EF8150ADA4D2FE86CF5F829CD402CDE72F8F87633F949CEEDEB70BDD3D1DC897DC38E4A1998C8D81676925DB74F360D1F0400ABE38EC95ECF4F8F1E3426F9D0C9CD9C80B0EA0EB1949C8AD89610A27CA008F9809A47C0B3689D3809183DCDA73DE7AEA69486875D692E17B12812C1255EA1BA99650323665C7A98929A1C02125A0408120CE7FB536991A583BB4729585A5020DC42453E945C374A3E1DAAD2216C30010ED00D461D0EA7B0449E50552C11E94F56435C87CFF541487BA1E904C72CB1D17303E31B0236B256B052E4FCFB673E1B1B8CDD3C09389E653E7142062ED30C1441549990D4AE1E7EA5ADADA544D611E12DA7FEC578217393C02A40AD737F9CC189E2F61E00A7CB426BABFA0141DD999B1AAA58A0E0D682EAC5EC602E67352A0479DB71CA00296B8B0CB24A5A5AC646DD2BB2138F3583B8C94944C85741B4964AA52D0E8A098EC62E7A988520960F061323294D6B658E059099E3E5E162F2B1B85496380C02BD18AE1B392C5A4CF4E820609ADE9E1943A6B38AE1399BC641C67A2B808FF47B34E3867A571E738945C3886856DDBB6A0A9E1182C5124D9F0641CFAF02C5F9C8A89A04076B3A6EDC1F019DDAAE626E71839688E8993A9382E40806E0A322946A94E24584BC5923047744475AB763B5A00ACB688922E29CCC92CE93168432B447E93737C20F9E925AB9ED64786E0AEE04C4F2565D9C93161218113077678F137552AD19652348A30AB283ED980D0007DAA55FDC4EB4713FCABC45399D00909C0602765894FE9FBF07D65656A678C8AE79429206C88B26CD52BCC3E284443981E3693DC8AA0CE6AEB74D0BCF99E070602CA532F3668864608339169FD71F894327FF639715FAD76562831704854012B2AFA5427D751BB87F062A155A78A49A89F4CCFF6C94B2E5FD3F2EA131A97B3A04F352694DE9CE0AB94FB993E660A87481F33B199C7374C0BB66123C1BCEC0890A67F811A24563B224D85184C2F2E94896F3952D554EF8424A0299485E6288EF0A9D4372880565B4FCAC76981B03395E52B53555754914003992EF209815881B2215557F83B7F344087F455F6F90F40CEA4CEAD4B6A6990E2C4631B95E2528D99F0481941CAB3AC2AAB88AD1C8924E177F83E37DAFAFD81C1943A6A008D3EE9E922E01C1EA3EF417F45AAC084FD295793FB5220A668067DFD907B1650E2D6918B940668F6532C6C2D45FE9C12FC2EE5930307C4E883CA66F0D6DF0FBDF9D2F97A915625CFFAEBA1930374DF4FC25E8E24CC917BCFE425C9463D66AE132E649A37D100ADFA2FFBD4C48088148ED0967D966EC905AA0C6C26A84E95DDAFF6AB069CF3228211F0E6ECF4D51FB2BB33F9AF0E5221F58C5EF8266D700BB6A7AC6AF2CF965076E1F923D183390B3A7C323535B5B2F1D4B38C734FA66264604BADBF30CB98CA4DA5C85196C852095058922AFB7B66029C4166CF30E15DD81C02810ECB25C8B265FC3B4C8023EDE4EF0AB06038DAB43AF15FBE2F56ABCA171D7DF5A53BFA0ED8930D94810DECFE8FCA5AB66A4792DD59848B5308327DDF57E35F5255090073D1CAE6EF561A6DA9809301685221FD03E229DBAF2D7C098BD7246498794EC05903B4DE2DBC95DE50DF8D522D1AA0152828158CFCE8454E28A3EC7D457766274BFA7EB6C6E75BBFD3F3EB0C99F918199302D22138EB11A07C1280E19960D24865A8D1D863621C3EC31E0434A0E84CF40C511AB9060DC2887F6200003D7AF4E8B762319D71E70FC945D9DA9A2347250B27FB9F966FC6EA08B7B6B2C9A48240B25165EB0AAA49A1F32F2BEB3BBAD154CEAB3024F744488CEE5123166A68A185F6B3B26D08CA7C84FCC9FEAE2C4465C567365D3A07B58034918C5554486EE9BF35D00FEE190D9CDAD0E78D2E0061C7462FD9F74987A39D695589D46AC086DCB1F69E07CAD1A6905CEF6E140BAD00984BAC025045A2A8BE622D9CE806FEA4832C82E16A4286A966254DAB0668A673E533E5F21CAEC6991266FD6C34A2EBC20046B706E1687227062E300028AA9AC93A5BFB3FA98C5F5D9F3462415B67C98018DCE839BF8FE6580895CF6280C9EE555200AB872B249A446432777BC83CC9000AEB8DC20D77E2266CDF81E9AB5D2C0D08CFF4C2CA496AE7A75FA73398A64D9B3680D174F6FB7D482E2A968BE7078C91A7851CA3B34E78896CF56BC5F5867F0B8884535EB6DAAAD9EABF2AAB9D721265362D91CDBBB287B204A2FEE69B102BDC9EF3B167DB13263E5519B20480543BB34F560F8AD0EA0BF8E0D91EC5D166817E700F6F50B91A64E046288148E18213AE2AB71C1248217068199340636812AA09A2CE275B46BDAF08FB5E81B95A086937ABA710D22302A30AF0F56B20009D59A1335FD2B520B3A58C94D5AEB9F4F0C0BE273F39C7D1EF03E86F2164A878C5880A71B4669A73AA7CC13A4D8AC6880C05C7020EAAC90492CC9A73063BBCC18D9EF3FB688E3FC9AF2ED588D4B8F48D00AE04F784554AC5925600ADE80F851196E8A55D3874720BB6F8B0FC380C563AB21CD1F7730E683FCB407BEA82731206046849AA8D10A0C3CA24B47E09B59932DA5A66A3805539079557F7C422647C3F14E4840E860C1EBD890FD5567066F3DAC7426475952C0FADE451BC3E1F2EDBA9E127C2C788834C5321B2048520CD0584D2BD810E85F0B8C1300499EDBF5EB04EE2808A027458BD8B002D478779B865132083BECFFB62488B7E43BB10430B5A6D361543AF16C9BEFCF9C0003A5C84F5E6441638FEA1CFCCBFB2EF651D767DFAB5BF7E3B4DDF9FA0CC300C09A1AF0C015A9F4EAB7F4261885AA735B91C2E6072EFA195A74C02E52F1140103A4E5982041BE9A5CC42AA7C18629064EE5FE7B9CA9A1DEA43E5BC8DBE04FCD9538A810B8D15A5C936C2F26DDA07C10557B547AD1C6AB9D6171DE4183D47876B0B9AC06CFB6ABCD17A26D7CC71C92E568E4202B4026FD360EA5F0B96AFA4750468D7225FED2A800E2C78A6A3C408E1181F4CF32F3C80160D58C69E1B4C5F9DD36343FB326B699E3815B4FBB29F3664BF99FD30AB3C39A78D969367D52683B9D69B5A1DBE31E0F70773B1411DDB5F7F2AB07B6B0ED4D33782003DA25C25A9123DB6D4C92467AF803460DA5ACF459239C23D1601B2C53AA6049450E791EE126061CA4B214825902661262562368805303C2EFAAAFEA66FF60854D2FAF37C4B0517191E1C8325D768456A9A4F296484680B33E2F1775FA2197DE43954D204024E2C1DC71212A6DF1B169BE077E388F3BAA0F2C191B6F17C043505D867E2D83D7D7F9EC9117AA12298EAA79EB1C9FA28B5942840CD35BD0B14FB2E637FA95DA0F21B9DD9E8B9F0007AF024EB993CE7DC77723D30E81E10802E2B432CAE2AED5053CB4DB7728492C2F2E47F3673968B3F995BEB009E945FE3DFCCA346B0A0984B297824A882013596C0A330A2DC25CADBA6C06CB837B14427C39C32122024E9593DB11E2DC60804363C46808685217CCB861B3A3413928D8DCA06A50B367C0658057019394A791A532B505D498ED6244FCB95801257D202C30BA007FDD0CEF11772007D8E3B3877FA5C0F0CB4071440974BFA5372F12C7F462B98F440E0C69010DC2485159360169BD49AE72288113C59F32EA5822024F4DB02989FD86718B12311841262CC0458BE0F8F5579EC84142596326FB0608679525C568263C08CE1C363CA5AD742CCB7E45883741B2D738B414C74E64AD48CDC2203A5A4F005CFCFA01809EE8949D42E1712F1ABB00832819DF41BEF2B0CA91E681F5D68C7E500FA427BE2B9FB1DB63D408066D6BA984D8066D425A90D715B01669EE4FA26D0F5C243CC60A161153599320C38868F98E18A554A0A83E5D93CA601302DC445FEA52C5C265BA2A5CCC843CF2419A1E809FAA1854FB57C3848C064A10982AD41E0B6D422C1A34D0781E521CD7C14B4E5030B0E65A901291213A6D7058311B1661C1E2D75522EC217F08E68462B073679DBCCF67FD83E91A16F580EA087FE19E45A90EB01E90101E8B211B0E3AA928D68894C575401293F0F9B0F1DC3D809A351650135F58DC82FAB40257D538C5E630E10AF5734B70C83776D03BB1B8FA3644405CA8D5E98BE0DDFCA037C077104E84CB958BFEB200A8A8B60F6A6B070E64C141ACC57DC0327518098CB2A201E6AD3060AEC380A186D6B2B30A7F829E57A68696A911C312D6E0A13478F45CC49B3C4808442D35A4FD0CA6638BE70DBE4D229355332560DD002DC8375645F40E32507D017D0C3CEDDEAF0EE016541974BC22DBE62BE299C6DDA32D0E9E5E3AE675E835F58882FAD5D88F52F6D42C58C299859508896DA3AA13C465755206EC5D0D6D28ADAE606EC69EDC0C4793331362F86969A26C46345A8AC2840DCE9417D5B177EB56D1F2E5FBD18BDF55D786DC3067CE283EF83954A61D7A1439830B20289FC7CDCF1E48B985655894B664E468BD78BFA86364C193316AE67A0B7B31BF52DCD38D0711CAB972E44C3DE8328CC8F614C4539EC745AC57A32302914F7280B5CE988A92C516A921C409F6A54E6007A78CFD95CEB2EA01E20409795D382563C7122D48CF75A369A61E3F9BD0DD8535B878B668D46434727AAA64C40FDD114DC861A54240C1CA86FC4ACA52BB069E3765C3A732C1E7E69032E7AFF5AECDCD786B2740F7A8ED561FCCC09583E792C5AEB1BB06ED7015CBB76352A61E0B6479EC682C54BB1F1D9E7B16AC10CEC3978108B2E5D8A4737ECC692EA4ACC2E2BC5DDEBD7A372EA421CAD3D8E6B2E9F823D9B0F624469110EB776209DB450525E81EEDAA358503D12D3CA99D03E0597E6B6A5B2228A7055386856BAB66148442C017AF8A83886DB70CB01F4707B22B9F65CB03D20003DA20C71164A60C63EF2C6868DB41947BB6FE3C51D073165E174FCE14F4F21595C8485CB66E3E13F6CC6A7DF7D1146270CDCFAA7E7E0E45763E9DC6A2CCA4F62FD1B5B50346B227EB1EE65DCBC7609E2ED9D385C7310D7AFB9081D0D4D58B76D073E78D525280C4CFCF8F10D88578E859D7630BFCAC4A123473165F17CBCB1AB0E2BC68EC484823C3C79E81052455578EAE9D7F085EB97E0F0B643A828CAC7E1960E948EAE46636B37F26C0FCBC68D41351CC4DC4E04311329910CC6956430B4A24D3F9653710C60A4E7007A009D943B24D7036F470F288AA35492B9D3B94606809234D788A1BB278E5776ECC6EC15B3D0D0D689BB1FF8136EBEF92ABCF8E201AC9D351693AA4AF1DD077E87F1B317A3C4CAC315D32A70DFFA673075F5123CF4E81BB8EEAA5528365C341F398A259326E2787D231EDCB113D75C7D05F6EFDC276599E62C5F8CC3358DF8C09289A8AB6F42C9C89178F9D55D583E612C9CF6663C5B578F194B57E0DE754FE02BD7AFC081AD7B505E988763ADBD983079060A8A0CEC3DD48232B70BAB275723E675C3B17CA49983422C66EAA8C39067F2D0B4A07332BB530EAD1C40BF1D332F778D5C0F0CA00708D015AC05198F878A6552002CEEE0C2718AB1F7680D468EAB4641C2C6ABDB77A37AF26494C62D3CF3E246B4A5BAB07AE51254968FC0734FBF2015D6118B61E9B2C5303D032FBDF2AA1480B864E13C8C2E2E40472A8D9F3EF52C627905185354842B972D15A7E46BDBB7A2A641D5585CB97C198E377563E38BCF63ED6597E2D1D7B7C08B17A3BBA3131FBC7C1E9A0E1F415E2286960E075E5E01F61EAE912217572E9A87729F4EC694241272A804A1CA431C9F94E0A9906715AB97A337721C74A407825CA0CA00A02277C850F480D24157C08A33FA8E0127B4309D30DF754C74D192DB8FCE433B8EB4CF90EE00012B9A1B012CA707B604A5C4E1B01C172D56AA28021BBECD1C113E620E93F850E86C209D2850DFF303E4F7F60AEFEDB322107F3C5F2479CC771CB70CB8E93482780C8E94D83260A628C663CAAA001EA576B625CE4CB627964E23CEEA4160C27A06A730288541350C9566F2AB306D6F2E37C8698759CE823E6D17E50EC8F5C0DBD3035BB76E43597905E2319644A2A44D0135E5692A631F256BACB8C2506DFE8FD6A7AD6A0E3236DB7354A635D3822B55839881CD86EBC5C439C702A7F4D049FC0BABF2F02B4C1064FA92A58D117F5211C473E53A22F4E341AC7EC3D42E6E0AFC85D91224B045624F54D93387FC3283651825E805520351441C4AFD0CCB6068B7CAA92CD546CC407EA8E6C8BD4EDE033980CE8D8E5C0F0C931E501CF408C4241787AAFFA89214A9E2057C4FA5220DDF973C10444E09F98011A424308521D8C44786A1488E083FAE127A09404BB85F08D290325FB0C2F25E52D98BE5B774642097002E0EA654ABB62C55EACD60997616DBE575188CC2F34A522B43405782533CD688D4499A780E43F280B0982E53AC7251A0E48E7548242AD2B64F59FA69983CA2B7BD1939807EDBBB3C77C15C0FF4DF035A074D2761B490AC805F08D8BA66A3543697A443524613362303FD9444F149AD4D29344E25088192259798B343E71557D767CD4D55E95CCAA8ABC83EFE97F51833694E7DA13B6C9BB407230D6320A60B28FB2C861C87C3A2C98C966178B700B44A764BEB5D650FA1354F27A12AF7C4058596B94A36145ADA7DEA66E6C688EA811C40E74642AE0786490F9C0AA03560D2824E330844786226295296AAAAD012A6C8B5543E69DFF5108FC7F1C4FA273065CA148C1B3F4EA2FC68814BBE0E46F78596B9048DA85475F07D172FBFFC0A66CD9A8392922295E6D530E18456B3695AAAF8AF1FA0A9B109955595C24BBB8EC48BAB94A6643A4875300708091AD793A2CC3CB76DC64470175D84A295D687C9E31816CDC801F4B0780CB946E47A200CF52E67B2A4FE2DE8D6D656747676A2A8A808A5A5A5686A6A8293EE4549692962F1189A1A5B85022170575757CBBF6DEDED282C480885C06AEE1D1D1D30CD382A465489C57DFC783D6CCB4245E558016BDB36E07A297475A6505A3602B53547C5F27579CE716391EE4DA1B9E9387CD394CC7B3FFAFEF771C39FDD8CF2F2327476B4C349A75152528EBC8202D4D6D6C9398B8A0A2542B2ABAB0BC75B5A609B36CACB4A60DB266AEB1A6411E1E77C298B3EF7D23D9003E8DC58C8F5C030E9815359D03D3D3D78ECB1C7306FDE3C01DA442281BABA3A8C193D0A478E1EC182C58BF0DDEFFC101FF9F047F0D20BCFE3CA2BDF21E0DCDED581DE5427468EA8C0D62D5BB160D142D4D51EC7FC790BF1E28B4F63CCD82A343634A2B878242E5ABD1AAEDB032B16E00F8FADC7CA956B70EB0F7F884BD7ACC6A1C307317DCE7C34D5D761545525BA7D605CF528DCF3AB5FE0FDD77D10B66DE1E8C10352B2ABB1A9050B97ACC4F7BEFF3D5C7FFD3578FEB9A7F0B15B3E86679F7B0963C64E42477B3B2ACB8BB06DF3464C9E3A13F58D8D18376E1C66CC98213B819C359D1D9039801E269333D78C5C0F9C0AA05DD7C58B2FBE88CD9B37E3E28B2F467D7DBD58A4C9988DE6F666AC7DE73BF0D8234FE2339FFA349A8F37E29E7BEEC1D469D3B164F912BCFADA4B081C47B2E45D71C55AA41D0379C902FCE557BF8835972C472A954247872F00B965EB462C5EB600AD2D1D58B17C357E76E79DF8EC5FFC390E1D3E842D3BF762C9C20578ECE107912CABC4B5EFBF1AFF7DE7EDF8F4E7BF2096FDA30FFD4E9231054602575CF501FCF6BEFBF0D5AF7E06B7FFE407B8ECB2CBB073D741AC5EF30E14E4E7A3B9FE307E7AD77F61F6DC85686E6943414101AEBDF65AA16F72AF1C40E7C640AE07865D0F9C0AA01DC7114A63E4C891B8EDB6DBC492A6D5396EEC68B4B4B5C08CDB78E0FEC7F0A98F7F0231CBC20F7EF8038CACAEC67BDEF75E3CFDCC7A549597E1B55736E2E69B6FC2DEBD87515D3D16F7DF7F0F6EBAE93A710A767604183D7A34EC18B5CB293CF6E8E358B5720D7E7E1701FA933870E020B6ECDA8B8B562C474949215EDBB203F989185E7DF179DCF8E18FE08D37DE40655909AA4655E2C9F5CF61CD6557E1B7EBD60940DF71FB0FB176ED5ABCB17917162F5D0D27954663DD416CDFBA111FBAF1C348A55DA16348DB685E5DF3D37D9DA5A7B3AE6981EBA2BB7DBF3BEC1EF8001A94B3A007D049B943723DF076F4C0A9009AC0B565CB1671AC15171763C28409929E948EB7445E0263C74FC09EDD07B060FE02AAE6B07FFF7EA41C173366CEC0DE7D3B50555181B696361CABAD45CCCEC3ECD9F3D0D3D386030777239D4A63CA94B9A8A8AC90E4FECC087DE4F0318C1E3D11DB36BF8145F3E7A0BDBD0D75CD6D48D8163ADA5AD1131858306736EA8E1E46634B2B2AAB2AD0D2D8A07288C4F23071CA4CECD9B3074B96CCC7E6CD1BC549D9D2DA8963B58D22A79B3D630ADC5427F61D3822CA137E5E525222F446B4D279F4EFFE2A606B550B9F8F9225AA57F4F7B7E3D99DAB6BE400FA5CF56CEEBCB91E18640F9C4E6647071AC14B6B8669298AC68E0A0A8FE5AE62E2642390493E694AEF442297554C284063E27E06095205E2ABE4FD9EAD3420810B532ACED251497DB4AF825A6C1B69DF43CCB4E0A41D98F1047812566181AD026B24B528AF6BD82A809BD23BB64F17F60D98D82E8680118A3CD6776032D31D152711CB37CA4347EF876DD780CDD3EBCFA2601C2DC4FB3F01A873003DC849943B3CD703E7AA074E07D0046672B4FC57C9EA426B31D42E53FFC008424AE2A4D0298F11C064515825C3531AE7B09A49A06A090A208ACC4EE9E32885E33122A7A37E5A6A0E32F2C554E5AB2CD64464815A9E5B05BEA8C2ED61E56FD16CF37B0C3B67860F5E538135B5D7AA7D59B08D82B006DEBE20ADA90FFD39FFE5317A21E2DF3C46EBC3FB5AE2E7EA999DEBF3E600FA5CF770EEFCB91E18600F9C0AA0F52968351384C8490BB0B1ECAB1B88748D793B98E7C263F0475891450246CC245CDF95A84082A5C54840021C43BA4D43E991791C0BC1327787D42F540B00C19AEF13540316919524FBA658E5AE43B025887BCA2AA625CEFC1C6C97EB23C6A016C9C7A18E13C33CD461335085750F696A1358A3C02B581F06E6E8DD4054071EE5A9D91F1AA8294FD4FDC2F734F00FB0FB87E56139801E968FE56C364A9585CFD415CAD074D12C62E789F6542A5DAB0D73A6B27DE477DE110390F9220449804518BEA162EEFAEB87B3D9D76FED5CA7036802D34B2FBD24804425876CF9A91BF659391B787DE3CB98B76801D2AE8FFCBC7CB84E2FD2BD691CD87308B3E6CD830707B615C7B1DA1A74767562FA94A9028EFC71D2296C7E6333962E5D269C30ADF454AA17797909A41D0FBB76EFC2F8B163909757887822893FFDF1115C71C53BA4B415230993F124528E033B2F0627E52066C410B3633870703F468F1B0DD771908C25E132C9522209DFF2B179EB66CC9C3E4BEE835AE8DEDE5EB4B4B4C8DF1515E4C3036907258694EF516D42108E822F8F2710E7E7E763EFDEBD98366D9A7C475BD6E77B6EB41C40BFB53935CCBFCD782DC671313C4C594DCA54092B2C67DEE067E41B2368F736DF597F1E7765D9E994678C5C53DB70666593FC10612A0A02310DB82ED743636FAF843D57E62591E4B65C724778924A53B6F1BAFE92AE902D303E3C5EA702E8B6B6363CFFFCF3A281A693ADB2B25274D017AFB954246EF3E6CEC67FFFFCE798366DAA2C4994E111BCA74F9F81D7376EC2751FBC1E8D4D4DD8BE6D8B009DB63A7564229D8EC78E1D93CF088E04C5B2B2323436360A2852D23773E64C1C3A74480265D89EABAFBE1AAFBEFA6A065493C9243ABA3A85A3EEECE8C0AA55AB44DDC1F612388FD5D488239094C9254C5FFAE8A302C6EDEDED983469925C9FE7183162842856D8B683070F62C18205387CF8B01CD3D6D621C99CDADA5A71E38D3762CF9EDD3874E86028CF3370D965970BD8339F885029E7793AD31C400F8FB9798E5AA1427FC3D4376126317529499E231B5E41EC8C457A8E1A32A8D39E00D6D278D91BABB9161AC1746089734900DBC0E1A6E3A869EE86A40A62D1D4EE4E2C9B3B0B098B5F51FCABDC6540A80EE956FDDB30295A7A2A803E7EFC3876EEDC29C045CDF0A851A304DC36BDB105EF7ED7554824E278E28927306244392CD3106B3495763061C2445153AC5CB90A058545F8E31F1E159024D81D3D7A54AC4D5A9FEC73022581995188353535983871A25C73EEDCB902D4858585D8B76F9F5C97DF2300D382E5F9C98D73D1E075290524B86EDAB40953A74E95EB2C5CB810070E1C10F0E467047B2E386C8B80B6E7C982C3F372813872E488003B178C6BAEB9060F3EF8A09C23954AA3B6B6569EE7CA952B71F8F0211C3B5623CA163A44B903E0391438F3C19EDFF9A673003D28E838BF0E56C09C1DA2D92D7F08D2DA98E69F19C01E1A8BF2A49A557D13D26466630B2D696EED990C1EC0F1DE5E6C3E5C83B163C7E0E97BD661F498F198BD680E366FDB8977AD59853C8349E309D06A29E229B989C8DCE97900D0EC1F02167F08403A24BAA797A1D5C57257B472F92F79651E4790221D41AB3BBFA050002B9DEAC97C9F604AB024E0F25F8230C18F80CCEB1134F5E7DA01177D4E045B02A8E6816518313748A8242168F318CD236B6A82C769BE587F47F3CA5195862CCD4190A137146D41FA422DB8CA52F6E487DFE7D088C5E2619E1272D05497287EFB7C7DE500FA7C7D720368B7C6360D4802D6069D452AD398501AA181CAC29DBEE1B3DE7258E96200173847874479434E465FD256EA5C6B9280131E5C58B0E004168EB477A1A6A60E0FFEE66ED41CDA2715A73FFAE9CFA36CF27854E52730A9AC445A4A4056654AC36C6F4348E9F4D775A7E3A065890A4153EEC734E1FA5446D031A79C65920429FC8CA9444973089DC1674E399CA79D7FBE005CD4A9A6F95DADA088EA9109C27D1D7051A544147CF93BCFC54522FA8ACAE1A4EDB2882840D70B80FE5D7F4F5F5724857AB88699EFB4EC50B7837F6BCA462F1AE77B6E8F1C409F2390191EA7151220EB2094DCC204682654271F4B1DADE26903E6E7359849D81E3280EE2FC526A9182E1B02AA4120CA0397E1C4411AAE1320B00AB0ABCD41BAB515BFF9AFEFA3BBBB0D2927C0F2CBAEC41537BC0F6E4B1BE68F1AA913B5A96C6D1AA087C743CAB4E27400AD9D661AD8646D5509E854AAD0508D41299C8021E99F30B78576AE46C9ACFE762D513DB2B660A3D17B51ED71EE0DDB5D0000200049444154D4AAD660A9178E6850495F479D0E2ED1117FBA03F4FB5150D5CE3EDDAEE8A2A1AFCFEF472D6FBD109C2EEA70983DFE7E9B9303E8F3E1299D711B0945610E5E99C6946211B469D9F0FD98E2646586ABF78D8CFEE18C2FFA96BFC849C9ED312DB6DE544A1C806C63D2B011B32D183103A6C52D6C028E61E3707B278ED5D461DB2BAFE2F13F3C8AFCA2127CEDEFFF1A87DADA70F1ECD918499998CC6225EFE0A657AC4CBD83380F280E0D40517582BC474A833B8C30D08389F575FA516A9E65932079A3952F82001DD50B47F5D4EC229D0D4F07854441BA6F22237D6CDF6092BE0A0ABD1068C0D4FF46A574FD59CA995D824BA99FDA2168F0E577A36D8D82BC5E104E4A9BBDE511FAF69D2007D06F5F5F9FD32B45077B661087502C600420ED078899AA54A7CB01AEDD2852022974152A736CC0AF7EADDE308A8D27D10070226DA122DBA4B2869679398EFCAD23E5B8FDD63FD29850432BBF8B764E59D57412F6063E5EDD7B18F9A5C528B0F3E0F829347675C0EAE9C1AA99D39114CB324479FE26E433551D0AB20673BF03EE983338F07416B406CBA8BEF76420D4375063B88255B45DFDB5B12FB847170C6D39F7B5D0CFA0EB87ED5772003D6C1FCDE01A161DA47D013A05A0A69DD22A17D5A5052860C86D08CA625B3171BB447AA964EB3A34F7542D88F289FADA0457EDC8EADB9EBE5B5ECD3DEAC00BCD31462D2485C551991DDF50DA3AA997A702DF582C0FCDAE896D876B903412F090465E7E1CB3465649515356C5A6E59891D9F156E5DB2CC544567A78BC0692B05FB7B4AF951A7D3FDA87FDFD3E3CEE7660AD88521C510B5CD32151A7E4C0CE787E1D9503E8F3EB799DB2B57DAD68425947CAC193AFEF4241F5582462166AF6EFC4A58BE660647E3E4C3F04385AAE16950ECCE610B21D7DAEA427870661521012E0E05047A11C565417D0EA5532A76C29233D89A2DBE628A0F4059B28F8F3386EE355CD3D559E89E59B849AE12E40AEE3C2830D2E4474DAD39FC4DD414C8C661EAF9C5516397702BBD0EE1AE28746B5D2DF833C1D4047B5CB7D77249AB7ED4B03682BF37C19E6512B3A4A85F4A5534EC6639F2FF739D076E6007AA03D751E1CA707B7F6A8F7027862672D8AE3015A8E1C444F470FE65EB41C1B77EEC77B562E40B1E9C122A279615922E16569712AB580B68635F5A08196004C2F3DFF8D7AD7A35D14F5EA8B4D1E26F0893A70A2C7472DEC13AD41DAB98A8AB0323A6806AA78E8A07AE35803108BC34BA7D178AC0EA3C64F10AD6C7B7B27F28AF3918C9BE86A3B8EE5CB960924F39BAA167620F77ABE501C7A11D32A8E6C7FAA808C6CA15772B5BAE02CA924CDDB865AF2611498A3C7851E139AF252F239D5EE68D4A0EA03B5AFA2844E49F3B47854CE16D9FD0DCFFB1D2C8CE4007AB03D368C8FEF0BD06D8E87DFBFBA155D8DC7F0D4FDF7C1F603CC5DB10297BCF76AC99D30B5BA1CF9BE038B9A5715E2A13297994A17AB7FB475D6977E885A677D01F664807B3A8BEEC4EF29158A025553723928679FCABA565F730C5DDD291C6A6842AAAB03E585F908622652BD3E3CDF44A2A4141D4D8D284AC6B06ACD4561584AA883D63B8541F0EDE7FAD10F84837EB33281098354CD40F5990230F5CA02960455EA2AE0E7FA460671FEA8C5AC7767AC16137548469523A4E908CE5C84383E993B84B94214D82B7DF489F73E7C764883E896CCA139803E935E3BCD77B2F2DA48E85B386754F45E3696ED6C5E3E4A71F0BC8D1D9DD878A4166FBCFA1AB63EFB0C6CC347D5E86A7CFE2FBF8AADFB0EE3E28573502040A5D23E42B29C655FFDF1DA0369EF401C52FD01FA9B796D5A518A8C20406BE851444700782ED229071E130581A930F92E83596C18561C0E7967CF438CFF26949243941BC30894A3FD793A80960A2AC9642621BD72A8320F8789969656E1AB189E4DF012D0169E5E297914E3A4A4780266C2DDAB4C25D9F1A85BA3922D650E19C8433F0BC7B06DA4CC6841EB17C19951944CE6CF484746193A4E1A9D9D5D72AF8EA3005BEF284E8C1C0C73019C85B60DD52972007D967B3E541E87369FAFF247844A012A0E0820B2D10EF9D033018BFEBCD6191DAC5851AEE85F53A6855F3CF11C2A9379F8D36F1F428FD38D2BDEFF2E548C1D8DD9E327A1BA305F38676616532A87508825E750DBE4FE2CE1B3DC65A73C9D8A04A3A3D094643807F61F94CA1F4C9E934C24D0DDD58DAEEE5E24F312E8EC68C3CCD9B370E4C85114E417E0785B9B64552BC84F0A7875F774232F9184E3BA282E2E92C843665E1B2E2F05D0157D8AC62A2B9860BC61C3CBA8AE1E255B7B866413B866CF9A8BCEF63678BE8BDAC6268C1A558192C2221860063B033B76EEC0A20533D0DCD282FC82128CA9AE04635528A89494A2FC4DD28B6AC7AB1AAF56C0237C78F27E644DD3BB186DAB660C8FF0316903F60C3A5559D004682EA98A16A395BC6DDB360947EFECEC861D8BCBEF4D4D8D282B2B41616191245FAAA9A945555595848D937A63BE0E91827358EB95FD246DCA046CC971CAE371AE56F181B447ADA0AA059523AB86C49C18928BCA7DF7876E6730984EF695D03E11CB45863651595C562A4F0F013AEBF01ABCC4EBA45402A793EF23EDD079E78A2ED64F24B1B7A51D758DCDC81760726025E3B09C5EAC62D62F4AEB18B841B3321C107DB5AA511EF02C76D3804FA5B7BA6C07CB2E710DE1046C6E6EC6983163D0DADA0E6A7F351F5E545C80AEAE6EF4F4F6CA82A31D96EC375A66FC5E322F0F6565A5A8ACA8082DCB0137E79C1EF866800E672A20392E76EFDE8DCECE0E4C9D3A4540BAA1A10163C78E87934AE1E8E123309371545694A2A9A101458595088C18EA1AEAB074D10CECDBCFBEB3B070C11CF8812171987C11A04D82B10C551B9E61CB2E4301B42B7FBF1D00AD9D7EF47B6880D677DFDDD5850D1B3660D6AC39A8ADAB17F46291DA8E8E368C1A552DD5C3C78D9B2006C5B871E305E42D4BEDB334F89E0AA4A3004DA7B27A9D23881ACC0E2E00AA72007D36E75C6885CA2AAC86BF3C6F9D0C5D246DEA13A54818DC38E86BD546D71A0219B780B42CB5A2827286CE204073770F761DAB45CA4963F2983118575488227296E24C0ADBC0506AC169ED6052CD1B6A0B5AB7412F14D265929B38EA08535B7AE971096D5609E3D577B3E58FD4EFD9E7AD542567F3F9BFB573BD19A0B3E62833D6F119B7B6B6A2B8B850F26B7477F7A2A0B01805C924DADB5AC16255AC52523D72240E1DAC454151191C378D823C80393BF2F28A503DAA2203D04A1FEFC120184B84A52D202D794A585965C8005A511C519F0A1329959797E3C081432828C81780E63326D53172E42834361E17EB9999F094E5CD31C29D6AF69908A3D3CF6B20C7BCB5277BE6DFCE511C67DE77FD7C5303B4629A694367784F728199ED6008DC8300E82850EADF396125DA8ED6224CD9B66B6FBF067F12043E2D22BE41AF3713D998617E3756C490B06F1F8EA72A75506827A58EA4AD0A04FB2A324EE4F9CE2D4510BD767F9C7856D5103234C2B7AA68399D1758817A76769E29B77E56874A3F273B1D07AD658A3AB190E4AD9000A34095AD621A565637115F590CA6CD7C1864E27B85CEF0034BC0984E5779F24201E8407A3ED5908E9335DB8329795022696ACF61079C6841C74F906946952BB1181D884C8CC4E2B01C9BCA24E5FD657968064851E171A264F464007D0E6FEB2D9F3A07D06FB90BFB9E20BB45D2D5D8D4B00F3DEADA9A1EE44E2AE3DC09B39A9183E48B7C2B338A7141709D3452E9344A4BCB24593A7F9F3E7D0AB66FDD81CA111538B4EF000ACA8A112FCA47CA75E598D6C626941617A1BDA70BC9823C2460A1A7AB1B0B172E00BDE9DAEA540017F590EBFB3EB7001D9D747D6BD0658136DA36D5AEBE6A87BE8ECB289573D687C0199E70203AE8BE0B8D410769C0884C17763C26748FD41134E2E287901250CCF927FE045DED4048B6B095CA94D0651054CE3F95A25505889FDBE7ABC71477454ADAE9A90C78DA828E3C4BB5C652AD425B83CE41BD28EBF7958A458059FC9C598A43CC8D01EC96B2FDA292720DF52B07D067FB09F4D95269A193A835A3CF7B008325DA340D46740C7100D39BCFD7860DAFA0BEBE0179F9F902A87CB92E5345AA4C618B16CEC7ABAFBC06CF0FD0D1D585A2B212049681C07331BA6A24766DDF8144320FC99262D88938CC942396D345175D84A2A2828CDC290BD07D07EDB99DC0510E5A26591FE765B48FA232C0682083FE5EDF47DD3720E66C0F85C19EEF741674DF124EB2BB892A31987B83F44E8635269805AA36A186E02CA795016821B6B433F64D12BD73FB7C75EAAA2840C7E2340C948350C67D267B1D2D63B52B0DE8DC14B9A5A6BA4869E84995CDD921DB477DA7039873D105492D5C43FBCA01F459EC7F256D0A6782EF86BC0233C829317D36BD27493E355AA2965D74EB1D05223A4EC83912ACC8C3F5F7521687B21C18E5C7014FF995E7A56058069C709CB32A735C6449AAE0663A9D423296276D9482A2A79C8F7AB989B6E05C4FE0413EA0C11A3D0398B4836CC1191F7E2A802695C59D5234C56686979714A3DCE62BC052811C063CE68EB66C780272AAB28E1A8B2A67B4244D0ACD4DF53DE59350E755832953E43503DCCA69F1E6053B6A8A0CA60B941495E395A9535DD7473CA60255B4C2868B07DBC9C50786E88E008379A06945ABF1A7683955C59CD4075FD1C5BDBF85BD3F5D3FA5A6A4476C2B4C819A99D03CA32A761B3DAF4A57A52C77452F4A7281B04DF40978617E6A46B3EAE4552A2BB93A5EF5B1EE53D9CF48908E2AB63B79D2842119A14372D11010073B854F39DADEE444F3A9DF08073739416E33657B458DB1760CAA4C103295FAB44673C87C480465BD15A7C5CCC178B2FCB6E17C82EF05D8B56BB77CB7A4B818C7EBEA112B48A0786405DA8F37A3209184159830ED38D28E23C7CD99390BF1BCB82C1AE1BA71927B7EFB298E814FF5B06D03D9C7464F3A6423F1CD77763A0B9ADF88523799B1422B526A137262AB1458945A1A521A8C5676A86FE7A21C52557CCE921B5A00459F57298C644C33317E48CD69D0572D5640A801FDAD07869C08D01E019A1674184948702650133499AB9C8E4C716852BB2FE0AC0C0DE1D87DAA3BC8BBA7A5A5043F05A86A6CA8F328EB3A6A1845FD1C328FC2EF4AE08B04BFE88C80EA5CAA8FD50C36994A200C14123A4E7D3BFC4C596BD1BE328C98CA2CC842BA6AC9CCD03119795F48E5F0318CACAA1892113A24173D9B00DD97D3CC58BF46801E184885AB683E022464FB9875C044B596921E923C61386868D5688F3D6BBFF1A513A96B2751BF16B4F64F1A90A00596462A2D2E41E7F1767831136563AAD0DDDE0EDBF5D1DEDA81B2912351535787DE9E5E2C993F1F166B4399CAE83FFDC3198E0567CFD4821BF81270AE8F3C1540EB2D7F5FCB50D11C814828130C79770218D401FBACCD487A83CAA13CB1D298A3440A7F49156E876A6749BD2AD9C199EC5E1E3C2B77B32F2DB8E25C0ECB8599EA98749A1236EA8CB58725BA682B481FDCEBCD00CDAA28E2F4F41C09C4E11C49C4188C44808EAB44FFCC5F2ED55428CBA3EA43A977141B42EE9D65B94C29A04B0026FD97EAE9956355F51525C1E43D7177C239C69DA77E9FFFFA727D75AFEAFD985085199E9E8B1C35E482E0AA008129518DAA0801C15D392B1510B35A3A6B188873D6601E19FEED885124D67CB8D3763CA657652A60A0AA72C4E9A7E3E03A7C40470FC945CF04A0DF6421F7B93D5935431ECC370CD07577B03B85970EB7A3B228814595F91813B761691357EEDC9749405D2AE59AD104441C2404660E98BE8BC0A97A364A8F642C020E56D7811BB324E0807614B5CF6C02ABA77822ADF211E3273A93DD903D99018D9BFFD1079D4A66C771C17A809491C56296EC7C4879C8B384813163C7A2EEE831E4E717A3B9AD15C93C0B85F909B4B7B563D4E829282A2AC4EE5DDBB9838793EAC5C47163D0D0D08458220FB1781E6A8ED5A2E6C861CC9B3353E498070ED7E08A775C85E3F5C770F0C07E548D1C85BBEFBE1BFFFCCFFF82AEEE9E30078BE6BB95A578664E455D3EC180173050C5433C460B5A011FCFD9D3D5893F3CF628C84D1F6FEDC1656B2F47797931DA3BDA2470E7D08183D8B2651B56AE58898EF6768930ECECEAC073CF3F874B2FBF02D563C6E29BDFFC26BEF6D5AFE2F6DB6FC79CD9B3B068C142DC76DBADB063163EF6B18FE1473FFE31D6AC5983E2E2526CDBBA45EA1C7EF9CB5F96E2BB0C8C61EDC59A9A6398BF70219A9BDBD1DCD626CED835AB5749D1DA8E8E4EA5CB6F6B473299270652221E135F106B3CF27C9595ACB5588B8A2A150DE9A61D8C1F3F0EC9441C5BB66C5121EB868931E3C6E2D8B15A54565461DAD4C943322387E4A2670AD0279368F505EFB461E058DAC17FFCF10D3CB5AF054536F0C955D370D3A289A02D2C369EA1EC0015B867A0A7B72753FAE784FCC77DA0A87FB95BF620D9BA85DCA00AEFE5021EF28E2C2FA4F669928F4306BE845047DB144AFF86ECC9FC8FC6DE01DDDCA902551860B37EFD7AD4D7D7C99698C55819BCF1898FDF82E75F7C490AC23ADDBD282DABC0FA279FC6473E76039E7FF649E1730B4AAA71E9256B70EB8F7F806BAEFB005E7B75034A0AF2D1D4D8847113A760D3E6EDB8F683D7E1B777FF0A17AD5886FD870F61F4B889983E73369CEE0E3CFCF0EF71CD35D7E2FEFBEFC7DFFCEDDF8915AD39E8ACD2E16C02745C516D818F82641C3FFED18F505E5686445E1EEA8F77A0A0A808A954373A3BDBA5606E5B6B1B366E7C1D25C52512594A3D347D2BFBF6EDC7873FFE09B89E872D5B3623D5CDB9E648D18799D367E00F7F780C13268E97809F8E8E0EBCFBDDEFC288119578FEF9E7049459517CCAE4C9D8BD6B17962C5B26E05B545282CD9B77A027D58BA54B1663FC9851D8B8712366CF9E23FD3376EC3858764C8AEE5EBCFA22A93ACE4595DAEDDDBB77A2ABDBC1ECB9B3B17BD74E94141563FAB4A9983D7B16BEF5AD6F61D9B2E5122979ACAE1613274E92E8C8BFFAEA978764460EC945CF04A0A3338B80C6E49AFC69ED48A1B9A911ED6D6D121C52513512C9927C1C6EEFC6371FDF83CEAA69483ADD981B1CC7D72E9F893256970E030BCDC043AABB17DD3D29E433DC3A163BA1D8A6C2D2373B114F39CB4327858C6B061FC8162BAB43128555C897D192A6C51C928C92BE93C9EBB58C69406832EC0FD25BEFC10C354DDD64B7E959FBEEDCDFF0A942BDA9DEF9F18F7F84E5CB9789EE9D0B32ADBA9B6FBA11F7FCF63E4C9A3205FB76EDC2D8B19370A4E618AEFBE0FBF09B5FFF02B61543E5C809B8E6DA6B70EB7FFD0037DC780336BEB641B2F931E8A36AD418F4A41CA41D17BD5D9D282D299490F8F193A661D1D265686DACC313EB1F477149A954E5FEDAD7FE1F3956BDCE9E05AD551CDCDED35051015EA4266C3CB57E3D36BCBC01F3E6CF47A2A01485C52578F9E5E7B178F1622C5EB44040F9CE3BEFC4D429D3D0D2DC2221DF2C804BA08EE5E5E392CB2E43DCB6F1377FFDD7F8E217BF80E6E34D98336B367EFD9BBB0594376FDE2C69046849F3F5FAEBAFE3F2CB2FC7BA75EB24A43E66DBB878CD1A6CDEB255E8C386C66604A689D5AB5662EEEC195877DF7D225B1D37662C9A9A8E4BE839BF3767CE6C3CF9F49358B16C39B66DDB8AE953A7A1A1B919E3C68EC38B2FBD2014C7DAB59763F6AC9962D92F5CB808C9BC7CECDEBB07ED6D1D9838650AAE7BFFFB063380CFDA201D928B9E09408BCB4F1C0794EE0738DCE5E0A5BDF57865F336C40DA0282F89EE740A3D5E80E9336660F18C51F8F5AB47F1E8CE46142285AFAC998C0FCD9F089B593D597DD8F5D1DBDE8A7CE610C84FBEED916CCAC71F91340FD993386B63E9C413092E937755D59CC9AF4AD27F710304707D2A1B42F916F7FBA1FCC534F9A4B9F41A30590A8CCFDB60CE0A75866C8980C172AC03BFCF5371D09CF0DC6ECF983143DD572843237FAACB4129599A2CEFE22863B49DE2585DF8811F2A13C2283B2A15424E95C680CA10A7FA4C49149936807D452E57658BE3FB2A28EAECBD44CA26A42C836EB40E5AC9459533D0178024AD435D379DE05AA5A27377906F6600CB9B5F8A9F4F3B29518124E209E19BF56E5417B6E5DFBC47D248FA3E5522AA6CF5747E2FF3779835D0237D9876B077FF3E4C9E3E0D49EAB7BD303C8D1C366F8B857AA948A163D5A39356519ABC365FBC26FFD6DCB87A166A8CB13FCACBCA8764860EC945CF08A0C532F5903280A31D2EFEF4FC6B706063C2F4C9889595210D0B493380D7D6869AFD0751D7D286792B16CA56A62A2F86E9A5169CE6E3A82E2F97C913B71388C76DED0F18B202AD676F8A0DB333A9EAB2522546B9664D989C29C22A499289D077AE222C61AA3C14866F432A18841E792D8992D349FDD530E8E11CC6869F4EC5C1894B4754B43E5F345FB2D2492B8056BA6615FAAE25952A784349E4A2B2B393E9C1A33E90811C7F262341951D536DCE70D0043AEDD709E57F2247EBA37A52F7D157AB9C851611A3F07BE1353430F75571E876F777DCC976B219354DA8A07119D92855899463960B82A8B99493491909E1B127A846C26022BEA75FD16B8E1C397248B072482E7A26002D468519A02D08F0ABA737C1F40C2C9A3503F5410A0FBFB113875A7A501533F09E39D331A9A404BB1BDAD05C77001F5ABB1CB1AE56FCE0473F428FEB61C2E891F8C2673E27455915FBEB0A9084354CCE646CE7BED35F0F4432BC72C7C3A4FCC45D79F61C75921D4A852010B74D838139045F7ACD5525EC4C3E92FF9FBDF700B2F3BACE04BF9763E71CD00139E740309BA42952924965C9164507057B67EC2A8FD763EF6CD554D9B3B35B5B3B6B595ECD682C590E4A54A4324951CC0104488044CE6834321A9D5FBF7E396D7DE7DEFBDEDF0F0D7440B7BA01BC57D564A3DF1F6FF8EEB9E77CE73BE379496671E44EC4E230D6DD78C55ACD770A9C758CC1024C8AEEA568781381AD01AAE2C49889CE9BCE8014FD170DC60AA0958BC3FCCD802A9F5D59963A7468A5BFC9F9666F38B6838A1799423B8DCD4130F43BF3FD54DF55DA4A688BE49A6B7D853CF2ABC7B6BE93955CA07149B13DF4E2698EADABAB9BC51177ED1E9B939B4E07A039C663D91CCE0E0CE36B3F7D098F7DF04338373482BF7DF56D0CB82B8463EAB1DB51171BC517EE5983BBEA7D787BCF2E2C58D881E8B1BD3875F408B6DE7D1F7EF0BDA7F09FFFEAAFD1D9BE50E43DB3E441DAB9D22A5A4EE933432D60751ACB9C5574302641D8EC2E647276A9121E4D2511CF01D51EB7B8AA9472B2AAC9A8FCF13C8F2E10E5AB679F299FEBDCB838B815167A99CD96A78599EADCE3818B1568F4F2A41351C602B4B5D5AF150C9F2E684DA547955B25233F790693E6081700CCAE32278D58D6984C3F8B05AA85C80C255E2A9F93CA9A4F26313C6EFD849AFC2C9C719DDE4D80B44A0B5C93562B0BBEDE5DD105438076F05E426894EF58968DEE3203DC562EBBD5AAB75ACEA6CD3B3A3AE6041CE6E4A6D302E82C10B2013F78E13578DCE5A85DB206FFE3855D783D1544D415105D67769E379DC092CC10BEF4D85A5079AB279CC0067F06C7F6BD8335EBD7E1D7BFFE15BEF0879F454B638B68CE929297CE51645E09C9973E33D402669E6A473B7DD16AD2D991CCD990B0D971E0E809B8BC7ED89D1EC412692C6AAA46BDDF2581536E4D39E7ECDA1FCDE25802D0A25048FFE2EC15999DC8C5C1096C2C4CC3CD556E0BD6613425A0CC68528257856DBBF97DAC8BC30AEEA6078AB7F5C55B7FE36299A11E93CB1403B45A2A15075BB941E8B6E232AA1268D439C6255570E9A842035AC697D6A826FF89CF9E49391657825C44927A0B017903EAC5006D160903DAA64D142B8B710BD5BEE24DD35D20E941DADD2165DB34985BDBD94A8F1DAF3D4BA9DE138C322EAE9772C0979FFA213EB8651B8E2503F8E2CE93E876542265F3CAA42604D81C7654477AF07F6CAD414B6D3D5EDBB917FFE92377E2BD37DEC089EEE378DFC30F6251DB42D845A83F85ACA4E0DAE154BBEAD267A65AC0E29620A02A4FB40DF6AC1D11BB1D3F7F6B37B6AC5E819E0B3D180A8D60C1B2C5E8EB0F61F3C22654389C797A974C7ED9978A5F44A77C4E271163F22F3619B124038E85EDB24ACE28248F98ADB44AE75769DD2A118A606C804752A91D0C0C16742BF2A063718D58B7E5AAC49472419880DAE4DFEEDA47E6FDCDBA2ABC249ED02A95CD0ADD54EA59730C64C229414F95D751F0F7AA2083E97C93F861433A9383C3E9C8EF3A84E5A4330BB34C0BD7D9B9C6E540374BF14E82C141B37B313538D96E63762EE6BAA214A99250CCA22349376C67AD95623282AFBA8675A1D0167CC9C531C108A3F3FF52C6862F7FEBFBF8D8FDF7606FC88B2FBE7D065D2E376073C39D25412083ACDD8DCAE830FE6643251635D7E3C5D777E03F7FFC115478B5AF536A58181F9A7847650B5D02E79998E2966B685724FFC77E11F6052B8067EC38198EE0EC4818B9F3FDF8B7AFFC03324862CDB6CDD8FEDB0FA3BDB5190BC8AC111F876C8A55C05063729EFD32C38F6BBD1C01BA4A2AAA28853A2BD79893399E484A12049914645D24D349D93E7BBD1EA1862D59B24C808CB200890459070EF87C5E5CBA7449B4C2172C5820DF9391409EEF8E1D3BB075EBD67CE0917F0F0683C2093665A768A99346CAA418F27DEFB8E30E4958F9EC673F2BC932575BEED36F2093B065EEADC282AAB4D9C10307108F2791B1BBB176DD3A11F54FA6E2F0FB7C181E1AC6E5CB17851B9E4A26F32E12D2E756AF5907AFDF07960BE33BBFBD6B17162D5CA4B8D289047C5E1FF6ECDE0D97DB8D152B5688956BDAC8303B582861FDFAF5B2285DB87041DA9FFF663BB18FA40DC892B13B845EC744B3706844F8CC0BDADBC4374DB70DDB92CF104F247060FF7EAC5EBD5A59EF12CCB4E3FC85F39270C4C5C0E9724976E8C28ECE39818839B9A9DEA61496D9498C25A6760E03F8E62F9F4773731B72758BF00FBF7E07076C7E245D7E649359385C0ED833393446FAF08F1F5C8DD1D1611C397F097FF6BE3B5121FA2A5C4D0B928E6ACB4DB856018FD267665B80AD6B4ACD2A9F322D451BF65CBA0C7F4D159EFBDAF77174EF2ED85C19047C417CF44FFE3D9ADA9BB020E88757028639A46959E92AE77447C9967A967BEB7A001D0A85F09DEF7C172B57ADC2E9D3A7E1F678A5CC55435D3D1289980083DBED456363A38011931C98C1B66CD952C95AFBE94F7F2AE04AF71BAFF5BEF7BD4FB8B70F3DF41076EEDC89CECE4E016E728809BCFCFFB163C7845AC6F30281009E7DF6592937F6E69B6FE2EFFFFEEFE53E133123A6D2B3B43299794780A6D017697FCCB2FBFE534FC9BDEA1B1A70F2F4393434360A08F6F65EC67DF7DD8FC18101BCFBEE6ED4D6D4E0724F0F5A9B5BA5B2D0E9EE6E7CECE31F87DBE3C1ABAFBE8AD5AB56E3995FFE12F7DF7F3F8E1C3982B26050DE399D4ACBA2C636D8F3DEBB02F44C5E617A38DB818BDFFBDFFF7E3CFDF4D3D8BC79B3BCF3DAB56BF18B5FFCB772122B000020004944415442E414EC4E077AFA7AA55E228B6034D537E0E8D1A3089497A1B2A61AE565E5B872F9322E5FBC84473FF07EC951D8B777AFB4EF86F51B70A5A747EEE572BBB07ACD1ABCF0C20BF0070270BA9CF88B3FFF0F7302107372D32903B49AE988DB81B74E9EC273EF9DC0030FBD0FEF1CEDC2BFEC3F87414F0532368F583181C8103EB6B61D7FB0AC127B8F1C82AFA109BFB37A21828C3EE7A814C7BB2BE52B138C9ACF054CA732B1E6D3B185D557D502573B15069780D3E108BA7AFBE10DC5F03FBFF4DF44B272CB96BBB1F5C1DF42F3824634960711607F092B4F09DEF01A8AD9AA0388B3F8B21303F453A8AEA9D57C5C07826541AC5DB3063FFAD10F245BCDE954EC074EF664322D40B36AD52A9C3DDB2DE0F2B9CF7D0EDFFEF6B70574962E5D8A9FFDEC6762C5F1BE1D1D1D025004FACB972F0BD0335DB9BDBD5DAC45023501BDADAD0DAFBCF20AFEF99FFF5980DCEA9F2E0EA44DB5A9C6B038324A8F3A180CE09BFFF2AFB8C2F25E6D6D707B7D08965508E0324985C0C9249E6F7CE35FE57DF99CA4B292331E0A8F60FBF6ED58BD768D2C4A7FFD1FFF0A9FF8C42770D75D77C902F3E0830F62DFBE7D9260C205A0B5B555007AC99225387BF6ACB4C1A64D9BA49D04BCF7EC917F5351928BD6CB2FBF8CAE93A750595D85404539D2A99424A57CFDAB5FC3F66DDB303812029C0E4992C9A4D2A29572CFFDF709C0FFE2E73F977BAE5AB952323AB9436199B686C606A9C148706662CEEF7DEA77E7042BE7E4A65306689E905135FBFAD3697CE99937B0A6A3134B1B6AF1EBD317F1DCF18B08D9CAE04BC7F0405B351E59D581D17814870FECC1871FBC171DE565125252B42DE5D630D5A909CED20873D612539D3E37DBF12A5AA860DA46FA33C2C8E1991D6F61DDFA7518ED1BC0D05004D51D2D18EE1FC1B685CDF0B342B6A983934F78E12FC61535FB3EE86BB938087EB1585C32FA98F64D41218FCF2B02474C5F5682403E7165508B62707058C08A5B6A5A89B446E916301578E8CAE056DDF85E6941F2779E23D9737A4BCE6D3DAD67E36F354C0B9ECFADB815A06F748458015A980E5A9680AE835068485C2D3607D5EC28A4941E2322C6FA8454C1631A3ADFC568DA10BCD91E742110044D8208DBC1F8E6F9DCBB77EF96C587A06C449368C9D37D41F1322E7A6C17B605DF9BFF665BF37AFC3D3C3A8A80DF9FDF5150E695F39E520E4E1201EC2AC927501614B7464A44A754D09216BCB89DD8CEB9AC6A7F6653DA6D686D6E99138498939B4E0BA07574368E1CF6F50CE0F51D7BD1B97009EADADA104EDB30301A4759C0856A770EA19E1E1C387C0C77AC5A847B5676C2AF39A934C9146D4B65B6896FD3F8D7F202EA373ABC4BE7ABF6356B9E2A846B92910930E15814F0B870E4CC59D85C41D81D5EC4D3312C6FA84583D72305D89979C6A995A7D5E61D1BB3BFA25ECF82563E16A5D8A6827B225AA977098AA1402D65A3BE6667A5158B26B21AFBF46B9BE415CB5E43070A8DBB82C75A038BE6DFA6D49675A459AD662B7D6CF2A3F1EA441582936263A85D8B8A15AAF6A7B67571A289E1482BFE7781C5A29E4D3D89298166A88926586A7DA7628686F51D8C0EF7557FD33ADBE24766760303B39A66A7FE2661499179CDD3FE747052125644E94EB348549694BA855662A8AF2DF1A0AF3F9674D9766E96D9F8FB2E8FE0D9B70F211D0E6345472B1AAACA301409E1F0F94B4866ED7874DB16AC5A50854A5A63DCA6D1B7A1DD1B05F8503AB62AFF98AC8ED9E3D64E7EA2DCFC476A8F9465521752DA074743F0799CF0BABC48D91C08D1F798032ADD2E78753030A333BF1D020EE358CBB36C564C08D0CCB63300CD67165F8CD2C5E038535AC58632A6E7B9D6432E48DA2AE94C6B5284D58F6CC0D864B61583B63573511B3C5701E654469211BCB766123ADD2CBCA65827A2E1CCEA409A8A6778CA85F7548B8E750EA9F753017911FB976CCADC55B535ADEC112BE759B5A72E68A0CF357F2B5E8484724DA688A472676073399114ED6A05CE5CE809C2C40E03D0F4AFCB02648A10E8B4FD34CB786919024D2C4463FD6D964998CD982241577B178CF595B7C2446B97B0AA8A71B2A113B0239400BACE9EC7C9AED3E8B97259AA2CAF5CBE1C8B3BDA51ED77C9769A5B4F99E496555D69C35A54E33445C00C9499DC2E4E6592DC8CC7D2F2A1C00D2538E90FE4B69F91EF9EBE01343537C90438D77D4602475C0CBD013F3C6E376AAA6BB17BDF5ED435B6C0E7F3E0E4A12358BA78919ABC4E17FA07FAE1F77A313C3C88C6C66655C1847AC45EAF6C6FDF7EFB6D2C5CB808FDFD7DD8B279D335B454A6A7977D3D9A1D9FCF6CCB8D5B428185627B90DE4BAA9D4AEB36F757143BEA6A18CB5A29136B70175A9AA2DE495C841C707E9FA18EBFCE7815EB5A59D4A974A25086EAAAD25926843AF5325185F16F438AB532A95331260B52092771FED10DA2DE4901AF759130BF5B2D6123AE2F82FFDA0E52D633DB4A99AA229E2F9C7153F0609A33C2C2201AB396DF0005A8B5B57596CD82F1DF754E6E2A1D98CDE564001B3D023D30294C62E43AF3ABA46C33F41645066A0E895416703A45CD8A65A4FA07C2F0795CA82CF320160EA3A22CA8565303CE45EF2F2BBF68411BAEA6E2AD5AF9A9C6BA99E630B92D4E2358515D8D00BD72E54A09EA305B3091525B7F6A30545554E04C7737828100EAEAEB100A8D60DDFAF5F8F14F7E82A6E6660135AFD381458B16E1FCF9F302F2F473D2A748BF23A9580CE41030C81AE071AC01C9EFE96678F081FBB5F55AD4E4D2B966EB3EF9DDD144006DE5311B3052C8A2C02B473AA11EAF640D29E0E1A856415291FC92A41B6EB9191151A2F2622DEA19C9BFD96894D3DD2355B10D80A9925AE28BB6589563CD1C3557A6F3518B4C4EF4A08D8B4359ADFA6AAAA694EC3B8DBBC1A1CB5259136B8CF688FA9B7290109C792CC5FD0BEE9182B09411F857BB863983A6719BADB9B9794E1E684E6ECA16C8643239ABC68075CB62B673E6FB9E2B57F0E22BAFA0A2AC0CF1484454B132361BDA162DC5C58B3D58BD6205CE749D473C368A4C2E29B5FFDA5B9A8562D3D0D020560B79991DED1D58B3664DBE030C185B7BC49A245002E889A738DB8B20CD1F822AFFCFD99C92640C06CFED0887C21230221F58C0C9A6180E831455F7780468488BE2F70CFC281781B2A494356AB6C56AA27B3C4CD048C871FC290BFAE5FF525A694C670A7C1648D413BF8E1C3111405B2D46055EDCE129D68940A3B085B4529F521BD1DB7AE546936D3FC56574719F6C5AFB7905A095252D5559E22939864A7E2CF3407093CA1F3AE185D6AB49D898E4AB5DF330EB6E40F1A009D01EBDE0286A2A8FA18F9D3B1917E985192AF131614505FD4C45146355B3128B9CE320F758F5AF2AA2ACDC0AEA7CD63D54FD58289B3567B074CDF6B9ED1255B2D96CCEBAE25AC1B2D8D5101A19C1EEF7F68A255655518E68741476971BE11865096D68A869C0C8D0103C4E2742E121F8021EC4E329C4E3313435354B94971161D2775A5A9AC50250EA5AAA3F8CA80D9F47C8E9B4CC8BB776373A036EE1F3D9565266485B7467CF9FC3A9D367D0D9D121B426A96471F122CACBD97751E1D7D23A1B1E1E862F1090083B3259B4B43609558BEDCFE40346D1693D1B09483621695A0B172E44592098DFE617025233D3C813A57A938530369B2F0EAFC785443203A7CBA70AA6DAB3482513F2ECCCA2235F3A91544C021733013349E55D77B8E538BA32320445974778D507F6EFC5C60D6B1550BABCA259CE76318B20173063B9CECC5BABAB18E0A4B83EF9C0A29DAE65387B7B7B641E55945560F7BBEFA1BDBD03274F9E143A5C77F7696CD8B05ED1E516B44A75133231B8E33971E224962F57BCF1CECE7659782F5C382FB4C15DBB76A3B373A1D008D55C5465B2CCFC9BC977BB916BDD766A76F1783C47A1734E4033D8CD04E7CACA41410A11B7B81CC82C0914898C8A2E6EC0E717EA4F2A93119173AEDE24D247474611F47BC59289B3569BD674B52E046AD576211E8BC1E355DAB512C165643A430A945B683826DBC8D0816EA4736FF573AD0C02023045DA7BFB06A4F61BAB55545656A0A7E74A7ED2912BCC063FDDD585728AB94B2DBB8CF43739BF46EF977D50162C436824247F633FB23F9889E7F3283A9AF5DE06606EB4BDAF07D05C545E7FFD755990489D2358334BB0A1A10EFD0303F0CA73D9E0F705F1DEDE77B17DFB1DE227AFAF6FC0C18387D0D8D884D5AB566160B81F17E90E4AA4104DA74D223C5AEB1A11898EA0A7FF0ADA17758ABBCE96C961381C436B6B1B366CDC209548C4125514F119FF88054DFA9C4EF52660F267F7EE77247184F533CF9C3D8FBFF88BBFC457BEF2153CF1C4A7F1C61B6FA0AAAA52161082337F3EF4A10F491288DF1FC4BE7D0704D0B76FDF86EF7DEFBBB8E79EBB9148B0F6A04DE6F8430FFEB60897A92AE7CA05329F3EB79D16C79E3D7B721CDCFCE18020F791939B9DC5C9C86C2002F6F1E3C7C54D31141A853F18808B05331331D873369407CB1149A670A9B707EBD6AF45CF8573B09115104BC05B5989DE814149063039F7EC748287E1A4F21E4C19E5BFAB2ACBC56A33890104E975EBD60968943E536B016E750787423261159898EDAB11145255D155D61D79A6D448A028BD5332CF84BBAAC1D7E854D08560262DBF376C02657529949AA9497D3D80E66EECB5D75EC3B973E7F0D8638F4932098FA755B076F50A1C3F76146565953429D03F38846D776C44321E971D44782482B5EB37CA986271E0EF7DE3DF50E1F763F3DDF7E17CCF15545456A2A3B61E878F1EC6A1E38751D3DC88B52B96E39D377760D3D6BB10892670F7DD774B1156A5CB9CD562DA53EB9FF18E366D672C680609DD1EB7042B0998BC5F6F5F0F5E7FED35D4D536E0C5975EC1073FF8980072636383EC6C5E7DF5157CE4231FC1AE5D3BB178F1223174984CF3E94F7F065FFFFABFE20B9FFF027EF6F39F221209E3DE7BEF9573588FF1A31FF9A88C118F9795C0E9C251CC91F9F4B9ED2CE89E9E9E9CD93AD152E2F69716B5A998C081C24C21A347108DA5A4F8E3A9AE53E8EC68432A9194EF2F5FE945DA0ED4D4D5A0BFA7077E97138E9C1DE5B5B5088723963A832E21D013148C856E7C6504E8587454267A5D5D9D2C1A9C880477FA4A4B9FF15BA0D87A35A233745370511DF329B6F46ED8401A4F20FE862F2A8F7C3D80E6F8E4D8A021C15A797CCFFEFE5E6CDFBE056FEED8857BEF7D5052B083412FAA2B2B25F3EDB5D77760FD868D387EE228CA026558B16C19B2B9242E5CBC8C8EF68578FED7CF8B1B88EE38BA49687D9605BD58B4B85DB2E6962E5D069B8D3EDF9C365C6459523AE63368415BE96EC68256D2A08A4142CD8DC868044D8DCD387AEC047CBE80BC3F9353589771DBB66DF2EE8CF3D0F0613599E5CB9763EFDE7DD8BEFD6EECD9F3AED4FDF3FBBDD2C674551D3B7602AD2D0BC4CD41D125137B986F73EEB6B3A0E98336568F95EB79ADD59D0BAAE67168A60509E7460C514596878606A4A8A5EA65F5231C55AD7025BF0BE3CE90ECB5E2981149D3D698894E97828445183B8EA56AF51512BCB8008A85E86040ACE853C8859881F93737006DC66C315F379B4BC161770A88CA771C680C7E81FE68FE5DE92BA7526429F14317052D45E5B661728B8C70D9DAF31AD4C3E035150B229B637579ED234EA7E070AA0A2DB3EDE22013CA58D0EA1D9CE22BB73BD4F3A8D891A206F2C37737711C9EA7DA8BCF6AE6A3D2F93065C1184064069F0486B56A9EA12CCEC02099B14BDC76004D1687616E58077BB155966F6185C18A3B4A7FB15441D1B2ED9A231A1A1A42B0BA52A2DE6EA86DB021F45F8515DC424BD45D0D2C157D9FD9ADF28C8D8E797E21B61B771DA4C2319DF737B3B0CD1D409B05DC8C2DA1BC5122955CE62C990B36D81D1ECDDD4F29253F025D3A07267F300027D662868C17BB04116D043C06FEC41221ACD3BE5032B8B94C1A99ACAA6B58603B196B73064D68C348D13E68F2D909D005394FBE9F9647D525BB38344D1660F1FC29C47E0A006EB4A54DB2982AFD652459D5CEA0E4E2284CF899D9134E03408C056DF4704D47AB95B50094790B4D6BC7D25FA906AF02540A24D958E2C60684868711ACAE120EAA64A1E5015DBDA6F1635A7D95565A9DA14F19FAD235178B69BCEFCD7E4A715B58B7C38CEC337E409753E133D93ADC2A576BEA599C1327A158A16B2A037DA2925786074DFF79815AA68059123248BB13BFAD7A35A6AD1B2B40525004F4B406844E9EA0F52829E2F682E03F991D595AAB9205ABB2F08CBBC1CC9BD9603B58697605C693D6B0A6352CC944643C311B92E90863D3D90D4D562D26CA82569F9C58CFF4A19B1883EA774A857297A10AC9CE247D70A6E6DD6DE783CE652553456D7FF43ECD58B385D5D5E4F0EB80886C0185D36F499537D33087D070585801EA30B19F75869245FCDB22C66D3ACF90E9C75B18662AF034530365AEAF63056A4E6482B3D135B68ADE98B69F38E1609A006D1185BF5649F6D90068C5D31E2BB8AF76601C9474EB180343D7E7935470651C081849762BC579A85DAE133EB4268C30180400559A8B23ABDC78521984AE847C3D3DF56604FEC2F8B42E413796A8429AA04954D10EC2425ABAE06C0E991CDD14CEFC0E557B2CD53A3446D7465F41EB71281F7321CDDD003471803E6B1A683A876CAE87FA98FBDF7E99841433303D61014DE95C439FD256837431AB36A8DC581D1F29582534956960338041E16F46F955985F4D24E3BEA0F5ADC697552BA1906966A5E31506DABC1A2733F730F9B4D76BE4BF16FDD9B499D572A65B83006D7CCE63B7B8B36C414F027D2771C8B8ED39998A2A66B765C6936A17055E94795256A34A52C921A3CA3C49511905C0D4B848534AD161432E95868B56357248D1CD415706F358983D287F57413A9B58263AFB957E5FF14DAB4A35922AAD330E8DB53ADDC1422F8BF0A02DA9DE920128D6BC7E473EB79A903AC1A46029F3CF2C6460AC64717971E7CB854D176F30CFACE699D12FB10609D53BCD97CF6DE78316F379863E526BD2064422A46DB9E066258CD2E7DA2D906F79369C1548B53E045D46B277558BA1523319EB76A24BC3B06F6EB5A62E0668BB852A41B049A6B84D7731B7262FB9497EBED39E412C1A81C35B21B97F4E5B0EE94C0236875B454B98FD484684D3298143B18CED76C44746A52289A474D3882080937A483D0F131FA1FEA2839A4C698447A3089655AA406C26A9AC735668A1246F3A2569F3D1684C2870D27BCC40141D109780241756B29332E9B404F4443E34AF1B42CDA1020F5A02EADA5DE8B2DB100D87652790B2B9E115594F96BBA2BB46D1F194CC28EFABABB6EB5D96CBE7021C2E05B9E984B882E87BF7B8A82D429F3C634619793637150D450B4495D562B6217315C2236104CACA9578932EFB457AA694CBD2B2872C48CC1D9DCA368DE977663F29CB3C166556AB4716518753EDCC53499D85CA47D6B2A3BC9FC7AD323F73593B1A9A4A6A76539EE7569C61CFC7A231A97B26DCDA295FED363B41EB54707FA1045895DAB244E5B5DC17653F8D7CA3B896F4CE83343302152DE75BD105743D8026BDEEED777663C58A9538D5D52D1982034303A80878515F5B8563478FA275E15201C8A6867AF45CEE414D5D0356AE58894B674EE2E5575EC392E52BE172BA101A1DC1AAD5ABF0AD7FFD061E7FFC719C397F4E32EF860706859E76AAFBB4D03E63D1A858B49B376D403A95C4B7BEFD5D6CDA7287F8FD2B834A73D94E7AA9CB8763470E61F3C6F5D8F1E65BD8B0618308E6D73736E0E2C54BD8B8699324CA9012C73EA46E32136F1E79E491BC521DC7012BAAA4B33A514554E2B292FD78F8C001ECDDB34784AE4E9DBF2245989B9B1AD0DF77195BB66C121D96B7DFDE8D75EB3788F8BDD7ED4530A04A7AFDF6FB1F45E7A245D8B57327BC6EB54011CCB9A03011C9E3F5A1B9B909478F1D950499C6FA3A49E7A71B25102893E49EA79EFA2E2AABAAC5B2975259C90442A161D4D5D548D92C2E0C274F7563E99265088F8684CEC70F99334CBFBFE79E3BF1D24B2FA0B2A21CE1D138FC7E1F46A321B8DC4E78DC7EF4F78510F0073030D88340C00D87CD858AF26A74779FC5673FFF87730229737253BD2D9C310BDA000789F1FC50F7A1F499A005B469467026198A0381FB0EA98ACC4DAB5433D172117A8742EB82139B0B20AD2E6B80F7566AEFEB0134C7D8F77FF04301E0FA8626F111B36453477B23DE78E555545556E3ECE51E7CFEF39FC38F7FF4235457D74BE511AFD78DA0C786175E7A159F79F20FF1F39FFF1C651541A9D6F1C273CF0B50BFF6E61B2204D5DEBA005DA7BAB071EB66D1E4D8B56B175A16B4A1BAB25C00EFC5975FC5DA751BB06FDF7EF85C0E7CEEF39FC50F9F7E1A2323310C0CF4E2CFFEFDFF82FFF1DFBF22554C08E297AFF448F625DD3265E595924E4F90FEB33FFD7778EFBD7D52D18402464A1F5D5B910CE67954651827EB2BBA5DF8E2DFFD1D36AE5F8791915191F4F50503E83A711C765B56126812C9244E9EECD252AC4E49F53F71F4885461F9DC9FFC094E9C3C2119BF6FBEF196EC3456AF5C8581C1413435354AAA78341197946FB6FF5FFDE5FF8AA79E7A4A1628064FC92767F516BA5F962D5B86969616ECD8F186BCD3FBDFFF28BEF3ED6FC1E70F606868045FF8FC1FE3FFFBF297F0977FF91F447C6BC78E5D686A6CC182B6569C39D385CB972EE283BFF361BCF2EA2BA8A808E091471EC0CF7FF13C76EDDC8F8F7CF8C348A6423879EA30DA5A16C2EF2BC7EEDDEFE2FFFABFFFEB9C60E59CDC74A601DA808311ED61E249E9739D16307139318F559A31E19996B3783C68383BD22AC49A7588921A7D9FA391519556AFAB7EDC8AD633DFFD7A00CDECB7E77EF53C366FDE827DFB0F8A25D7D8548F851DEDD8F3F6DBF0FAFCA8AEAFC75B6FBD85BBEFBC13EFBDB71FCB96AFC2C68DEB70E5F259EC7CEB6DDC73DF03D8F1C69B486612D8B071235E7DF165A9F377B9B74780A8BEA64EACDB3777BD85B6050BF4CED0857BEEBE53DC772FBEF42A52D91C823A03F6F0A183B2F5B7DBB973CCC0E7A5BE471A65E5653877FEBC58D2741D50A69596F9C18307A52622B36A59624B0AD652BC4903348BAB2A2D0E8FACD85C8809D2278F1FC34BBF7E019B366F8637502E5209870E1EC0DA35AB6447313A1AC1F7BEFF432C5ABC18838303282F0B8AF55F5D538DA1E1307EE7773E801D6FBE89E150041EB2409271F8CBAB505F57CB8A547877DF21AC59BB1A5D278F23128BA3BAAA5A2C632E2ED4ED78EEB9E7A4F02B0BBA0E8786C5FAE73B313371786808E5E51548A632F8E0071EC30B2F3E8F586C145555D5C2AEA19EC9C30F3F844307F7898BE3D5D77662DDBA953877BE0BC323615455D6A1EBD4197CE0031FC0FEFDEF6161E702749D3E8986FA5644C329FCEE131F9F13AC9C939B4E07A0AF0E651519E014ECC9649088271028A5674FB83E290F079DA869641964A54F8E143085CAF24371733B5CAC3586F0282B4C3BAFDA9DDC8A207D7590506B8A6B8682B01774208CEE0071FF087D4C9587CAB18A8AE281EAC40D2DAB9B61A56BA7F85E1974133A1EAB50D33FAD772CC2AD56FE24E42866AE2B9A503D3D9B4E28C53EFA53A90297A6FF55C55F541C86FACDDC0F3119C6A114F674E28895BB6D744DF43C143FB4A288E87C000B400BCF44F267C4412BEA83F40B4B554FEA5353579DC1CD2445EEE9D7A56F5E73A599684329D23455F998E0A2FCC5B0BB60A7EE06B2C8D89CC268E1C292B3A9D811255AA98B2D7AD3129854D43B1A070468691EBAE4A4A28D0AC44A4101117612EB028CB28ACF5EFEC00A100EADA3AD5E958B1905ABC40FCDE335FF5A3299993C2322552C64CEF774A1BAA6724EB0724E6E3A5D8096CECB434FDE0C54161F2B1167B322E4122C2B9F10A06EE703C48521342ECEC84C5E839800AD1B53748A6959E7B20E8486E8AFF489B0BE9523AE26D39C0DA159EBC2F1591CAABA8BE2F82AD6906272C85F659B4FAA5D3A9392125E90121F8A6AA734CEE9E127079AE7520C48D14BA56AB616F6E20B19117C8228D3AD850D22CC103B1CC24ACA2AB0CBD92489045926BBA860633623C59EE4B8ACDC5FF58F95816380DAFA7F1E27E1482B40A7291CE651EB8C7CABAA95E40374129CB30980D2BAE663C9DA4E0AA1EE19A11EB2B6249F81C136CD0BE0EF0C3C72312128139C856228EB98A6C7E6E55A4DB92A9D74A60B1D9898884A72A3F56F28BB7C16260A91EDC25A8DEA9954C524F683AAA044D714415B71D7550B98ED2383824A2295EDCFF74FA3A1FE36D3839E2A8BA3D0E9665E2A80B60E3EA6D9D2475812389A18BB18A957255849ED52AE0D87D0BA34C79C4511721944C3A328F304E0F2B826BEE82D72C4447AD0C5A02740C8E168279011A85D52F35200C9460B50201C5966030A7C1198146019C672F1422756A855905F2C55A5392D241BB13655F963A2230B57703185A49CF33994E094953A5AC842BCBAA3242EACCB42898B4303B400B758F766BCE86031AD53EA511348B5C0BEE4F6DA68B9EBFBE6F8BD0256B1E865C1521635192532D6F40E249DCD69612D2E407A5111CBAB109C5656BC7A1E43DB53EFA4D2E7A59559A185D16D1B8B24287F1DD73F8783FE74FAD919304C0BB30539EE3858F99240AE74B6D547A5E0DB6DECC714B2B6249A1B16CC89253227379D510B5AAC0B954ACA41158DC524123E672F76938014278BF06C59A5DA6EC3F0680C57FA876173BBD052578D80C38EE8E808821E0FBC2EB7A6ADDE1EADAA6A12D688BFB73883923B086E83CDF63A2F5320B5EE4C96206963AA4C9BE1F533B3D0E9F220C7B46E52D34CCD151EE4A4F56B0164A100B34CB8768DE8926C52FC8A092EB452ED04E302408B059D75083813A455C95D65A15BF9C8D71A9E06A005E832D4CBC88A0F5AAC67E976DECB80ADA9EFA976AE5C2084362817574B908639A5EF2C9E1A72A11D12407439B8AB50EDE3B0A96C44717B20ADD2E38DC68EA61BE62D6F29CAA0761E62C98B6EBBBABF7227F1FA4A0082FB3F6967592CE80A5196B9DDCE3691D12FCF2469F902CCAAF28D4ADF573C7695BCAC2CEB052D6D7332F8E7E4A6330AD07A2810A409D031D26D7C7EB8945BAFF419A70538EE24AD96969E1D38131EC5BE23DD58BD7211A299348E9F3883D59D6D58565D0637072F01229FAE5BB8603178DD2A8D3D7ED158F5767C678233815A40486B898B8D99A355EB80C3468B2C2D6E089BCD2DBE7E9B3D23B6B57828740D435A9F1CA3D4952140B3AA8CF88CE99F753868900B508BB782C0237EDB0C720E1758F1CDE570219B4928707238914A2BF0918C18FAA98D3898F68517343526B6A0C94D26DD2D2B40A77CEBA4C54B824D26839C9D2E0055C28A2E0AB18C25F74C2D0CEA1C5564961C69FAD0794DFAEF6D5C40C4ED40B70D9F953C6D0E338A403991A6C56DD1FA1050D6D995A6E0ABE87FF0DE92569F91DAA3BC3FC1D56E638C80199F4A2655F9A0EDB0F32064944F5C78D1AABA0F5DF0AADA0B331909C9A142850000200049444154CEFC9DE9ECAAD28BDDEE425D4DF59CC0C99CDC7466019A2BA18AC928804E21E0F7EA62B1B70A64CCEC7B28FB2D83141C88A432F8F1ABBBB069D9323CFFA35FA2B6BE06EB1FDC8E0B4323F8E0F245E2A726A343C95215EAFADD8ABE67D3CAD70368AB7B83C92906A8A548AC9D16A7038E6C42F9332558C81F15B8E392C8B58E9C6202BD8032B1D7CED2600EA93E235B7AAE8976BBB89CE289049C1E5A9792442E1ED804CF73B2F24A162EFABE6D3649D22AAFA846361517FB312BD6A4760F188B96A0A915E6640E16CD7E31DC75156FEA41F3BEB253A0AE88C9194C517304C83A3D70BA18A84CC24546865EB0685073B120A01258F9CCC2D37633BBD726D573025E9FFC9FC7113F95FA9D4B15DA88C7E57D9C7A01E0EFD48916DB5C74C3154FDBC9DD8D58E1D4F748C1C3D5438C08E50F97EC4D2DA8984E33F147050519C8E502C68416B560296D6DB52B327E721DA03401E05C0E0D75F57382957372D399036895F0C68ECF4847E5904C67E0F1B8E0D2F5E16616DA6E9DAB7170C6EC76BC75F8141A6B6BF1FD7FFB16CE1D3D2C0070D7873E084775359EBCF72E3808062447EB74E25B1998C7076845025739961039556A34B37C1ADD98FC3735CB83C132A4B236D43534E0D2D9D3221C75EEC245D4D4D48189ADD1C8285A3B97A2B9B1016FBEFE2A5C2E37528914162F5E8CEEF367515E560EA7CD2EBCE0DEFE3E2C5CB408894854E87177DE7337CE9CEE428E40E476A16760502C585624A92E57D982C78E9D146EF4F0403F6AAA2A70FADC05B4B57708AF58B921540AB9AA34AEDE650C406BBF84D898AC5C9E5182FD648250908CD0D77BF932DE7CED55D4D535A2EBFC15ACDBB801AD2D8D181E1AC0C285EDB878F1220E1D3A8255AB56A3AFAF1FF5B5F542B33B74F810B66EDF8A8ECE4E7CF5AB5FC5EF7DFA09FCF8E91F62F9B26558B97A0DBEFB9DEF883BEDD34F3C891FFCE007B8FFBE7BE171FB70ECD8512988F0DB0F3F24943AA9633914423C114763531322D1B8F0D149E7DBB4612D0E1F3A2C5996E43C8F8479BC0B172F5E407535935E32686D6DC6E9D327D1D9B100070E1E445BDB4284C32AFB78E9D245280BFAF0EC73CF2118AC909D00E9825DDD27D1D2DA88F5AB37CC0956CEC94D6F04A0CD2452D15815614E833E373B86469338DD7511F575756869AE21414C62B7F98F25D278356D6FAAE03B892BE40FB9FEB156C2E06FA443B4746BC40EFCFA9D77B16EE962FCF72F7E19A1DEF3C8A6D2D8FA810FA0BCA9150FAD5803172D24B7D22CA60563CA51CD16508F6929FD0F15772FC82FA9CDB1716119368F625388DB61AA5D59747CC182A6E6B109B429EB953C682679B0165F64744400F6E48953F8E33FFE77F8C92F7E8605ED6DB0A75370B97D786BE7DBF8F4673E891D6FBC86782C0197AF12EBD7ADC6B3BFFC299E78E249BCB36BB70030E5716B6AAA7168DF013CF9FB9FC157FFE9EBD8BC79338E1D3E82254B97A0BAB6163EAF0BBBDE7A539EA7B9B51D274E9DC6A31F783F7A2F5D402CC63263FD180947B165E37A5C3877162DED1DC209BEF3CE3B752AB47253A87ED301F6620B5AFBCCC9893682FD4A3BC32625C6BEFCA57FC0DA552B118B25309A0228471A0A0D0A40DF7DF79D62099F3A754A8CA6707814D595353266CE9F3F8B27FEE0499C3DD32D9995914412995412B1C828DA3B1763EF7BEF62CDEAE5D8B7EF90F404332617762EC68B2FBE889ADA2A01E9B5EBD6E1DD3D7BF0DB0F3F824B972FA173E1423CFBECF3921CB361DD3AF8BD4EF4F6F661F3963BF04FFFF44F527B349188CA0E60C386CD38B0FF203A1776A2A9A91E2FBCF82B545757A1B36329FA7A87A43EE2F2154BB06471BB24FC6CDD42BEB91F6FEF7E07F7FFD63DD8FDDE4EFCF55FFCA71B1D56D31A957372D3E902B4A18789B39F032797452C1DC6CEA32F23928D23166BC6F2855B313438820B0397F1D09675A83369DFA43AC9DBDAF30A618C2B5B455B26DF828A3E247C4B0307726D2381690A06E8F03E7D929A663546605DF3392D67E5C1E5463B667C412815E4A17F2D9ECC20964AA23F16C389A108E27D97F0C64F7E2C09120F7DEA93B83C9AC027EFDA0CAF16CE61E5666EE7CD8FF2DFD924AB50B6B2F499E6A3E0C2FAD28241059A97720F149408557B6BB0D0C1258917692AB64875DA7318CDE5D04B6BD2668797556F023EF8A9BF20E099111FAFF87785D9A0740C95D16F7221F346A3BAE5351AD72C94B4F86AAA6A15EFD602D07C5666E17DF39BDF1460A6FF9255776835FEDEEF3D81975E7D09A94C1CE1FE105A5ADA71FACC197CEC138FE39BFFF60DB436B7C1E1F3E3D3BFF7297CE98BFF2F3EF9894F61F73BEF88CF9560DFD6DE8E81FE7EC99CEBEEEE968412BA06987475CF3DF7602414C28F9F7E1ACB962FC75028242E8D2D5BB648E5929ECB17E5B9982A3D3ACAA48B4AD4D5378ABB80C798BE9ACCF8E6B1EC63822DFB5635974D5C032FBDF4120E1F38288B86C75F2EC1F89D3B77481209B31199FCC2EC3FB60DC703B34D2F5DBA24D76B6D5B807BEFBE479AFE0F3EFF39FCF57FFC2B444646B074D9327CF77BDFC3A38FBC0FEFEC7A07E72F5CC0E7BFF07919A3070EECC7430F3D846F7CE31BE286606AF77DF7DD8763C78EE3FCF90BD23F43C321DC75E75DD8BA7913BEF3D453F0F97DC216A121416DF2AE93A7B0FD8EEDD8F9D65B92F2CED4F7A6A606C9886D6E69C56BAFBE818E8E765914D6AE5D85BFFBBBBF9724248FD72FBB1216FA65BB7EFC631FBBD1293999E6BFEA9839B9E974005A7C7312FD96B085F8B608D2D1D408761CDD016F59392E9D49E3C0BBC7D058D780471EFF1D2987B56AC90204297C8EB400BAE2699262A37C20B275D5422B93B7BDF45221D11BE34B31969C21C6EBA6956B6B27B946060928EB4FFED7221EE1441D339ED6D4B5685426C3D2048908921E8F4F7C87A4CEBE76E2AC90F15D4C55B1D9108A8E62C9A23674FA1DE207559CDD02B0E6A3EAE2562A80F6D820D4D8C58FD7E00F83317C4E092EE5036CAA7D54FFB23B245543ACE650268D43E72F211C51BE4B3A2133F128B6AD5B0997247964642C70AF94E679A2F266BCE5966798C436E56A80B6B238D4B7043D82222B5933EACFB6255F982E587A999D1E0790E0FB386495B239A83741A17B0740360CFD9FB934EC22526F2AFB28B6014185D727B03145DBEC5A441F453B59588897AE0D321608EECA07CEFB6565AB9E88C7E5FF0CCA997E2A2E88311E5258591C4A0F5A01B48C436D594BDC22A58A34F3FA8A134E1126F51CFC3F7704BC1F1717BA2454956E3B92BC9E8B6249DCFB6A3E398386F495EB925AD4C2E67D6D741EEB0732E7A758AB92E98612E0E6351DFA59DC32AEB8489FEEEE465D7D1DCA2BA9D39154E34CF3CC25C8E966020A45985C923929CFA20B543381C8B8B154B0910607F542B88374A3AEB61424BCFE0A93B78832C889F342D88A48E61278EFCC2954D6B7E07FFFD3BF40B9D3875434850F7EF46368DFB00AF50DB568F07BE1455A9F4562A69EC27AF4092F92B4254B106CC2E5EEAA096FEC7B0DD0722DAD722196760191B5FD2D7F90D09B39554569CCDA31EE231810B4F25BA52D8A1246389138D9CD80E464535ABB9A5624EB06694D69C46D6E5C8CC4D113CDC9E46EF4E6D0E0F5C08BA48E5869F9D6719EC854D328B6D218B85125910AFAC0FC9DCFC3C2A0FC51595E4AE7D8EBF20AB839E84A61143E0BC4EDC0B1A1280606FB70FCBD3D38BDF72836DFB10D6BB66D416FDF156C5BBD0C545D71EA523BE2E2C8C731954B22BF439A36405BB4C4F3AC0D054CB4A00D6048065D2E8D74360577CE09BB830C08D2769392A1C977226E93D160A3FA9BDD296D61AD686FC0CEE84D9BBE962216024A4A92543149C8DA6082078D0DD58E02E4B240B1D155969DB9BE59BCC72D4566495431597B7980163606F727A4C9A97BC8C2A2CB781194791FD5972ABB4F1B60790097B1690AC1EACC485E836352005902805C60359F9989405AF3DD94D39220AC56DCE3BB2B9E3615EB28F26F87D3CE40655AB34014C346F4C965EDD27C736DF548BB3AD8274AB255D5265542F3D28652B498224B5C7CD4F2DF505F3B91CD3421644CE78039B9A9EE40EB9499F8D9E568F61A1B9F047335F792D924DE3BD383405D3DFECB9FFF39CA1D5924E2293CFCF1DF45C78A25686EA8439D00740E4E992063132E1425C86CAC277E8C31478CB17A3940550D360DBB169707E78F9640D5CF4D03C1A8C8E541DAE0895A7DC6FD58AD57E3521046801691E78ACFC015BFA34E81F1195B270D7F5756989ACCD9AC1D71669F51F3970334954619AD1F46FC09E8126D570F6426A25910AC0B85D5AD329E8FDA4CEEF1B494C5CA4F53AE328D6C9A8B0890F538F1F2D12E5478ECF8FE57FE273289A404AFFEE6FFFC2FD87FEE321EBC6B0B7C39C88F22AD524CD904BF1443623A2E2C95A8421787E2D95ADF85EF60CDA63496AF80948D20CA841F8704A568E1C22EA6B58CBB442A2D954820C244DC45281095ACC13429612A53CF808B59784DBBF13B55BF90343E45F733206EAC64B560286A9CC94AB482E6B546B8B5EF941B4CEB41CBC0D149297C76F3119A9C1A0FA60DCCBDCD731B0B3B7F0ED3BEB3597874B6619202FD4EA714A74B723C7ADDAAA4962C0605FEB6E2265BCB7DA945DFD43E14B74C8AE04C09D30CECCE42BB1880E6F815F6B34513DE5C77BC36298C6B6564343696581CD74547B5F52DF2030887348D43178730104B61F87C17F6EDD98DDA86063CF0F8E352E57B755B2B1CD9149C3A5B4E883F1CDC6E8744C41570A974CFC907BE14514D9DCC812317B1383A8D7BC3E8C4695FB509A06B2BD9B83AC451622EA7A3EB0542DBD866B15AD057BB2E7232818DEFD04C946270E6AD76EDD983AA8A6AF45DBEA2DEDF4985780546B148026E5740FCD1A95C0A8D2DCDE8686ABC6EFF148358F1BDAD6053DCCEB2E8E483573464547FA46DC0CFF61C420009FCE01FFF116E9B0DD1440AFFDBDFFE0D4EF60DE1AE2DEB5166033C4AC75E7D7463AA8C3EF50755BD72F21F05D0351AA0AD554BD40EC080B4B11E0B57562E385B96AE169D512719DF6A0155855699B8A1161303BCD6B6B23EA5D505226F429A99708F0B00648E3760A3AC686B49A9B1E9DE13B5820155AB0F9A7440E5C648CAE9628D4BA287EA36734EF118300B8EF93BF7BEE47723A553D895FA7F5EA08B74435E93B3255F264CBFB775E132BF5BC794B83274A92503C4D226B225D53521F5626BDAD5EC2ACCF35B1748F337D5D6392C58D03A95213451334FFAFB39B9A9068C495BD0EA40957B25EE00F54F318E32B624225917F69EBA8C8B97BAB17EDD1AF40F0CE3CCE50B7864EB26D4B93CF954551165C9D173CD12F22924A26119101E8F1FC1A052C09B1C48AB945E659D51EDCDD2DED635C446809692A1F2B8F2EC96EF69454B184B6B20F0723C837FE3D2315EE77070519398BE3E8231FD951C58E6C758D8C593C5FA6F3EFD89336711F405D07FA9579E2F118F209B8DA3B1B119E1D118FAFB87457B2369CBA2AD7301DA1B9BC63262261862568B4CF7F75596A8B9843C9B3427B3151863A0980EA4BAC881FE618C0CF6E3C8AE5DD8F5DA0EDCFD5B0FE0FEF73F8A935D5DB86FCB3A7872004359C657AA5C1C6C64F6B26A7B132A9CEC609FA826A1F5D5C74E6E1588E618930413016165CD8A954780D08B85691FAB0FD75CD70AB0D69D8A017403C2D6F633006D2C5A734F034213218275DC582D68732F71970880AA019CCD2901FC6C56BB59F40DAC606D5C2CC6A8C85BB0922EA8DD79DAE5213107A6C4B3AD2CF3C9BC734118C92407A905CEDC832E2095BDC902BC8542B7BC9658CFFCDEFA778B4689757133ED647628CAFD61673078B2C367A2A69ED2F77372D3E900B414B0673690D9B46A0767D69105EB26F3673099C2A1A35D68AAA9C3D2D61A38981490073A5A87869A279B2899D422B294CE6064949522940F8D16A8298469180A56C09141A3AB8A4B8C5B99F73A214195A39707D5B141E690F1F9783F67460A22691116193D7AC151A3322D13BBF0DCC6BF476B99A0CC7F139429F959EC5EA0CFD950E1F89D494996EBA6D3720EFF260B1107337D76CC624B3BE5DF0E970AD2487A70862D1E874D02420EA493B4AA75545F6F9FCD04B182007F2F667498496D1DFC0640A45DE58D95BC6986D7CEA9C40CEE30065269BC73EC341A9AEA11F0783092C8E1D0E123F8E47D9BE1D1344AA9F7A2036ED2AB04429D4D9735014EDDD456ABF45A8BB1D0EC6AAA45545F89F0684B4F07B724FA910F9C713BAE5D2C747F3025CE4ED683F2CDAA8AD5327A6507480BDA543631F7BFDE56BBD8F5506C3D176FFF95556B529755BB98716DB53CAF87123CCED0EC0C58CAB36A5122A5E0E7CABFA3B8A3F22C29757F53A3D02C361218346BA7CE7034C69629006D9E95FF66C0D000BBF93BDD7779664971993CFA99A9E161E177CBB8946C1D950844F798D5C5915F382DBB92E245CF2C5025809E8445A6E3D522BBC21992CD30CBCD2129B25C1D47010C876328F7781074D0776A479AD592E329C423619497D327AB20BB907A200ECC7C80D0508C4482D16CE7F420A7C5CA1FB5C5332A58A66A94B2FE725995312582F7DA50C8B0DA8B5E2818D47233DB4AFF5B980B6AFEE74B34725008185BD28939B00CA5CD3C97B5C9FAFBFB71ECD831545656221289482205FF662C34B202962E5D2A54A8789C406F87CB6D47343A828A60AD00476D5D15060607446C8673309A0C8B1E83CBE1C568784806797979B93C1BFF4F5F379F95D7E68794305AF7AB56AD92124ECA482A640C9909271698F62B9A924AF237022D015E2C50E5E2206C8FA673E8BED087542A2719649DAD35A8743A44924892300810622913DCB3B0F3DA82060E51EA93BEB2145DB5FAC0C71B765703B44216B1F232199C3EDD2D4920172E5C445959397AFBAFC0E771A3B1A111C78E9EC0E2A58B71F9F2252C5AB41867CF9E476D6D1DAA6BABD0D77309E7841EE6C6C2850B85DF5B53538337DE78039B366D927625758D5430D2ECBABABAA49DD956FC8EF4352EB0A49F353151231291E01AC7249365088C0D0D8DC2D526685247591B4357698A4C16A0B52085005B3412163DE7DADA5A5CBE328055AB57A3A1BE1EE1704878DCBDBD578407BD62C50A8C8C84515FD7209AD35DA74F63D98A65685FD086A1C1415CEABD22B90A7D3DBD686B6BC3E933DDA8ADAB45B93F88935DA750D7D880C1BE7E19C34C7E615BF01D59B880B446B605DFEDCC9933C2B21083C5ED81DBE311595CEE541A1B1B85E2D750C7649918828100AA6B6B3034342422FEF5F575721D566161DB197721E708FB85EFF8FCF3CFE381071E10CDEF12404F64F81390C5A59116E5E293278EE3F88953181A8EC34F71935C0A613BA9463E642249DC7FE71DB834D08BFDC78EA0AEAA02158120EEDC7EA7D233166D095AE48E7C3695D45DD3CF60B508CD96D1802607047F274F92623A8A9EC333E99BA465C1EC2BF277B3C8E44248669C387AE212BAAE5C960174C786F5A8F1F9C4B297B0A1F69410A88475114F8A35E26339295AB596A8B8351064567F03761C6C045F0E264E5C4E7C665FF1590D358ABC501E170E47E0740590B56544D4BCA6AA0EF1E828AAAB83123C64465C5CF47D8154320B9FCB07E458205655AC619B18C54033B0B9787012111C9A9B9BE1A2A68109C868CB93C772D120E8F0BD3C5EAFBCB3CBED923E8D45E352F0D7E5A1F04E0E198AC58B0219E062BB122645F33B2E62F54A361288A71292FA4C660163EE0E2EA8196A10BB118E25E0F1B9A5ADA947CCE7B45AF4E359D15703B4B242D9CBE42AFFE29967D1DABA00030343180987D1D8D4808AA01F4383434824D28827E3D87EE7761C3B725492456814AC5EBB12996402CF3DF32C1EFFC847A53A08DB8BA5AEBEF6B5AFE1D1471FC50B2FBC80868606691FB615FFCF7EDCBF7FBFB4D7EAD5AB6501FEF5AF7F255545C8E5EDEDED173A1BFF4EEA646F6FAFE2070F0DE0631FFB98FCDD30794CF070C2A966B1A0E9DBE5F90C387FE3DFFE053555D5D237834361D15DE7BD2E5E3887471E791F464642387CF8B000269F239BCE61F9F215387CF4283EF9BB9F40243C2A25AFFC654179BFCA20AB95ECC6FA4D1B71EEFC39B43434211A8FE1FCC50BF8FDCF3C89679F7D560099BCF0C71E7B0CCF3CF38C3C0B1737822ADF870B1A01FCC0BEFD88C5E3E83ADD85279EFC0CBEFDED6FE3F77FFFF785077DA6FB0C46C3613CFEE10F4916E8C68D1BF1F4D33FC4D6ADDBB063C75B92F5C9FBB04ACBBE7DFBE4F909E42C9EB066CD1A590C6B6B4B2C8EEB8F1B6A42084067858D71F8E8111C3A7A0C9D1D2B511508209B8EA277B80F8D754D48C65270063CF007838845C2703A191A74A2B56581164A576C10D2F58C55AE521CC6FF580373E688783C29994AC9544CB896EC5497F8BB9D22FD087B18CFECF82212C900D62CFF085CB900721E2F761FD8277EF2B6AA6A38A91896C921311A0123DA6E6A2EFBFD79C5AE62F02876B3582D69AB0FD1F8ED8AF9AFE207D53E35D1CCD51921B2348905AF7C3372BED6F1CD08A3426FE3B50569B540AD819631943B7D4DE547525BFC2B577AF0EEBBEFA2ACBC42B2D068E1A4531904CA2B313834023F9CA80A96A1373E8AB28A0042FDFDB8FBAEBB70EA6437FA87C2E88F84515D5686BA323F366F5E8B575E7E51764983C321A4B276B47574E2D2C58B280B78111919C2E38F7F147BF61DC4E933E7D0D1D684D69626AC5CB9523B9B943F758C35AD7D9F4C5419EBE2280034770D2FBDF4327AFBFAB174E972356A6C36AC5CB1104FFFE0C758D0DA8EFE91416C58BF0E8798BDD6B9542CB79ADA4A0C5EB984175F7A051FFFD4A7F1B39FFD440080E3E6EDB7DF1690397EFCB8586EFC3B175B820F772504BB95AB578926371799BD7BF7CA77870E1E446D4D3DBC3E2FAAAAABE1F70771FCF809343537499592A54C28F178F2C1C5EBC557C443A75721291A6B59CCB873A211F2BDEF7E07951515F2CE5E7F998CD59D3B77A2BD6301DEF7F0C3E8BDD223EF42C0ABA9AE166A21771967CF9DC3C73FF5717191F55EB92225B076EE7C0B8F3FF638FAAEF48AE1C20A295C18EFBEE71E59BC3EFFB93FC22F7FF90CEEBEFB1E014B566C79FAE91F8BC5BC62C572F87C6A71DFBBF73D2979F5DDEF7C4F52B37BAEF4E00F3FFB47F8F297BF8C279F7C12470E1D9636ABADAEC5B295CB6541D8B66D1BBEFE4F5F95CA2C9224D4D6818E8E4E343635CB22B9B0B3432C6CDE77D9D2A5686A6C426D7DA968EC75019A5B59D9324BD9FA34068607114BA751555507B7C38EA1C15E193CA95812A3A3315437D68A3F90CA55D48265F060706000AD2DCD82190A8C7420A788015D0C76565F6FE1217915C95F93899E4C25957FD7E6123F6AD616C5C1EE97E1F5D5E0C09E4BD8F9FC1E04EB6AF0993FF9439CEDBD8C8DCB97A3D2EE802FC76C3C17ECF4598A5F5B2F14161F9B01E2F1160AB38535CF650DD258CFB382B916D915F686F802189C13DEA95188D65534722652AFE419CD27EFEFD5890A63AFAD8F2233C4989DDA671F898CCAF6926A83E2C7640B66B2188D2524BA5F1908223A1AC64034869ACA32C48699EDD58EFEC141246825FBBC28F3FA604BA7102CF7A3BBEB94B210535924D3592CE8E810B740756510A964427613B10417621BE2B188E860D4D4D6C8826A5DEC0A2FA67E23401364B888281F7401A0B90875779FC1C2458B71FAF419048204511FCA826E4446A2C2A0F3960770EEDC192C5EB808A74E9E45755D0DAA6B2A90898D62687804D5750DE8EFEF939D0EB7F8DCC6B3DF083EBC2FAD7C022BFF4E2016EA64222E35FE18E81E1C1C1417127723ACF84170E642452A1F5D1EBD7DBDE2FA696F572E0E3346A603D072AE96FD4C25E338DDD585868666D89D2EA99EC2CCC5CAAA72D94D321847C0E33CA4755F535D87506844DC2EE72E9CC592654B05F4FAAFF4A2B9A505172E5E90EF3C2EE5CF1E1E61A157BFCCDB8B17CFA3ADAD5D3206A927E2F3F931303028EFC28ADDDCADB27D98D24DD78ACFA3C61477630D4D8D721FBA8A16B4B44A1626E3094D2DCDD276DC99F45EB9AC38F9628557C8BB30E188EE3A8E53EA7BB0BDD8CE4CA6A96F6C989378DD9CDC540F9849B338D4F1A2522E2BF9D0C0208E771F47D2060CF60F63D1D24E0C0FF54B265C269995F2ECDBB66F45CF952BB874F13252199BF800D3E904B66DDE22D790CCACBC5B43F9498B276D7180C61AD8D279E3968873C12A4FB1D47C2E8BEECB7D0885C3F8977FFC2A9CA339445349DCF9FE0770F743BF0537D2E8ACAD1316820A6C6832984E0428F6935A178D6BAD64D6009815B08B2D6AF1A74A650F3BB25A08487CB49261A902A0E24717D172155C5554C402F7D51A6C190FEC54B04E77B15C8B0A629A9265347A7359848647C45DE2743990411A9178047E4F506891E1A111F8CA2B914CA4E0F7D964E18B86A3E2A6B2331640FF77282C559FC9CA618D3CBAC1B8E68C84861089C6C42A927542760557B304C68096C582BE1640F35D255142A8674CB450DACFB96C124E1B8B57399064D6AA28EBAB7249B448496174695951327D39700CADCB58F26637626515E403893AA187D620DD0A523E4A2A99E8FC3799C99AC72EC92BD4592E4CB1E285BB780C5DCB8256E86E58329AE2270419AAE5E9D2564CF4D2F100E12BEBD80DCB1C8A41A5294C52424D620C6ABEC9122DA2FD7A97C58D27B30265B7AC7C7F26D149BD8A62C398A4151588557B60B6BB50F3E4BA85C0A8B03BF43BE43318A5C6A24E3612EAA2CA1CCCEB776BDD6D19E39A6552B2A0AF853A160BC00CE4643C81FEA101D96271307362D22F49FF6A2695118B837E50AEB03CA7BA46E92AB01C515565D59438B1E33D96092BB2E33559433311C4F92CF4B0840DB8141E45FF95017CFF9BDF41FFC53E61177CE60F3E8DCAA67A34D757A3BEA25CF9A10D614F2984AB3961E1654F069C2768BE71BE363B88C2FDCD64BCBA8134276AEA3719F70CB313A06F9116973FE047341617BF2A8B9C8A9F9FC916B063EBB66DD8B3E75DF1875314885847AD8473172E883FD8EFF52A7D912C652D999DC80C3397F885D988DC0E2B4DE06BBBB08A1FF27A34BB899A40806E8CD9634688E9DB996DCB899E67B2DF9BB965FA867389567CE9A35AA014249CC44898AC85C84015B7B72695D658261345EF27F108F943C60A1C997F91B9618A1A01E14402874E9C86D3E7C57E5D01BAB3B31D8970046B972F819DDB2BAF47C939EAB242F97C0D2D905F4C619BCA33CED763CD82C3400F591FF4C326922954949723343282744A5989A9744A5C187DBD7D2282C3BFB352B5CBE94468242C404E77006BC7114C08D0B4AAA8DB40638A5BD9B2B28040B361334EA64DAE07D086A668B54E2773CD9BE51833C74C42CCCDF2DCB3FD9CADADA5449509DB384F78D7142DB18A34E1DCFA3B95BD186CB192F7AD01B3096F34C903F2B69016F6A6E59910ABDA0E27998059A02F11C7CBEFBD07B83C188D46B06CE142AC6F69848F81974C5622DB3EBB1D1EAA70B99588AA176B59C200002000494441544A8653A9ADB7EAC7BAD8E6930D0A1E9131AA77AAAA05B7A44A254F38B6F9B62958A422242F63C35020951B4BA5B44FFE3391057DAB82335BA838107D2B8FC1C98F08905D33952134954B5FF7D839B9A91E0853F4418F4DB92D9E24C6C7462026F792F424EBE0B2B20D66A2F5F2B020FE0E155423B2523D575E4C8BBDD0279A1627B372C9523320C0804A9E089D433211477434029BC705BF2FA8448DF2E2372A38373B6E8E996889A95DA3386B6BBC00ACE92BF3CEF964078B2603EF6A1829C57DCBF38AB3D8A6023493C9241C8F6133B596987F47E7FDDD1603E8565E8CA6D20325809EA0B5AC169775525B831F66A232BA4D0BDAD0CAAC053EA7D229D73DD6B2BCA8B46F9D6822E5E76D486633387BFE026C991C7C2E8FD45C639092BE564FC02DBCD2A686FA3C5798E7A71309118D51E9E7AEBC0FD0F80767ECD9E7F84257072DD50359D921C5C060F591F2586B9072BCD729F6A9CE24404FE55A73DCD493BEFD7881DE499F7C1B1C58F2414FA293AD206D1D50D609C3BFD3C5410BDA7C8A417C12B7BAFE21DA22968398A9A8015A027E0C2A53690BC07FFD7FFE1B962F5A8CC87018DEB24A9D28E14277CF596CBFE30EDCB9658BF8468DAA1D4332A49D31EA9F2458279302E456E1F85B051C8A990A13A53BB3698B8FB1B685354BF146FDF6D7B3A08BAD7BB530CFD946F4868772F11C318B9FB53D67EC2637F1854A003DCDCEB36EFD0D6833838EFC519385772DFEF0346FA94ED37E5049E990D46F9ACE4A805CD1926C52E0522A1A8B1C80A2D1712A87C223A8282B137D5DA67393C3CA238C8297AAFAACB408C827E57B918A56AC716105879BDE029A92C36B0A948C6974F2443EE8695CB274CA4DDE0225809E66078EE79B253B805C595A9EE3595ED3BCD598D394F84B41CC3C341292E29F81B23249736EA96FC48573E7E1F17944E798890375A25B10462414128A6082B5EB48F8B73B108BC551DB508F603020AC0EA584A6E43F09D4CC9A32EF4AD6835534C7EA02B1BA066E2AD74809A067625896AE314B2D5002E86936EC7800CD6C20021B818C9FD9B02E959743952262E0EFECB9B33874FC181A17B420154FA0B3B50DA78E1E930C41568A70D99DE858D88923478FA2AEAA1ABD7D7D7079BDA8AF6F407FEF0052A93436DFB11565015F9E1266A41CCDB65A54C6D269C94023AD8C59571305766E85EDF73487C6B44F2B59D0D36EBA5BF6C41240CF50D7128C0962D44C200F76B6005A158D655202F5A50BEE0B919E908A16AA3E1EDD164AB14D05B64425359391CC37A6A51240D571927655908B66C50DCD85B6BA68CC82C44588C904C69AB68AF49B77B6BA4066A8796F8BCB9400FAB6E8E629BD6409A0A7D45C571F6C0D20F25BE6E253BD6DD62C4802AA56CE20406B61CD7C0AB9911CA59B4280D65A0DC60644A2AA24BC646BE553CE553ABB4864E44B5816825086FD20A0AE858F247B52CB92F25AC6AD635A68D6DEFF06FB6B3E9F5E02E8F9DC3B73F36C2580BEC1762FA6E1916A57CC85BEC15B149DAEC0548B78A8EF44D45CFFA9F0ABF89FA5CC914EAAC9D91C484B00308CAACA0A5551C5304344B7208FFD63EE399E7FD9FCCD148965050FBA3EA839AC123C8A8A6799E7D3572EE61F144A45E5F3CD67B6D96E82AB9500FA26E8A4DFF02396007A861BDC50EDC6E34FCFF0AD267DB9313441B2394642280F96E54154828E26496E8ACC2D452AC921958C21121D85D3E182D71380D3E156863E038E22FE220E10A4346E6BC551956A4E811DA5954F6D1F75AC9D9AD953CBC49B7483CCD3034B003D4F3B660E1FAB04D033DCF804682A9229C3562BD7CD315FD500B4E1F3D2EAA51605F526ACFCDAE96886280F8A29EB45E1A034E2B1246C70C0E5768A6605019A40CE2A3323992C2EF40E4BE180B6A66A29BCEAA67FDC4E7FBA5200536A6374B694007A868767E97237590B94007A863B8C3E68037C6233E66BCBCDF08DA670B9F1AC7972B6456ED3A974EDC663A54CFE16AA0289127C547E12EADDC61371245953D01780D3EBC5403C8BE7DF7807EB37AE432E67C7A1437BF1D0D64D68F0B9A418822885DA00D670A6C0A8FC4DC07AF24F72331F59B2A06FE6DE9B9D672F01F40CB76B71B2CA0C5F7E5A97B32E12E67713E4334560A76DED8BAE74415C9EE66F867F73A8EA8B84EBBED028467276ECDCBB17F7AC5D85D75F7D1D2E8F1FEB36AFC3C5C110362C5B8C2A560897E2ADCA8266F92829212562CED37AED9BEEA41240DF745D36EB0F5C02E8196E6266E0314DDA6413CEF0E5A775B9F1AC6332304899E3B31AC6C5B4981746685F287DF435EB5AD976554ED59EB3210507F6749F43657D2D9EFEFAD77062EF5E291EBB66FB76DCF1F08368696C407B3028AE0E8A3C29A399D7D3003DADB7BEF94E2A01F4CDD767B3FDC425809EE116264093CD605C07337CF9295F6E3C178B016CFAA14DE6E3F45D1CA68E84922A356C92942DC73A332AA1060EEC3C7556CA81FDC3DFFE0D52434352F1C35F5B830FFFD193527B6D6159995479518145FEDF5AB571CAAF7D539E5002E89BB2DB66F5A14B003DC3CDCBD4685AA2E406CF07FFF3F55E8F6E0E060CE98BBE118036C40B870168913FA5059C819DA5916C0E1CE91B40286B43F4EC09FCE85BDF46CAE6C0273EF3243CE565686B6E424B30080F83A9363A4C9870C37257AA74932A7BA54CEBF9DEA637329C4A007D23AD776B9E5B02E819EE5702343FB44CE7339898E413FACCC93A993E4093C1ACA279768B059D11F74656AC6A7AA2230EE09DE3A7E1CCD8A550261CD40109A1A1A61A0D15E5F0650027D270FB58C8B650A74DD5189C3F8C98191E2E632E5702E8D96CDD9BF3DA25809EE17EA3554A3A9BD1E398E1CBCFE8E508CAF443935E478B7F3A343BB16A55F959458AD385392570486E9D9423714AA1DD880DE8198AA06F98453FB368A872A221E8878F7CE764024C7661F517BBC30D5F59B958CD4CA62157DA2C28B351A166461BF5062E5602E81B68BC5BF4D41240CF70C7524B999A1CF443CFE78F951BCD92F046C77A5A81428168165BE5870439C5FF2EA49203F17406C28ED66E6A661BBA1C0E24924978DC4E7825638595AAED48A6D2181989C11F08C0E37628A0B66426CEE79DC98DF47909A06FA4F56ECD734B003DC3FD4A70A69B837EDDF9FE3140C76021B53424A964AA493512D0E37F8CFCBF726908574EFEAE3CD4274E9C444F6F1F9C1E17B2A92C464722707ABC48A692D8B67533AA2ACB15C06773C8E9B2F3F1585C0AB3129CE93232CC98293FE37CEF08FD7C2580BE493AEA37F89825809EE1C6A606B300B485BE26B7986755EF0D38936E47970C5D3356CADDA49B45A7702BD6055F936CE6029B239D49C2E9B08B46F595DE5E641C7604BC7E5CB9D8076FB00C417F104D8D8DA8A9AF103C27B52E6DCB81C503E8DEE0731AA9535E9F4A8104EC5B11A44B003DE95177DB1C5802E8A974B555DCDD923C61FD73329311B00BFAFC4A5FD97C69C488A672BF593CD6EA2620405326957E68D203AD99877C84EB82613EDB4FB12E5426216491E275699567695D4BB517269DD8904EA5E55E69967EC9D13542DD0D31B945BB2393C9C1E3750B485B1368D8AED4A436D44029726B49A737CF5DCCF8B8BE4BC4D4332F6A6C595055CD47F529127F9A85BE2901F42C34EA4D7EC912404FA5032701D04C714EC4130888A8BDAEAAAD05DA04EC4CE6F23C4863B60217F9DB0C6C5AEB104EA66972192D86A45F8EA04C3FFCC1830705A409C495D54A7E95F770D89CF27D474787042859099D1F1EC7E359328C7FDBB871832E0CA09E82CF6A0284046AFE10A0B9009867B61674B51E7FFD45462F0C5A30CA9AB5486D10531E8121D0D986E912404F66C4DD5EC794007A26FB9BA4854C0A89780C5EBA3838A96DF4C92A43DAAAE85950C89FC90798DAB5AC004D3EF478C506260AC81980A6B4A9CDC1C20039E1565FB97225CF05F7FA7D02D02CBB655205E9AA20C0864221B1B41954E5F7F4DD13A819B474BB0B3A21069CADCF43D707419E7FE37956D7C778155FC66F1D0B40171DA0722255FD1AF399CDACF312404F6DFCDE0E4797007AA25E2EB274C7357CF3967516D96C1AC958141E5AD0B2A5D75A125A4FD3EAF1986D8B6CC257D362FE86036D849EA69AA67E3D0EB5F9AED88A35B439E3A230006C9EB9D85D617D97E2CADCF4A313E8CD0EC05A3791D7BD5EE56E063195753C8E725E7167E5B73F13B5ECF4BE2F01F4F4DAED563EAB04D013F5AE0591D5AF053F47DE9AB2B83ED2C8201A8BC1EFF5499AB35D978FD21B75E566D59C07A5FD3677A29AC5C04AD783958132195E74F1358AFDD7E67BABFBA1B8C98B7DDC56501FAF7BAC3E662BA01BBF37CFA7DB43AAC6E8CFB5FCE88AC32DCB47C1BB91EF4F4BC74A9184F10B1A4C348426FB7D09A027DB52B7CF7125809EA8AFC705E8F1405A995729E4309A88C3E7F6C061B70B2B586D904D42B43A379F1E6D580F133DC72C7C6F054203ACA6649760D124D2ABAD2E072B388F17A81B2F8837DE7DAE17A4B45ADEC6FAB6360DAD651EC360227FA7EBA3B81C97F5F8AB764479B68D4563644CDBCF5EB0B004D0B330C86FF24B96007A8A1D68B2E6789A04A2A4DC9465D2E67222864FBFAB436B2D4BC2861CA73DD1628CCDF27E798AEF650E3756287DC213F99FA7798B593FCD3C377DD4EC0B5AEF7C1FFEDF6AC9E7AD6A6BF0577CCE5971955B774CAAB7E88D2E2CB933FD2225809EE916BDF9AF5702E829F7A1AA966D009A55B47359BA9AB566443687682402B7CFA3009A3430D6E8337503CDFDE6273E0BE7D854ED9E8C8B63CACD37CB2714FBBC6945D3476D44AC4823B4BA3ED83FB25ECADAC98E540FC8725BAA9F0D52AB4C49F6F76C51EE4A003DCB83E326BC7C09A0A7DC69868FA10CE29C8DAAC7850FFF363A1A85973C5E97531C180EEA49181030C6B3A98D3AE5FBCFEE09C63DC0809B0916DECC96747E3D24FF5A2711193A9FDBEAA336002D9DCA4D9143E2BB795F14B368F81DB31C6789CA5102E8D91DDB37E3D54B003D41AF8DF151CA3F74296CAAB4D9548233FF4C904E01188E27D133144620E0811740655940643419AE72C8CCCF68494D05EB36A9CE377B7ECDE90C4A23A06414F9E439AF91026EF50E5C13B72675D0749E74E273C66370F06FA4F491B35E565E26B10229D42506B32AD9C5BE550571351EEB55587F3DF18DA7714409A0A7D168B7F82925809E0E406B6835004D90E64FCFC030BA2EF58A9CA6CDE1442A1E466D552516B734C26BB7C325842E65818B9F53409B5CDF5932C9A63978E9122080B1B6E244D6F3A4B07752074DF361AF715A71F0D27A98718310A8A3B1A8542527487B3D3ED8EC0EA419ECB501896C0E83A151E99DAA8A3278EC904577B696D31240CFEC18B815AE5602E849F4623EB06FBC1BC64F490D376E9DA10A9DBEF8EA9B58BB7C09FEF95FBE89BEFE213CF0E0FD685AD08CC59DED68282B1B135E329762C8693E7D8CC549853B02343FD7F3454F0A7B2775D0CCB5C2F51695620A1F2DE44C3A85442226198E4E8F1F769F1FFD8924DED97F0CAD0B5A64493D77E132B6AD5D8A16AF47F63CB3F12901F46CB4EACD7DCD12404FA2FF8C8F592CA7BCC3593996397913B0A1BB7F08499B1D075F7F01BFFAD92FE074FAE1F6FAF0E93FFD335435D661456550009A60EED417319C80493CC26FF410436523E58E62FEFCDC8AE2447C2F05E6EC45A51712198921E1F4E357474E63695B1DCE1E7A57AAE02E5AB319DD1707F1E8A64570CB79DCF764158BBDD8FD9367804C6D6F5402E8DFE830BF296E5602E889BA490281AA6A88C32032E733C199FE64FA9E6D0E9C190C61289E40CFA177F1A36F7F172E7719BCC1203EF1277F8CDAC63A2CAD2C136706CF7011A0C5AA9CBD80D344AF75ADEFAD892704686A631851A2E95E733E9F9767A5E748AD53443A56217FBBEB22BA8FEEC3AE177F2D0C9C3B1F7C1F16AD5E8FF56D8D68AC2A17C287685B67B54A8715A44B003D9FBBFCA67AB612404FD45D1AA055C5106D328B4999138026ED2A95B149B5909FBDF81A1EBE730B7EFCF42F70EAD4593CF1074F2096CBA2A5A906AD01BF00B4C2760274A1FAC83C73414B8207AD426A6A70DB7F33685B4FD48DD75C90C48C368B300BDC02A7CE5D44042E3CF3F40F71E6C841E9F98E356BF1D8473F8A402A8E651D6D63005A78EE9682027966DE14A30B250B7ABABD78EB9E5702E889FA561CD08AFB2C006DFD64538AE76C73220AC8CFD32FBE8375EB57A3CC039C3F3F840A6F166B172E40402E439EAD11E7516C81F9F6B1EA5C18195293E431DF9E75269EC7107378AD34C3833607A2391B7EFAC67E789221BCFEE39F206B4BE3C18F7E14596F2D1EDDB61A7E870A148A58613E09493FCD0D746909A067A2476FAD6B94007AD2FD5910D511039A90CD124D02DD0EF13F4BDDBD641A272FF48AAA5D536D2DAA7C4E547A9C70093F4B93F2728AB921D87F03137AD28F3E8503AD2E0EC3896662C7F5D2A5A770F97976A8E23C4B48C06E439A01432A12DA8077BB2E49828B239744DA9645C6EE83D7E1C4868E46786C86D7AE3344B5152E2F7703FD5902E879363CE6C1E394007AD29DA0B41914518EB6744E2CE2443402A7D383ACC30D386C18BC7C11D54D8DC2EEE077B97416E5C14021C59841252280F9CC16676BD2EF35F64063110A38391C79E1FDF95E63717AAF9B55456DB5EA2001DAEC6F12D92C2E8422E8EA1B40DA6147675D2DDA825EF8EC7671555DB5FF1943989FDED394007A7AED762B9F550268DDBBC5023D6214C9F65523A82498D0BAB24B028383209DCBE1E8A1FD0804CA70E0E8710C0C0E03E918BC5555188AC551E3F320319A462E63436363191219E0FE071F40D0E316BB9B0129A9BAA2EF657D86626ADB447CE4D918A4C6DDD1DFDF2F6C8E6269D09B9FD9C1588062A3A7533964722995B4428952BB5D76430E9703996C066E9B1D4E5958D542ED70D891CD64A4028D18CE33B0152A01F46C8CE29BFB9A2580B600B4E9CAB12A6F045143C5CA491203B3CD582FCF9ECB22343488442A85482481742687642282ACCB0587D78B0A9F13BD97FA61B3B91008DA90B5BBB0A07D217C76FAA21990A2F48ED282306048CBB558D06732AA72B3310CCDA2C0CC427E98FE6D05A3B9583466F63D09B6196433361C3C7814239161783D1E24936994955762A06F00EBD6ACC6C123FBE1F5FAE1B0BB108B45A57F183CADA9A9C2D2254B44DB6326744B4A003DB3BD7B2B5CAD04D0E3F42281872A68CCA66B6C6A96ED6C321EE35486D3EB13800EF50FA2B6A61A9954020EB70BB99C1D67CE9C457D4D35E07221924CA1B6C28FD1D1B854AF8E448690CED9110C94C14F710E5A5D0E97A4178B2A9E5D552329063D8233C19B9F9900818906ED78A0CBFB0F0F0F4BE20A9F6726ACC5899EE337F37D16E96C4ACA70ED7A6737B28E1C1C4E3772193B62D151786C2EAC59B91A5D67BB91CA6570BAFB0C92F128962D592AAE9FCE85EDA8AAACBABA40F0341FBE04D0D36CB85BF8B412405B2C68034E2CFD646AEA657376F83D2EB43636E0F4F93392FEEBF397C3E370A1A6AA02E7CE9E41341583D3E14664348A7BEFBD1B23A1118C44A2B878FE22CACBAB104BA6104DC450555189442C86546C14B5755588C66358B7661D76EFDE23E04B4B95BC633E074B3EAD5AB5529771D24AA5BFC1A0A2D5DD62CA55B1FEDF1825B85B60629894FB4C96E9DE36449369715BA42351785D5EA11A3A6C0E649D392499CB92CDC0EF758D0D9A1A2687B53DA6E1932E01F42D30A066F8154A005DE4E22030D162649286DD413E95134EE4E07739D1171A009C1E9ABEA04E9DD36EC795DECBA8ACAB123F66369313AB3AC98AD699AC54AF26B8C59369610890C9918AC7E1F6B8E91F91EB5704CBC452A7C4A7CBA500301E67856D2F2A2ACAB5756D53996B37C01098CAB829D6B1E03B50098E0B171790E2925353B9F67C3B568BD7A9B6CDA470E8D009D89C6E74779F40477B3B7A2EF5A2A23C80F2CA4AA4B34082C5187C5E2C5EBC080E27DD5F6AE72372B225809E6FDD7BD33F4F09A08BBA708C5603DD0B742D307143A76767ED0E49F0A50F9AEE896C2E839CC386483406AFC72BA0ABE4451904A4C75A4DDC0C7248C69270D9E89F760BE14E94D278ACD6F2379AFED6FF67A9256DA79B4351BA7E13205DB09E0B8B026B2D46225111BE77389CD75830741EBC296070D582925735993F13475BBA2C7ACBC4A3C84804FDFDC328AF2BC7C8E808827E1F92B151385C6EA45336B83C1E64D259D4D5D5283956FD8E2C5D5602E8F9D3ADB7CA9394007A829E2C408AA49B15F4DBB5EF98C4BB6C2E87583C86803FA04094D79413AD4AD14A00BAAFAF0F35B5B5CA8F6B8E9D57A389CC06C55C3165F814F92C8B4874146E97072E3BAB746BFAB0A4BC2BAD649B2DAD45B259A84083974E7B56893EE48D5391E437B415986ABB16893AA9BE37B256BCD8EC72224B2E8EA976D8AD7F7C09A06FA08F8DA5C9883E5D14DCFE5FEFC3E3E9D3A4ABA0BCBC5C0E9D6F013705A4053109EA9088FD9F03E8A70D87A3A8AEA840369785CD9E838D991DDC55D8B8ABE07159D88487E82E54275170AF417C7641EE06BA73CE4F2D01F49C77C1BC7B801240DF4097185F2C7DC8F41D338836990FFDDB1315339DCC7566E3987C6C6BCC2F6AF7C03250DCFED75697C366CF22934DC341956B9B036956D2D68C13BB3DA74B4631A14771879539AE2DE7796A40CF467B4EE59A25809E4A6BDD1EC796007A9AFD6CF555533BB9AAAAEABA1434636D13D445285E3336E69B05ADCB2D5ABC10668BCF6018039F718C8E2624804981A074D626AA6ECCAA64520FDD3D4A9F44E5E411A045313B67716D94007ADC515702E8694EC65BF8B412404FB3738DF54CA0E5EF8180F23F4FE4E2E0314C46E17953B1BAA7F998533F4D6B5118DF3B839DF46F30304A39215AD197C254B8F34B709330ECCB66E191231CF2BDF2DD98D2BA5ABD4FDC26CAEF5EFA8CDF0225802E8D8CE2162801F434C784B1A0E9AEA0F52C9834098036B7236D8D205D515131CD2798ADD314181B4D0A072D6206426D368CC67B319208E1DC6800478F9F83DBE1823FE0C5C39B57239849C12602C95AA5420AAF2A0057556398B5A7407CDE060967AB492779DD12404FB2A16EA3C34A003DCDCE36597F23232302B246A7E29AC555753283D5D5C1602113546849179F3711D84FF3B1FFFFF6AEAC398EEB3A7FD33D1B96198000487011297011C5454B28D9946C2596652B6549919D384EB9E24A2AE507975FF2903757C50FCEB32B3F2029BFA4EC2CAE9415DB522A2E57D90E1D45916849259292B883A448821B4080008101304B77A7BE7BFB0E9A43806800B3F4A04FAB280033B7FB9EFECE9DAFCF9C7B96079FA6FCCEBA7810CB4E68AFB1F61F97130E4E9C7F0397478F6143F717F0D0A603AA1605D269DCB8318AC38FED43C6D6354A74F08A1FF15235987524882ED92A1B858B294208BA21ABBAAD2F2A04BD06F5D102662CACD91C0C43AAC124109342CD880E15531B38C25C6B0DA22F79AA8EE208C4D825748954D2EBD9B10F7179E202B2B35BF0A31FFC18A55219CF3CF71C9E7EEE796CDDB6111BBBBB90F12A2AB1878DBD8CA5ACC3F5745D4F4DD0E2E610826EC4EA5D7FD714825E834E19BDC10242B482550534D75DB25E466D9D65E31261781EDD1D4C0059CE0A5F83A8A14E5D080366BC327DC624D38A8AE7F6BC044E5CBB854C5F0FFEE39FFE05E78E1D43D24A209BCDE0EBDFFE1B6CDAB90DDBBAB2E88483A44AD04901AE6F29FB8D6884961FAC06B1A0432DD3580D12825EA5BAB9D1471785215643B8612F67089B3F49F4DC640C43F461AFBFFA71B495FD2D4245D0BA0B8C0B1B97278BB83659C4F8A55378ED9F7F849495C0D0DE3D78F14FFE14835B366273AE0B698F232BB012C985D03A61E650EA10820E0553AC060941AF52DDA65F9F21E80759CF668AA0156D5E23D1D382E6F548D2E6688D8B43BB21E8E470FD08668B49277C95858400FCDF893340CA4269BA8099A949EC7EFC494C8FDFC6A30F6DC240BE473936D4366095947D67F62A718ED36942D071D276B87B15820E87D37DA30A05765249AAAA66A604E783EA232F46E086B04D71A6818181FBCA8DAE52BC559EA60BD8B3294145D5AA066CDDB81CAE0D94E161D671706A7C12274F5F82532C61DBB687F0CCEECDE84B02535333C877E7914EA5AA6E666E369A2DC10856E258254E8D394D08BA31B8B6F35585A097D15E2DE91A526597918D1B37D6A5B29B890861C20BCB8CB6D68AD6511B7EC2B70EEA60E127063DB3671F8B3EF9A9E0D38522F2DD19A4548719864BBB989ABAABFCF2A95452557A73136C4BA0CD6926B2E83C1656E7D3B5AF9B51E3BA5D3EA042D0EDA2A9E6C92904BD0AACB9B1C7FA1BA676F35A36F7826E0FFAA26991332A24485C8BB946562176F853FC56D79E5F418FAC5A761C5CBA7409A363A3E8DDD087D9B979CC146690EBEC84C3D2AA95320E1F3EAC8899D12D74DB64B359A4553303D35C9517B6EE0B297CD0378FF042B7FF4821E8F6D761BDEF40083A24A2411261720AC999A171C17654DA4A5CDD8E984901A7EB84D76EA56559BD57538AD3F354079123478EA822AAF3C5B2AA913AB87933CE9D3A8D6DDBB6A96251AFBCF20A9249EDD0A06F9D0F1C62A41F644C05E73B0B31D04D7FF084D475AB860941B70AF9E8CE2B041D4237412221F1303985D9838BB93F5643D00BF5973D657D1A2BBA5ED70F718BD5219A933DD57040974ED52DAED83895244CAB982DBFE8B5989D2F229B4C2952360D0554E2A1DF63918D5519E962AAF79987CEFA6A9BB512741F3C5608BA7E58AE972B094187D4A4214B5A923C4854F5F86A1E24E7A0E5C9ECC4DAE6B121455DD3304759BA09CC4C4F63F4D6A8DA0865A623AD60126DB15452644CD7F486BE0D9818BD8D64D2561D60D86D84E75A960DC7A9A807CDC040BFC2890F1EDE8FA959C26F0C613657D774336D76B210749B29AC09E20A41AF10645ACFDC04237105ADE5B59275B0AB371F022605DC34935D8B9F7B25B7A802ED5C17C3178671E9C245B56939323282679F7D16D7AE5FC3E8D818F2B95E942B15ECDAB513273FFA58954E257953C6DEDE0D989D2D28421E1A1AC2BE7D8FFA1D615C65819BFA23C46FAD98ADE4BEDA61AC10743B68A9B9320A4187C0DB100937BE4832267B30C4A9AB1EC2880E6345378B9CB57363E1A8F5A607DF33A3CE9F1B56FDF9745B2E761E27C1EB9F8B1DC645440C4D03DAA01FBF99F7BA6AE534E84421E80601DBC69715825E4679411704C985D66D98D2A26B5D132605DC3C0C9A656D3E88A06B099C7FDF1E63B8E1BDF1DBCB35B835F5B0F9D37C1B09E265489AAFADC6A7BF56EC5B75BE1074AB908FEEBC42D02175438234AE0786C1359A386A53C01B3D9F81613982AE1D37363AAAE2C16BADE0A5600D3E68983D4997870EC74B575D1E718D8F16820EF9618CD13021E810CA36A4C2E4149348D268C2E49CB4A24962C178EB10E23675C89D3BDA15C32494B0EE09DE5B30B392E1787C8D81BB162900001A4049444154BE6C1E41BF7BA3716E2A58CB4C26041D256D44431621E8902E0E12E5CCCC0C7A7B7B1B6E3D2B57821FAF363535A50A329994F2482C9B8099CD64954C86A1763AE5DDC8BE40ACF77AB24D0661ED06ABA96DC2CD4315CA1733F706EF57083A12AB3B524208418750074985C92941726EB4656708DAD48CEEEBEB8B0E690508BA582AC2F39C6AD8E1BDC41A68141BC03918571E246CFECE68106669126B7DC326E93C5C0250B5DE47B5E9ED92CE167F4B343ACD0384A0437C18633644083A84C26B49B2591B76C61A25617183921B6AB59665ABB3F118D912DC385D0B36C158735EB3B3AB03764AF56841C2D3ED6735267E2D269641F51C15776DBA863B7E7126DDD5C5EF0DC0D2D6E6CFEA2FAC2A42F28F4E871721E8101FC6980D11820EA17013E35B1B1616E2D4350D0986F791B0160BEF6BB425BFDC0DD48BA0CD83C63C94F850E43DB31A5E67A60349CB062B9F7A16EB53EB46B696B2AEB5CDECB239804532D76F576B5A93867DD7CBBD36B85FA62F421D5E84A0975B6DF17B5F087A199D932848D0246753507F2D5662D825169C83BFB34607FDD0C1F2A6E65ACD906729B949D0C4871B7C613709578241B154C1FCCC3C726C6890B6E0582E1C38AA821E6BEB59245FC743C54AC24BD848A9668A34B17557716D25F3BFE8B83296BA7F21E8B02B233EE384A043103443C1B851D78AD4EBA04539393909FAA2A354AED324EF045B76D5BA61C27C9C82BEE885FB634D265AC71EEE4C4EA033DB815436A34A9E6694554CFAF52D68DFCD61AB9EB7B49A3D382A21DDD38D6C49D0EC101374778411AC896384A09B08769B4C2504BD8CA21A69213E68EA60828C2169F595DF4FEEA86D32DBAAF5669277D6DA53B1F67E15492B9F06E0D97464B8281766E114CBE84877C29A9CC24CAE1B1FDD1E8753B1D0DDDD851D9B7BD063695BD94DF00C36A97591ACF657A475AD9D22EA21D22AD0969857083A620A89803842D0CB28C1902209886444626C864BA136D2C158A5B4A2E94E08D6B268863C4BC164B202CD378CD5CAB2E879BA3088F24393582DCF815BACE0CCAF8EA0F0FE47B832B811BBFEFCAB48A73398B85BC4D8CD51BCFCF45ED53C8087A5AC67DDC04B9739D5512542D011601E1121140242D03E4CB504114C4E09B6A2325FC55B55AF99F1C2B5F5405AB951687CF48C5D262675F743935B13AC7CC74DBD0AFB6E61E49D6378EB07FF86A12F7D0EBF99B88AD3A72FE095575FC5F6471E452A9DC6C19DDB91F4808C4FD2FEAEE1424847A0E64894AC68B1A0437156AC06094107D45D1BB2468B99C929CC9433C76A2DC47AAD2ACE4F994CC81D2DE9561FDCC0E4266AB081417D64F254E406095A15FCE77F151709D7C66FDF38824287837FFFD98F91B26C58C92CFEF6EFBE87A367CFE3A5E77F1F6CBF9BF1DB75293F89652C671DACA77DD7B4A7A343D142D0F55935EBE92A42D035041DCC8633A5455927224A046D6A58F0C1611E18ADB4A2F9C0A0056DFCE2F594457B925D381E89D456D11BE504F0AFBFFD0076E90E7EFDDA6B48C38395CEE23BDFFB2EDE3B731E2F3FFF1C3A01A41CBFBBB89F2F73AF6B43C778043BBCB4FA832D04DD6A0D446F7E21E8808BA3563D2CF969A226A2A23A43C84C01A7151D2C32D42A190D411B6BBE6EDF32940F5A7B265C8B492934842D14011CB97C133DD92CDEFFCFD771E3E2653CF3D21F22BFE361F4D8C081ED5BC1472ADD1C2AAB4539A46B7DCF42D0AD5A2F326F780484A06BB0326E0E5AA9FCC7D2A2513B8C1F9CE9E76CBDD52A7F387131E9D92646BBDE998D2E5D1ACAB74DA704D9DAA6271AA3E5124E5F1A41A2C2C24B36BC149D15653CB76F0FD2AA73B8870493597C4786DA1C24D157B70B75B28B6ADF1591432CE88828224262C490A01D95286C2A3C2CE8827E4EDD7D9A9FDB994201D94C56258698C35460AB9B85B88A85A0E6A6FC1E502A1751AE94D1D1D5093B9888E117A4A8D6A558C53C614FA13CDCB4646E08FDD024418561E0026BF1F2BABC515ACE34A399BFCD8C410FA8242B982C7B98982B29C24E5B16367565D1AD1257D831C090B4329F75F44640109277D5C5B11601C30215629C1074089062362486043DEFB99ECE3A5309673A820B0C0FD0A462A970BAB95211D94C17526C0DA238628172AA7EEA45164BA33FEB7E029D929B8D5DA79D0252D9343ABC8CDEEE523B601E5C2678D0DE24AF3570512B1F71C5C5EC0CBB91F7E8441076555173EAFF2B7AE48B46BE15C85345DD4FDF666CF4ECDCBCAAD151745C541C0756D2865B7190B26D589E07DBB254424B523D6CFD4C421F8460BCB5DA206C24382BB84F0E15825E216031181E3F82764A9E972041EBBD7C9D154CEBCAC31C803BA5044AAE834ECB435FCA46CAB706FD720EF72D89A0A5B80AFE59E11273E0B03810237C5D5B65D9158A05D5713BD799F71F24FE25FD74676579369085B48BD7C3E4C4846A22ABFE4C300259BFAEC43024A84CFA9531A28AE2F04FE35CACC97DFEFCB0B2DAF9CF7CAB617C38372A1DD7433A93C60B9F7F1EDD5D9D7ED956F59D434B44B787C52EE47E14C70AE559A1C256345C087A4570C562700C095A9954CA22AE241CD82E29CCC254A582B74F7C023BD78B59670E994A199F3D38847C92E6203FD40BC4122C36DFDC55C2788692AEDC9648AB9F9EE3E2CED42472FD7DCA5E65B43013356CD6AB509974FCAB717E568FB58B2C6074EC16FAD95945398F74D1A2FBFD1CC6031C1E35B3CFA7FDEE50DDC2C7C66EABCD517ED3E1CFF1F171B0E8FFF6EDDBAB354B060737AAA812EA8AE7A5923AC1887F47250BB3160521E8F0EB222E23E347D06ED9D33519ACEAA6D1BCE7E167EF7D8CBD9B3701E3D3B0520914B2294C958117F7EF40B65A70472F8B051FB4F16306974BE3C850CDEDB8EAE162D92CB1E9A09CB031512CE1BDE14F7073741CE9640AFBF6EFC2EEDE1C3624696B9B0CBAC62D69D22EBB7DB3F5959A8D66AFB14C83D6B311610546343339B9594BAB9751222457A6DF1B1D9070E9FBE6181E2A3BDCF3E0382E52295BFD549BA89EEE7F58CF4EECF5465408BADE88B6FFF56247D0AE57F1122A77D8521667C90246A6A770EA93EB18F9E863BCFD8B5F2291B4F1F9AF7D155D5BB6E0C583FBD1D7A1E3A095CFD22F466CD21DEE351339AAC1046DC2CEE0AA99EE3816FEF7E333D890EFC0F8C83564D25964FB7B91B5D27862E73674FAB5291AB354751C1C6DE6F1094694F4FBFE66E35509FA277C095640CE3CE3F8F1E3CAADC1547292F1D0D010AE5DBBA67A199A10C303070EE0F2E5CBEAFD99C29C7275D0E5C15661C5E2BCB2E653A9243EF399CFDCE3DED0AE93150AD41820D55585A01B086E9B5E3A7604ED798EB6A05D4DADF33670FCF20564D33DF8C90F7F885B978651725C3CF2F4A7F0C24B2FE1E1AE0E3CB471A06A102E94AF34DFE16BBDD08D25680ACD4240CA8AF62C1CBD740D76BE0BFFF3D39FE3D4BBBF83E759F883975FC29E834F62E7F64DD8D29DC5421C4ABD57A99FE1974860FA6E011D1DDDB06C0B3458B57BE3DE5863E59959A108CC5234444A2B59F9991D47FD23B9F21F236D6855F3A828CB39892B5746B075EB163F0E5A47E7B086496D8D1321E8152A4486371581F811B44317874D96536CE1D8C0E8DC1C8E9E1DC19DEB17F1D61BAFAB68802F7CEDCF90E8DE882F1DDA87EE944E90B827BCCE2440282B2C48D2F78E0BB31915BC6EEDEF55AF80BFA9692C56156DE2026F0E5F44DF96417CFF3BDF45D6E1A69987C16D5BF1EA37BE892DDB366247AE53D5A45074A9FCB87A93CCFC1DB61BF762ABD2E4913072A2529855E9D8E9EE2E78094BF9C22D86C7298B9F51257456536A53CAA8A9EBBC2D26130BBA2DD4D454216347D0954A850E5C05B2CD0D242B81622281374F5D40AAA313B3B76FA22399423ADF07B752C1338FEE408A9B4B9E0B5B75F530A163A6978776B71A2226411A023485831EF455BAD6A20BA66ED7BEA7B600FD5E4E092F05D74DE0DDEB37E0E57378EFF537F0FE7F1F612D21FCF15F7C039BB7EFC2EEED8318ECEC408AF6B61FE35DBBBA6AE75BA945A9D0703D788EA3DC0E9DB96E1D2143EB9658F077D74182CF4446A024583BA4C1DF329AFA11AADF6442D0F5C372BD5C2976045D743D8F2E02C619247DE2752C1B775D17C33727706D6C1C5EB18C3DDBB762E7602FBA98C5E617EA0916D8B9A76A9BB2A6FD98DB6032842A36CF4A6CFAABF8830EBDB1C5FE7ABA225CF058207A96DE2C29D746C24DC3F312B8E539F8AFA3EFE185279FC4F4AD51D8691BE57C0FEE8EDDC2A71FD98DB40B24594FD9B7F88316B491CDCCB5AA080707A824B42F7F62721A03BD39F50C49D38BE4D2B5A0BF61A8C817858358D04BAD0321E8F542ABF5BB8FD811B4532E79A53289308D644A87A9D16FCA2E1DC58AA3FADAD95602F3C522D2990C922467CF53197B3A1A2001DB4EAAAFF30CBD23499284186D40FF68B95442369B51244BBFE872D5E64C8D69E372A8256665A092DC2CCBFF99D08CE827CC955300BDB4BF7CFB0394ED349C7209DB37E4F0E9038FA033E122AD73F096B5A06B5D1EA1961823265C4DCEA373B3B83D5F462E6D63534727BA123A7E84563FBD49B4AA19CE28F4BC34B242D0A1565DAC06C58EA0DF79EB4DAFEC59982FBBD8D0DD85345B28792E1EEADB80B3C39750283BE8EAC860B23087439F7A1297872FAA780FC6DAB22EF4DCDC3C2C2B895CAE1BB3B373EAB57C3E8777DF7D1F5BB76E4661661ACF3FFFB9257DBD8BB9188C551BB46883196F869C9565ED5BEB8C70D639282E2A4880B10A455D551359A63E7313112E6C4FC7FFF261622C5A3FDD5089A25FD316BBB6F4C3AF7FBA37E65DE0D2AD314C4C4F31425B65EF95E74A38F4E81EE4D84351E703F9BB830B73859F253E2385A0E3A3EBB0771A3B823E76FC032FDD95C3F0C54FB03197836301C96C12071EDA815FFDFA0886F63D8EE93B13C8E63AB067EF2338FDE10994E68B2ACC8B110503031B71777A468578CDCFCD2397EFC19E3DBB70ECF80995A4D1D991C5534F1DBACF0FBD948B23E802A10FF7CC9933B87AF52ABEF8C52FE2ECD9B38A34E7E78BE8EFEF53997367CE9CC281271EC77CC9414F771ED9245D301EAE5C1D455F6F2F7A7ABAF1D63BEFE0D52FBF823367CEA2B7B717232323989E99C1407FBF8A6450E9D18904F2F9BCFA66307C7E18F99E3C7AF23D3870605FD8B5A3FCDD57666671E5CA75607E16AFFDF4A718DABD0B2FFFD1CB3871F23CBEF2C267D1415F3F5DE7DC3134E53D57F010082DCC3A182804BD0E9458E75B881D41BB9E3AE0F9BE61137FA1929395C354D7DE60FA343710932A7A630175638D9A6408DDE95B338EAB7A946A3FB2B1481F14D6A532DB54676A3D7EA630AB48F9DCB97378F699CFAA9F2CE5D9D7D78F2B97AFE0C9DF7B0263A3373172ED1A868676E2EEDD02FAFA362093C9E2C30F3F52963C93360A85691C3A7408BF7BF71DCCCE16B17DC70EDD5ED571914C25512C95D099CDA23B9753216AE7CF9D4757771776EFDA8D271E3FA8657F805B44B94318430EE0DC5411E3D7AFE3C7FFF07DCC95CA989DAFE0AFBEF5D7E87BF800B6E69318CAA702F54E74FCB91C8B2320042D2BA31681D811F4F9F3E715DDD267FCF0C30FAB9FB48C754AB0A732D5F81A7DC76AD38C111D696EC84195F6BC79F326CAE5922236BA0776ECD881EBD7AFA9F7151907089AE7F3DCAD5BB7AAEBD586B4A90705133DFCD03766C1954A25B559D891ED52F3738E4A85B66A02994C0A6EB9A21F1EA43A5BC56720954EE1D2A54FB065EB566432695520890366E70AB06D1D23CCAA70D94C465DB352D131C4B69D50F75729B350947E0A7564B2DACD714F18E1FD26AF8A21077072BC88C2CDEBF8C93FFE3DE6E6CB28961DBCFAF5BFC4C3879EC54036815D799DFDC7F99547463609976421216821E8D813F49B6FBEE99168E92E2041D34265F17B5A9EFC9D044942E9EFEFC7F0F030BA733DEA3DFEA3BBE0C2850BAA4634098EE43B3838A8B2DD98B5A6D28ED34945DE263D99AF1D3C78F0BEBAD224653E08CE5F3887E9BBD3CA821D18D88472A98C8A538153F1303D338DFDFBF6A154AA2837453269034E45B9288676EEC2E8E82892A9140A73F3B83B7D57F9C39939373D39A52C6B1AE6A964466F5E96CB608718DE1BFFBE78F1220E1F3E8C1B376E546B3A531E62532997D0D1915561737BF7EE55F7597B180BFAF2DD026E5D1BC5AD8BC3F8F9EBBFC0F6A11DF8D6B7BF89B73F3C872F7FFE307A1823CE8D54B5A1BAE25A49B1FAC40A41C74ADDA16E36761634FD1BB5E165C10D39A246174530E42D18A2466227599BD03933AE36CE98EF93144D14C762D63309F1F4E9D3EAA1C07FECDE423224F16ACBB78CDDBBF78085F9F91061E4085D138C2EE9E9EDC1E4E45DCCCDCFAB9E89F45B9378395FFFC0065CBA78117D1BFA50762A4A5EDE130997D634E7215993D0F910E2C3850F15BEDFB7A11F85991935376B5790A0E9ABAEF5A19B2495390F78E7CC0574F6E5D1D5D1A922368E1DFB085F79E619F464B851E920E9A54CE5D185E6DAA19667BC060941C74BDF61EE367604EDD267507304134A167B2FB891574BEE663CAFB1D47BC16B9A718B95BC34E76BB237D97E2ECAE58A224FFA9855E2875F1744A7CC040BE4EB8A6FCA276E0AD2FB19901C4792D70D704D63023D4FD54FAE2F56756F185C82B1D3E65E0C8844932DA83EBA7C1D33F3F39C1C7B87B661A38AE0609B2A172955299F5BA89EEA8EB2F284EF304BB9FDC70841B7BF0EEB7D07B125E820F9D426922C966E1DB48017CBBE3324574BD8C176548B5D3738BE4A7E815AC5C1EBEA303B5D3E53156B0A9440D5A52F34F1EAF86B86D731494687D95589DC1F137C9804936E4C213A52EA83926C4CE49CC79CEE40C53A971983AA0EB47E58249978A38BBBFA0DAB1A5BFEB4DE1F90665E4F08BA9968B7C75CB1236815C2D1D687B19B79134B45442C3F466D50FA641D7CF8D0825616B3FF73B187067DF5EF1CFD1D0E1FFE347EF59B5FA3B77740C5896F1BECE356264E9E3E879D3B3721DDD1053BD38DB9BBE378F1C51755676E5BD5BE5B386AE3BD837F2F977DD9D66A5C447821E8F5A6D1B5DF8F10F4DA316CF21582CF97A5028A971F1374A704DD2DAE9780C586ABBECB267873E69B067DE2C78E1DC7634F3C8EABD72FC36635B97205C5E919F40F6C819DEAC0F5AB17D0D9D589642A8B5271164F3DFD292498A5A92EB8E062D186FFBDC932B5AF3519E0964D2704DD32E8233BB110746455D33CC1744CB7A33B8DF83E6ED7FCCD6E8DE5B2DA44341BA224F772A5825426ADE2B8E9D4D0FD1D2DB82CE5CA96526557D500A14B867E6E8E2ABB096493DA2362AE1574F1D45ACFADEB5CD33CEC83330941B706F728CF2A041D65ED345036921F0F5AC58CE8387AF4A80A05B493696CD9B219B76EDE5011218C5A21413FF5D453AA50FED8D898CAAA64EFBF62B9023B69236927E194CB38F0D8019C3C79168FEDDF87131F1C47672A0D381ECA968B446727C6A7EEA2336561433EAFA256D8818507A35618D1425998E938373787FDFBF7A3A7271F74B337108D685C5A083A1A7A88921442D051D24608596A1DE8ABCD9A0EBA15E853663C3463A027EE4CA1B727AFE2A949A2268283EFD1B5A1B21FFD3E7F1B376DC2C8D5117477E7904EA754ECF4F51BB7B065EB364C4DDC56EDB79814532E17D199CB01B68DF1DB63C8E772EADAE63C923E235518BBCD209BD9D902B66F7F081D1D9D42D021D6840C59BF080841B7996E17DBE15C2D49076FDD10B6EEE9674A832E9429E5D860E53D1D8EC75AFC3AFBC475746951169E4AB01722895C0F4152054DEB71AC6A67B60955A968577944D4A1B331F5DF26A9A51EF7D62E2A160BBA5D34D53C3985A09B87F5FA9CA95AA96EA16ADD222F2DB46E8C13E3AE50E342D02B042C06C385A063A064B9C5F6404008BA3DF4D44C2985A09B89B6CC25083C00012168591EB5080841CB9A10042282801074441411213184A023A40C1125DE080841C75BFF8BDDBD10B4AC09412022080841474411111243083A42CA1051E28D801074BCF52F16B4AEFBD0E6C5926411AF570484A0D7AB66577F5F6241AF1E3B395310A82B0242D07585735D5C4C087A5DA8516E623D202004BD1EB458DF7B1082AE2F9E72354160D5080841AF1ABA757BA210F4BA55ADDC58BB212004DD6E1A6BBCBC42D08DC758661004422120041D0AA6580D12828E95BAE566A38C80107494B5D31AD984A05B83BBCC2A08DC878010B42C8A5A0484A0654D0802114140083A228A88901842D011528688126F0484A0E3ADFFC5EE5E085AD6842010110484A023A288088921041D21658828F14640083ADEFA170B5A6A71C82720C20808414758392D124D2CE816012FD30A02B5080841CB9A90280EA966279F82882220041D51C5B4502CB1A05B08BE4C2D080411108296F52016B458D0F22988280242D011554C0BC5120BBA85E0CBD4828058D0B2061E848010B4AC0F4120220888051D114544480C21E80829434489370242D0F1D6FF62772F042D6B421088080242D011514484C410828E90324494782320041D6FFD8B052D9984F20988300242D011564E8B44130BBA45C0CBB482402D0242D0B2266A1110829635210844040121E888282242620841474819224ABC1110828EB7FEC5072D3E68F90444180121E8082BA745A28905DD22E0655A41407CD0B206964340087A3984E47D41A049088805DD24A0DB681A21E836529688BABE1110825EDFFA5DCDDD0941AF063539471068000242D00D00B5CD2F2904DDE60A14F1D70F0242D0EB4797F5BA1321E87A2129D71104D6888010F41A015C87A70B41AF43A5CA2DB5270242D0EDA9B7464A2D04DD4874E5DA82C00A1010825E015831192A041D1345CB6D461F0121E8E8EBA8D9120A41371B71994F105802012168591AB5080841CB9A10042282801074441411213184A023A40C1125DE080841C75BFF8BDDBD10B4AC09412022080841474411111243083A42CA1051E28D801074BCF52F16B4941B954F40841110828EB0725A249A58D02D025EA615046A111082963521511C9EE7C9321004A28880107414B5D25A99C4826E2DFE32BB20504540085A168358D06241CBA720A20808414754312D144B2CE816822F530B02410484A0653D88052D16B47C0A22800097612291A84AC2BF4F9E3C89BEBE3E249349F57AF0FD08882C22B40001B1A05B00BA4C29081001632B18220E5AD0B508895D11CF35333838B8F0146F22042D99D4FF5048144713152D532D8E80EBBAB02C4BBD69ACE95A1747D08A16828EE74A8A1D41BBAE2B041DCFB51EB9BBA6E54CE235047DEAD4A9AA8BA3D6051239E145A0A620202E8EA6C02C930802F72250EBDEE0DFB4A0FBFBFB914AA5EE717F88F51CDFD5133B0BBA52A988051DDFF51EA93B3756327FD2DD71E5CA1574777757370983C20A49474A754D13A6AFAFAF25EEE0FF0766F1DC443B7D42440000000049454E44AE426082 WHERE `app_id` = '7';
+UPDATE `fn_app` SET `thumbnail` = 0x89504E470D0A1A0A0000000D49484452000000D4000000BA0806000000D62063320000200049444154785EECBD09B86557552EFAAF7EB7A76FAA49484B8510087C88A04F405194EBA75E9B400286670BA2A2288D82CDA70F7D8A4A7C220AEA67C305858708DE4B083DF810BC72318020810409E92A55956A4FB3FBD5BEEF1F63CEB5D739D59D537572A1A8BDA152A7CE5EED9CF39F638C7F74CE3DBDB4B8F3F3FF811FFFBEFF829513C7D06CB5E1FB3E5CCF85E33880E3821F47FE7B864FC1EF0A80E714E6EF930EE7410E8F2AAF9703D03B9CE6630E2ECF39CDBF375C542E55BD8B5EFBE4DF8CEF79DAEF367C212F89020E9CA240C177359FCDE32343C063CD17F67B7B39BD921D87420F2C2FB2F1DF85DEF1A43738DD33DB6B57E7AD9C92CDE377C6B1DA7487936EB8F12DCEB6444E9E818D173CCBB2292F7FFA79AC8EAE194CF3881B8677D38356AF371EEB332C49CE7D9E23CF7324698A41B78B99F979BCF1D6F7C379CB7B3E54DCFC3DDF8985F979F87E504EEA498F76C6C1E402E0EA1883A58A2F79B41C285CC0D9CA1C54D7D369578D056D15A4E313E5B79B5168174FA1CFC935BA1108A7B859E5794F1A6CB99D9EA3D7B1DB838E0701377E86CD13B4711A373C49B9E82D90CCF056DE67D337FA3E06C4FA30274176FCEB9376C7F1B1278FC0997E53592595157BFA055F7DAA535F979BB16CE4A7FD9CFC5E1B3635AE3347AF51E4BABF572779E3BA38F926F6EAD5CD683C9AD5B9DEB8BFA5498263C78FEBB6B7B8B4044F245175719A0739D5BCE705721770B93065519E8C12EE36B29A0A2EB6CAE23FC3C08F5FB67253F9F16439566CDA72456228A637EDF666D0CA8B5706D12EFA0DB2CB82720C8EF1E2D573C7CB48BF51A0E914E86DCC1114D6763E3701B33A6AAEA24F267EC3F166FCCADFCB75CD4B1A0969015BCEDC6691B8492E8FAFBF518BB08F2C97DF349D1B1661F95D058425902B1B891DE60DC276B3ACB5FFAEAE3BBD6EC175E39891CD0BC01DCBE8129695B554EE21552C9A35325E4DE39F721470ED82299FD1FEB05140D899D5CBD9F9AE6A5AFA9C945ACE54AB55345A2DB3A3E6708C18D12562102950AF28665590999D39876B1E9067D985369612279DC2A3721D345D5CE39DC96285DF54D580EA6EAF80E2F51DE406D4560D5395CC689FE3AB57944D1DB8F299E4550BE48E53AA9F7965A72CF12C182B64B239979C1059BFE6214F92BEF2023972D7198F8D2C14034B0B227BBEAEA4B1E82C17848E27D715C78BEF2CA7CA2662AF67E4A339DD2CCB8AB092132083C58FEC9F55505915224791BB70F872B9991757D7825D1376F3B06251B732572583D962EC8621671970D81D43E75A4153AE31C73CBF018FD91EE5AEB2F0AD3A61B402D9C8364B64B34116E06AE4F5AD4A643488CAB956652A6472ED809432A0326E7A13BB7D8CB5117DF431A60D5696772DD31890C1752A03E71482613D2137AFC75DC26C5755C0D98991AF8CC8557967752AB3C70BF0EDCF050ADECF8A685918768556179CDE9B67C9E35981630448090B8E2E179A6E3BE580D839D36BF355CDC66016A7DE4996AB192057E16D77FA522018358227E4BC391165B53C1D713B3632017208CF715118DD838FE81A1B53BEAE80C2829B6AA25C56E6515F722C747524E4C6E6FD0BCE0D016B9E99EF99E766ACB8C39700B68BA2B299C89818A94BF594FF20E064F2B889F26FDAD279B938794C2E1B962C0C039F0A302ADB2987896BAAAA3DE8F231D2986BCECCA7DE5667D3BCA10EAEA842150DA5041C377F6E2C7A6FAB74CBEB98B9D561B79B813149E4BB8D8243EEAA3B54E54A7A217942234FE4D6D62E3660CE650C5CC50F6FB1B4BC2CCFC489711D57777B591C66F79249D1ABE80E6454D2D25E2AC0DDDC4A0BB129CCA4C800510C0A70284908512B8D8C583733CAC7E20BC882E3A4C925CDD6E0EAC4E9566157AE284A669B303B988C99EEB09C04873BACD924F4A9F577166DE3E56A67D10CACAC33A3725892C548022E275964A57A3C5E14027DB3802D90EDCEE6968BDB4CB0A8C26630A9425BE928A854E9CD1D448129FBBF9D735D742221F59D38AAE5062EE3A67326E3CE0B98F7D1D560D562057C5E18007359984D54A7620C1601B6AC19AB762921534A649138F284061EFA1D37123E8302D0AA51E3852D6322F3C17750D9A66ADE78531C6B3155E0AB742D3721036E59315595ACA2C7EADEA163A82A76B9A31979A06B4D8580193F0B77B3F1C90E68E6436F99EB3870C4EDD25C5EDEA57BB1058E990C824B0F1A4B149937EE88164C66EB1C6B0E63C1A833A72B46079E2A8B8A7AAB2F5527888B40F6598256D7C058FEDA856044BA9500BAC8CCC0162E0A379745A6D363D8492BE68D8A615508B98F4834A794C0BA1F991D91DF1989C231B0EA4C55CCDBEFAD2A268F6C8063D5205543CDCE6671CBF1330B5D1680CCB6B56155AA7063C9ADEA52EEE3F2F4A5CD6A87D2EA1EBAC875B1C87398CD49259A8262BC0AAD0E61A598D98D453C5875DCA895E57554BD14E96DE652CD3ABBB48D5093B569AD4BFDCEC8D9B146CB71311A8A5C810BD42E4AAB1594FBA555E10D90658D5A8DC1805C34B75C80AD5B8C5D07565BB4768E8E8DCA435D29623EF01955D0985D4E351ACE8F0802FD6785B5DDC8565BCDC9D9B5BCAC9091DD49675E416476126337E8A4F00616DD3A210A26AB37A80E248BD4EAF7664B14C165C0A9AAED4683D40AB6522018C54D777DBDBED5CFEDE053B591E7B452C8EEBE46453588DEA0E7DAE9E522A626A16FCA677695FBD0FF18609B0564EC00233BC49C143B83EF2FE48C59640226AACEAA2A8DC7C71AFAFA80B2205D02DA4C90A82646571715D8A845F21C2ABB793DD9F98C9D2292DFEE4DB2619B09368B52664200C67733924926D7ECAAA50D930B7865B194F36EEC0FD175784B638B983953C4DADF71F8AD9AA99A05DF518928AABBFACEDCCD752757A95902CEBC84FCBA94F04611E45C884260E6592E6ED438B9A7B9973C175553BB4ECCDA9231196FEC6ACFE9A64EC96CC75CEC70BB29D84DDF6C0AD4ACF4381D4B8EA9BCBF51AB4BCD4A6CF91CCEF2D2922A09B2637397D79B964B586753553EB3B0ED80954C8CB137748171F00C7569178CD9A245BA99C5C687530DCEA87266E154E80C2395B95B9AC56BC7B9E203B2FAEFF88915783265B250C6D69E591D6A8314542FC73BD2D8C8AF4851AB459B034B49CC7192C566776A731F4192AA8432C566A797A56240628D58BBB1735794C915DD4EA9762B61D426B46018AB4CD61857B5D24802A3AA1B75C39877469E55E653006925BD2C302B5F746790454755D9A8F7327AE317DF4088283E75A7579553B5108E8BB503558B305B7F7933B3D08D5E6CD5456B7AD879B29A8D7D6681A4D100644AAC58B05A8811944A5818895B6A0D5661E2B3885161806F54C90A4123A0339810759A73A33B94D115F446E59AB18615CF5B16093516D076B04BEAB7A20EEA02B56A8D0A71D17F2B14A75571C64C94D9552D1B6740A90BC74A4263A3559EC3DA0486461BEFDAA52D628DEBCAAE55B25E9654D8E8D390612807BF62CBC9EFEDA66217D3980E57D5B4EAC8353ABEEA7C627FD256E0DFE562305243258A9584461DB34A921D4F0338B5BFCC6455774C737CA913995D5AD51E63DB6C58F77631997B8BC418AB66BA53577C86E5A6A9A030F6F9D84A740C68ECE2B2EF634995AA3D65CC04A3E0A80650B5B12B1ACBF83EF63D2AB47405F4E5B89412C7A8B6E5B88C4D0BCB25A956C7CDD8A8A166416D589F566CD8313412BFAACECAC855D69C153432A3E61975F88C30595A5EB2E6F178C84B95D8EE01D5E9B0ABC1C804CB22D92D7793536E6C5559E3DD8899CA8EA033375E48251961D5D9722D1891677525738E799F928EAE325B954DCC2CEC0A1BB7296AC31EAB3BD898391AB33F278F87591F5533A2BC8CFDA57DB35205355AFA788F35DB6DF93E7602369D5919336B43549F79FC8255F0D8BB561ECB4ADEF1545A4363E341E5F795E7A9CE6FB94E2AD2A27C37BBDA2B268951574B3BB4727EB97F6CE0D9C607A89933B6E76D948A594D1BD76E098C8DAE13BDAF214C2A4EFD524894CBB0B2D99807ABDE67C32059E96FEC579150278DE2E65F54C673CCE49CF5ACD31E501DC773BFCA4E9FB971119FD3D577E2C576E21A677BF8EDDCE3A463B773F2E91E6427AEB18D973CEBEDCE7CC0992337363EC74980DA7CE90D9B4851A05EAF8F6DA953EF6715CEE76C2FAD3B694516E809671D80CD72672BF7F9DF70CC969F7B5B2F799210DAF13739DB736FF87EB3BCDDCE7C6DE1C9AD12B28543CF78C8B63782530F02C134180C54B5B68CF5496271FC24EA87AAAC60AB559C6ABF6630E0FCFCBC04059EFAB3C15AD8E290587AB572B82152CE7E812D1F78F64BEDC411DB7A9C6D1D2C4FB7FD33B6F85267BBF086EF4F31C7673B7F8B8F615FB2E26FDECE999B444545E5DCD2E89DFA255CD7C5F163C725587CC33668F43AEB07B710729697972C5B59D2B8EAC9DE486BF3627996636E7EEE0C12EADCDF7F72E66404BE16478012EAC4F113703C1B1D626065E9DA0D0F6D58BE4D41D26574A4F58B0B45C8583723A14AFAFC6B710426CF3419811D1C0101D4891326826723356159CA5200528B585A322C9F848118B5C246F64A0C93096D290A644581C5B939F5354C3E9311B8084680803A7EE2383CC72B43A2CAC015719758379D465E1A40A9822E6E14F133D9205813FCA28159E267A10D35915017C14A9ABCA20A1EC7C5F1E347E1BA9EC693DA103D6372599965C39204501A1E621CB512CA485C8DA3AEC5C812275981F9B909A0266BEDE219013AEC8F1F3DA181C665348A89EDABB80F4D800B9CC5C5A5C2C6E7D9E0CA32245EA83E1BBEE320CB332C2E2E9E81E5BB78067AF2A617C708B8AE83A364F94CEA5219425632E38C6ED1004C09F05E5A5AB4D183265F681C96AFA1563630D0D850F30BC84DDCD9C531A493B7BC984780B4F9B163AAF295AE241BE95E09FD2A333DA8F29D75C08CB3ADC8722C2C2E4C24D459076C72C0D7CB0828A08E817F1BC25C4D229BD9605FD4A0486CA8ADBE3C69F3858509A0B63A5E93E32EFC11D80C284555054D26C6D0464C56006512CD84DAA80C4435FB7802A80B7F854CDE605B236001E5305FAE3CD3B0DE265BB72ABA9CC5059212E64893E4558DF6AED61BCA8A1C8B1309B5AD09991C7C618FC0661BAA2A6FAA95B76C828CB3B8B45868E5204D1F974F19D664CB84E9AFF33CC5C2C2D2B66DA824491004C1853DB293A7BF28476083CA2799E0CA9D9FAA5C9D687F8B4B0B5AA6C326E7D94C4782AAEABCA2E3F71C543E82E9CA2BAFC4273FF9494C4F4F4BB4BA35F02ECA199ABCF40535025CAB478F1D05DDBAE256DA206C58F4C7D5C24C9A030C67619180D2FFD90A3A9A056A72A3A560827A8CD33CC7D23655BE071F7C10BD5E0FFCFB75AF7B1DFEE66FFE4606B4D56A210CC3B35409BDA0C67EF2B05F872320803A4ADA9CF5318CAFC956A3328519B56E852924B3B0B0A8E91B95CA36656688294925158B88C0BCC0D2D2F61CBB1650D5B17EDFFBDE873FF9933FC1473FFA51CCCCCCA0D168C0F3BCAFC3E998BCD2853E0202A82347357DC3A6CADB3A8B5A59A2CCDF63ED0C91507AE4B8F64359624B93E5E5FFAC8C9366199696B667439D0A507690A90EBEF6B5AFC51BDEF006ACACAC606A6A0AB55A6D22B52EF455F875F4FC04D4912347C4B15B5606A9D643B1C54F6C00C4E22223258C2BEAA44225634E83C7E7F9CE02AA3AEE9FF9CC67F0C77FFCC7F8C77FFC479158CD667342647C1D2DCC0BF5552CA03C4930B4F550F4C7AA03579DBD059CC585C571E9D333E69E17C8B27C4725D4E906F94D6F7A9380EBCB5FFEF284C8B85057E2D7C9738F01753A93C4960430B56FC58632CC453509F15429F0D90EAB7C671B73AA8B0416890CA6944C888CB38DD8E4FB9D1E812AA054228D2BA09C5C7FA5A00D455262DCD9C8DA4CA626D786E763B4F9D2E2CED950DB79F9F7BEF7BDC2127EEC631F9B1019DB19B8C9B1E73502252921A17CA61AB08984508AC148285396CC595C5830B5082B4E5D5B00D0A46F48652216B42FB06D966F7D7D1DBFFAABBF8A9FF8899F10BBE87C3FC3E15018C23FFDD33F05AFDD6EB72744C6F90EEAE4FCD38E000175F8C85128093DAEA32E854DCB824F0A2A71DD2ECC2F14B663810DA36572A16B3B2254EA4667F4436D5342F131B8F0D7D6D6F084273C013FF5533F851FF9911FD99129BCFDF6DB0558EF78C73B441D9C10193B32AC938B5446A064F91C4F8BD8DBBE54A60984F4EB326485948A5E585828589ED6F62B522DD1D6E81EF7F7E1F7A4DFB7EB87AACE4E1CC7E8F7FBE8743AF8AEEFFA2E3CFFF9CFC7F77EEFF7EEC804BEF18D6F14C935213276643827173123A012EA08BC321FCA94D02BDD4FA6F103FB1AD0B93BBF302FB17C6575F7B2B6357FC7BAE55698012425969797B71DCBB77976482F8E4623011741F6AC673D4BC0F5CDDFFCCDE73D91F7DF7FBF008B009B1019E73D9C17FD05045087092855F1040DB6D6B9947C36F9B9D248A020A0E8D8B57033450C4B8A4FED2A5B7E99B17C3B01A8EA2C115CB48BBADDAEF89DA80EBEE0052FC0BE7DFBCE7B326FBBED3601D79D77DE39B1B3CE7B342FCE0B28A00EC3F518CD67EA1C579B9E5B6794A94B2F36D486FCA7338CDB4E49A8D3DD828065D95BAA84AC5D41605172B1D2D2F97C1EF7B8C709607DDF3F9FCB4CCEBD0847C002AA1A1A570DCDDB8C9D4D801AD7193F55A5E7871B50D5F94AD354C04542E3DA6BAF153283003B97CF631EF318B9D60450E7327A17F7391B25D438A2C8768B298BC49A61521BAA02339B50685A1397A3493196EF900DB5DD2962CC1FED2D82EB694F7B9A00EB861B6ED8F2652680DAF2504D0EDC3402C2F21D3E0CF2E6AE89D72BB5BC0DA692A9694996CF064F48C73CE9FCA757355FA829566819B19DB6A1B633835409092A062BF2F3810F7C40D8C2B37D26803ADB084DBE3FDD0810500F1D3E0CDFD3AA47FCA3E55A6C87FA8A2EC74AB2F373F385E39AAEEBA69525F976D7F4A294EE0206598CE55BDE75FE2CDF76A66F332378E38D378A847AD2939EB4E5CB4C00B5E5A19A1C780A09454091365735AF0A20DB71D20820D2E673F3F322C1CA1622A63BBAE648992EF2A6172A6B4AEC5ADE75DEB4F95666ADEAB37AE6339F29E4C4F77CCFF76CE5D4938E9900EA9C866D7212A51125D44364F9C691E6D2E4DB46974B9364D1E734C970CE48289333A5CDA96D6B4A9360A8DDE10B1459F1B0AA7C96886054C5E31FFF7821227EF4477FF4BC27F6FAEBAF97ACE1092971DE4379D15D406CA8870E4B2FE56A6D73DB8BB8B48B6C07FAF9F939D3A2BCDA70B5DA7C6A1C8A4E1B6AD7AE9D955055AA9CF6D90B5FF842011263F4CEF7C39024FAA1EEBDF75EA96531F94C4660BB23A012EA2193513E6EAFB8B1EFA6F93D35BD79A3F219A125F7DBD80567FC08CCD8DDBD0380AA3A735957E2C77EECC7C42EBAEAAAABB6FBBE271D7FD75D774954FA5BDEF216445124F17DBCC7E43319817319818D80B228297B6ED824F812330AA83232C2D49628E9BD71854C1EC40E86E72AA10822DA4554BD187644728176D1377DD3379DCB7B9E74CEEB5FFF7AC99DA2579BA9F49448DB6936BC230F31B9C8D7DD081050871E3A04DFF52B92C6C8A79313A2484ACC692D976A9D162BA6B440A6F08434C3E8D8DDB56BF7B64909DA44A4BB9FF18C678824FABEEFFBBE1D19F88F7CE4232090DEFFFEF74B662F53E72776D28E0CEDE422660454421D82EBF95A90E5A44EC79A0B5F96B4544019E05892DD1CC0C29765166F016479BA6D40114CB7DC720B9EF7BCE7EDC824B1A41325D15FFEE55F822406D336A8DA4DA4D18E0CEFE4229B4660ACF2B18C18893C962C27AC5C0D92E03F58D652288B02CEDCECAC78722D772E91E752C945E2D1E5F2744931158475F9B66B439DA9EAD17666EF6D6F7B9B5448BAE38E3B4A69342998B99D119C1C7B2E236001A575F98820070E336D4D866E353656F2A166E7660B418CF89F36B48A929399A6CB22976A4365D8BD7B7B2ADFF900EA739FFB9CA8746F7DEB5B459DA3349A94743E97653139E75C47406DA887A42E1F658CB604D50AB2A76A8DEBCCCDCE11492A892AB5912A752F8D3E4895AFC0EEDDDBA3CDB70B28DA6954E958AB8F7D79489F4F0886735D0E93F3CE77042C29E1B13BB5D846E33EBB6266548909CAA3B9B9398BA68D7CB91CB891C6E0627FB824D4073FF841A1BBFFE99FFE6942309CEF2A989CBF632320803A7448FD50A74AC1B04CBA21F2C68032476F3867D305E887DAB3832A1FA517553A120CFC4CCA84EDD83A985C688746A00AA853B0E4E3A443E3897266E794E5E327CF19BBB4F949CC650AA5CD77EFD9B32DDAFC542A1F0B593282E14B5FFAD2A490E50E4DFCE4320FCF081050070F1D8427B4B9FD54E324941257528F2ADFEC5C2111E504942125B4E19A2502359D838618FB43EDDEBD3D401D387040B2653FFDE94F8B4A3729B5FCF04CFCE4AA0FCF08A8843A084F240DFDB50E0AD3754368F2D22F655C4CB3A4CD0D4DAE94B9419C624ABE22D9C71FB334C79E3DDB63F928D5D80080C09AD4D07B78267D72D5876F0454421D82EF38C88532B7F52E1514E29732E6125972676666C6C0C85549845CB808FDD9564457DE82E91B7BB629A1E4BC2C9BB4AB79F8E67C72E5877104045007A9F2B1D2256512F1A17950B9C919944822892A2AE0CCCECC14D299CDFAA04C74842A85D681A53A22FD507BB669433D8CEFBAE54B3376907FBE5A1FC6164E3E17E608584049108169AAA6ED9E683A99E211520C568590232A9F8D4A1F47A76FC84CB4EC0625CD85062802E9A94F7DAAFCF96A808A607AE52B5F2901BB93CF8537021B2554191751E1C40D1B615ECD999961E8D146979388AE0D4E2B855496A5D8B367EFB658BEAFF6103228F755AF7A95E4587DB53E4C21B9E4924BBE5AB79FDCF73C4680803A70F0007C69B866E28D4EBADE985017092524A021CF55748D0F50FFAEB1A1B21C7BF66E8FE53B8F77D9915309A85FFBB55FC3CFFDDCCFEDC8F5CEE52213409DCBA87D6D9C2312EAC001B8BED2E6A525645AD6881955898170A6A767D81AB40C8AB0A5976D1A3CC16439F63CCDB067EF8527A12680FADA589C17E25388843A7010BEEF49071A52E64EE16A2A8769996B5AAD29B0A6676695AB28533794171400566841AA80AC7AB4F70223252612EA425CC65F3BCF5C02CAD3740D238FA0E1E2CAECF1183675276A84362F930889205B0CDD50E6E637289C5C3276F74E24D4B6677BA2F26D7BC8BE664E50401D904889A2C86D02869A534C7B6293003AA78C1AE7CC4C4F6B6D734B9797E987E39C0F8B4AB27C1722A07EEFF77E6F47AA279DEB2C4F0075AE23F7D53FCF028A7F0B80ACA667D2376C1491CDD870A68D6377DCD3FA34255A2463F7C20314A7846A1FFF7CB53E1386EFAB35F2E77FDFB184DAD4B4BAAC19C17B54583EAA7C72DB0D3EA8CA83544EBC1025D4F90FE9E40A17F3085401A5B019B77EDA80296A7D24F76666A64D5D3E1BC36728741B7564CB52504265192EB9E4C262F92EE6C53079F7F31F0101D4830FC2632BA452E88CB37645161935502228A667A6B58BAE204CBB5C0B0A73F218EA93925C7987C1B113409DFF144DAE70218D8002EA003CDF2B8BB268A85EAEA14736E6C8026B7A6AA69088D93229CABE2EABB9B06EB3117404569EE292BD975E50911217D2E44D9EF56B6F0408A8FD071E44C0BA2A9558BE32784FDAE9520019EA6E6A8A2C9FAA79A5316573E74D6B1B294AC1BA7C792E21342C9F3CF94C46E0621801028A49B26C093AD6ED3412D606C8B29BBBD63AA7CA373D25E249FE2123B4B1F08435BC6CB4F9045017C3329ABCA31D010B28CFD304C331A167ED284B55A85072A6E987DAF4D1F8BD6A91731B1C4B1B6A22A126CBEDE2190101D47E92129B68F38D6CB925CAE14C4D4F97DD6B360E93CD9B1F2390911213405D3C8B69F2A6DA1F6AFF830FC217096534384B406CAA0A2684DE14553E419BB603B53C9F6D0B6AC36BA9FAD176BAE4D289849A2CB48B67042CA0D8C150B3741D093F520A7D5C53427806DA526D91500CEDD3A358B399074A1D0A5BE74584548E3CA7CA7799FC3DF94C46E062180101D4FEFDF07C966266F89125F04844D89AE686AF2051313535A5B5586CEB6ADB898D5F96317FEAD1626DF3CB2EBD44D8BEC967320217C3089480623B1B438F4B628649DDB0B0D2822D2E9CA9765BA1240D032A8986B6E9AE9CA8259028991E71E96512D337F94C46E06218011667B9FFFEFB959430F45D19102B6E25D350C3B4CF1509750AC2E29465671929F188CB1E21214893CF64042E861120A01E78E0810D55BB6C5B1B2B686C6ABC08A6A9F694359FAA244619415BB2E7399016192E7BC4045017C3429ABCA38E800594CB9A124242D84C5C6B37598498CCC1D286A2C2577631B4C528F4209B8D98A5291E71D965130935596D17CD0808A0EEBFCFD494303D0C3762C86A824A51B445424932AF90E69A0EAF69F052FD889072F542EC1878F9045017CD629ABCA89150F73F202C9F8D2832A483E1C0551089978AD479BBDD92429792239F1B049A2686EC6028B1E6242C18402B36D4E51309B5C32B8D1B976DDEA559A12705AFECF01DCFED72F6D9D87C9CF5EA9324D9522BD6B22C1D2065B999C1CC9DFF6BF95DED08B1C1DFFDF7DD2FCFABA10EB64594712FC98144892B4CB9D36AB7355242C83C738A9D50D1FC6C436BED603801D4B92DC6D39DC5C5C6C96287467E86C3A114C5A436F0B5002C3AF3C33094C5BFB2B222CF75DD75D7E10FFEE00F70CD35D768A074A5325645FF91949F3C2FA49138892C5EE31DEF780758928080E4EFD91F5916AB59733C86D7E4DF5F8DBEC9BC27DF91CFC50DA3D7EB61FFFE07E0BABE3E53912337DD086DEA86D5E4241ABDDDA284B2D3AD51E565E73571EE8EBB6FB0D0E5E5974F24D44E42CAEEDE333333B2B038999400FC990B6EA723FBAB8BB47A6D2B2DECF3D0FFC267B18BFDF8F1E3D26CEFC52F7E319EFDAC6763B5B386C1688424CF1150C3C90B78ECD022A9400620523A2B07034BE9BB745D078B8B4B3872E488F4057BF7BBDF2D40E266C2C5CB7BF24F55624B0964B98CFA3EC7B51D540A5800EED49C5401CD6762B561D2E65246AC943B0630122B6BA3255452A984D29F37763034A2ACFA4BB1A12680DAA9B9D31136128A9D490683814803DAB0A297BBAED9D977F296952E47726F8DA2AEBA42AABB346B7110E03FF8833F8857BCE215D24185AD5A9BF506B224D1C5EF3AC898802A5D331D30158FE02AD82402018ACC41E1336FC8451C0FD06C3644EDFBC4273E8157BFFAD5B8EBAEBB303737578283F7B740AAAA8B16586558DC4E0E8B89CFE306C2B1900A47AE271A8302CA37771B03A50C2257AFAE02BCDD6E6FF4436D0696F937FFCAD314974D00B5A3D3A880F251AF3791930C32F694767BD08FECCE3BB18AC6F35EEEEEBC3FAFCF05A300A6AA494017387AF4A8A877BFF99BBF896FF8866FC0DADA5AD9492519250899C59AA7929C9AC145E67A628B8B2D51003EEBD5887546FE0000200049444154F1D1798091525A2092616C3916161644F57BDBDBDE863FFBB33FC3EAEAAA48412BA1B4E61DEFA1CF68ED2E01FF4E8CC7E69934E3234DDA8B5C24749AC69B00654FAA00C3EC51C292B75B04944996A700630F9C317F6EA2006980E5C89202975F31A1CD7712510228D747A3D9161BD561B92A23B9AC9AB353B6C4E6BD92EC2D17691227A292D16E20348E1E3D22ED595FF8C217E2E69B6F166942A9C4E790E393047E1848281A055C91A5F0E0C34F3DF86E80300A10E7297A598AD84DE1FA05DCA40092142EA58F1F0840F8EE34FA67676771EFBDF7E2965B6EC17BDFFB5E9182B423799F24C91004919C279BBAB1C5AAB4CD69EA749DD334598D81EF1AC70992B48FFBEF7F40361C35F3B843E81C59C58EBF23AD277B85B07C6516A1B5A04C7B0EDBB283417DB92B8EDD2B26B4F9394DD4E94EB212AAD16896C6B835CAC7A5DD76E6969C6602822164BE1FC80E3C1C0E40FB2D4D33914083411F4F7FFAB7E1977EE99770F5D5578B04A11D514A07A4C41C022742175DA01E6026F1E1AFA4F096E77024EDE0E3777D092710E1E9575E8E7D7E03EB4907B1DB43800632378047C3DE100F0414AF4F005342BEFFFDEFC76B5FFB5A01D8AE5DBB50ABD531180C45ED0C021203C69D53212DF45AE73F4656CDE69C104054C1B32CC1FD0F58964FC3F9847430F693565ED1D63664C59D56B329391B5201536A9C33445DB441AD9259261B1632E8575C71C584363FFFB92BAF50059465C2AA8CD70EDEAA541FB970ADA4A12420E1D0E97424D7EDC52FFE79DC78E3B3D1EFF74B6A5CED3AA5F63D96E4662C67E0234C0A78690ED78B306884F8D4FA117CEC812FE18B711FEB61886FE807F8F6E54BF0C44B2FC57C9263351F61E8E6F073577C9B7C0E4A2152E9042EEF333F3F2FCFF38637BC017FF5577F85999959349B2DB31128314100D9B1B264CA4E4871553115B00AA821B22C56DA5C120C6DBCAB6E758A0FD32BCA545C5640557C1F9A1B6F4E35B524E4DF126D9EE28ACB2780DAC9457E3A40EDC402399354E4A2241170E79D778A7478D6B39E859FFFF99FC7C2C23C56574F88BAC3DF5332546D39A1307C52CB393C87EA5D1307463D7CF4D003F8E49103E8851E7C2744DB6FE248BC0AC78DF1244CE1DBF75E8DC7ED5D86D3EBE1706F0DB5A826EA1E0145559352CA326C5431F9DD673FFB59BCE635B7E0A31FFD18F6ED7BA4808852D5D2F0F6B9766AAC4E07A8FBEEBB4F25B4E5EE343A5671622A2E1BA8C169B65AA2DF9D5A646E6434187A3491503B0927CBF2F9A0CAC7052385E78D3AB4D53B9DCA5F55DDB9377F6FA5D38913278474F88DDFF80D3CE6B18F9505435F53BD51431AC75A0E9FBBB610242E5CCF455CE408696F799E48A17F3FFA103E70F7177028F2E00653981A3A68041156F3186114224E47406F04AF15E1C9A18F9B97AF803B55C730CB301CC508FD40DEDB0F3CD18CD46E544951AFD7E17B01DEFCE6BF153590609A9F5F109595448590D615FF95A85EA7708A6F1570670294D850658D4A05CC86845DF3A5D322A04AF3AA52F968437F6B3D822F3401D45697F9D68EB34C56BDDE281D99DB019435A2AD4A66D539EAFFD63949954AA960AAEDA951AF023CFFF93F899FFCC99F94E38E1E3E8236EDB8644473190378C80A0FAE13C0C96334C318712F46CD6FC19B8D70F7EA51BCF7DEFDF8F75E1FB5B00EDF70C51225600B3F8A5AC458505DE889E320F21CDC74D975781AEA088218FBDD554441034E3F409417A815195216E6F77C24EE08499660F7AE3DB8FBEEBB8562FFF8C73F26E33437B780D1281642876024BD6D9951BB9958EADDAA87679B110B28CB28523A93E5A384B2B47995D8A9FAA0ECEF0550B6DBBB584C8535B34C1295413C8DAE89843ADB946CFFFB31A09AA596B05540F15CAB265987A7750A134454A3AAFE1CAA5704DA939FFC64FCFAAFFF9AA851B49568B3B4A7A7D0EDF71184E39D98E401B3545324F2620BFE2C563A237C60E52BF8E8EA01ACE73E1A611B7E7A7A1ADB3E239F934C623E1CA1480678FC6597E0197BAEC0158C94180CD0C913148D50D8C034F34002DE0769EB048EEB95214BEF7AD7BB445A91795B5A5A1689C6F72253483B90AAA2DD38AA4EE0AD48A92AA008208E5F1550B9896DD58E9FA766419C46AB59B8DAC3B09449AA03AA934EC4A82126D26C424A6C1F32673EE37C0065551C2E162E2AEED054936C2F616BF0532A91F6667FE497BEF4A5B8E1861B84DD3B72E4B050E262E41739BC40A9F0280851244324F1104EE061C96BC1CB237C68B4820F1DF80AEEEEAF23A9B7303F02D8D72F73B42EDDE64F7581F23B2EF0200871BC18A09776716D1AE1197BAEC6636666D0AEE7E0FA2AD85B3CA821E1E2CD4768841192349377A224A5EF8A5DD95FFFFA37E0EFFFFEED0220122BD6D6B380DA1C05B295793B1DA0EEBDEF3E040C8F121DCFD0E3F2A3954BBAF1F02380521B4ABF6497364B4D0A8BC1FA12269E2FCD525C79C59513966F2BB3B3C5632CA06843558DFF33EDA876D7B7C78B8A21BE53F511F15C52CC741833CC87BBEDF77FFFF7E3975FF1CB4234F4BA3D1309A040A4EF2B743DD140281B92FE482495DFAA2329323C38E8E2FF7BE8417CECE07D4866DA08FD69B44F0051E8A0EB0FE0E31425B6CCC3559F557C4F648FC300711AC3190D91141EAE9B69E199972CE2FAF6A5687652ACC47D24AD3AE0A718F57B127BC1E726A8089C999969341A2D7CFCE3FF823FFAA33FC2A73EF5292C2D2EC20F0251FD6CECA1B5A7ACC4B7CFB2D9EEAA8EA3B561AB12EAFEFBEE15D552A8712717465C8B1919CC983A1322841A8D86115ECA53A8B145A64F0B4AE8CEA3A7D218BC6202A82D42656B8759962F8A6AA57A7626956FE3A2D048822C539A97F39D2629A25A0D491C4B7191FFE3294FC1CFBDE845F8CEEF783A3AAB1D74BA3D38D28D2F35C6BF07BF70D077C8B6D5E0F663A1C683B089434181CFEF7F00FFFAD0FDF822522C3567D1E89210C891852E620935A224392DAB75D220C89A940D80AAA40BD43CF17FEDCE023C6579198F5DDC856BE7E6B1DA3B8C6192A2E135308833F89E83A0C6087517C37E2CB17553D3D3C892147FF796BFC3EFBFE60F508F22B49B6D0CC91C86A16CFC127D62C80B4B8957E305376F5C166C3C86365A9E27B8F75EDA501A9FB881A6B79A9DED154591D46C36AD95B4013CA2231AE795851555872BAF9C48A8AD41656B476D07505625B16C20279DF436A5117D841159B53841B7DB11F5EF177FF117F1DCE73E5776EC13EB6B4851A0E6F95A6B2467948283241EC0F155151B7487C2CCF98D1ABEB8DAC147EEFB4F7CA1DB41529B42CD8D508B33785E86C4D56E96C2008AF3726B5E55351DCC02872B51DB419C034180F53047DA5BC3522BC47FDD7B35BEB3B18461D1476668E9A13CB40337056A913AA563466C381E76EDDA8BFF7CE05EFCD2CB5F8E2F7DF14E91647409D8F8444B5658E2C6AACA9B8155050CCFA1B46368159DCC04946C1F65122E69730D26D7DF99A008026A2CF2CE3C3613406D0D24DB396A3B80B20B41A31D3474270CE9CB89E567AA4324199EFAD4A7E015AF78A5443AF418DC4A86CDD36976E204A11B4ADC5D910E10652952A7402B68A170EBD8EF25B8FD8183F897FD07B0520F506BB9888631BCD4C3C8CF9038199C82CC9F3A79951419172B39DBBBF33973F01AD29156D4C5DC033A7981C8CD510C133406191EBB7B0F9EB9F70AEC0D7D74B00E2F8DE1BA215CB78538D5F796205EB1F372C0F7B1343B8337BDE9CDF89BBFF92B91CE54A3E9141E0CE8E3D22891AA5DC9F54C9BABAA129E4AE5BBF7DE7BE0F9C1062B717318977D6F9150E52058F681898522CE4BA8093A27803ADB72D9FEF76703945541EC952D6B27E090C59C49784CBF3F10839DE91574D2727765F401B21C7E1461E06670E20C4DF12501A95B43580CE0A743E44B33C856733C786C0DB71EBA0BF78D0618B466C45E084603F84E0D8E5B1310B945A68D264C16378348B7C2A0C9F34B9724DA51804740E50E1237452492CA43BFE1A1EB0CE1C519D224C192EFE329CB8FC0B72F5F8A4BB20C27D656D069D724AA5D523D68E3C7B924F7D5C208C56084BDBB77E1BE071FC05FFCC55FE09DEF7CA7345A6FB7A725AADE4A24329D246F345E8F405542C16A00F66F4B9BDF73CFBDA205D877305D024C0084BE9842C781D36C305262CCE4D9A601C2FA996040AD27CB866B09AEBCF2AA0929B17DDC9CF68CCD80AADA4F7662ED645B105195B1B9535C309DCE3A6EB8E187F0F297BF4C7A2093882098C87E31D8B93F1C82D9135CC06DA786B448903B23245108379C42B793E2830F7E059F583F84AE1BA31ED651141ED2C2419D0918698151C1C0DD0CB9E3C215D78AF1376D51DDDBB037CB8B98A20B0C34CD1464431F883D475457FE6E341C201CA5784C6B06DFB27B2F9EB867378AEE10703AC84719FA8E87B8E1C01B9070A3CFCC479AC4989A6E616A6A1A1FFEF08725E0F68B5FFCA2843051AD4D930CB57A2492DCC6275627C76E605552C2AA7C3415E957AB24469953E96BD3B2114EB35997180A8D491A871D511CCB4E64727E5DA790C8DFABAE9AD8503B8827930FC5CC55252536335255305940514DE12ECB4571D55557E1577EE557F0F4A77F2B8E1F3F866EB7276A8C951A8C99E344FA9E2746F6281BCA829A2E9A180575BCED2B5FC01F7FEEE3585F98C6D376EFC3625CA01B7735D1D40FA5F4B05A0A5C21A6FCC8764174BA0113B3A81052C4C90A649E033770908E62B8998B46D0445E0BF0C9635FC1A19543B8F9D26BF1738F7B1A16933E9CE10899EF23F532385E803849911640548B301AF491982004121E6F7CE31B45153C78F0101EFDE847E3A1871E12D690E0B1898D9B41B51150F7C073033DC41DD75856E3C9A8D26693711A8D7A211CBA93C3B53DA25CE397A2DD29F52534BD23276D3E91503B89A7B302AA4AF11224FC43072681F7333FF333F8E99FFE69F9796D6D55D41A1EAFA9061A15C1E3EB2117D91079E82268D51022C2C113095E79FB87706BF72022B785C5A286304971D59E655C3E370367D4C1A037841B3565A1BAE26B3A9DE5706E432212D886F0504A4938BC4A806663162B8301EEDA7F0077A38F4ECDC1D2B1753CB63685177EDB53F18DBB2FC1147C14C78E232D52B8F502B913208E5304BEFAE3185A453F1B098A2F7FF96E890BBCEDB6DB448A2BA1C308F6B10D65DFC28EA175ECDE7BCF7D70F95C8684507242DD4B363357B589024EBDDE900E863692D616EF53C16472A34C942D550DEE88934297E7B6804E75D6E954BE6A43649BF0361C8EC421CB488757BDEAB7445BA0C3D64E741C8FD0A837D0ED754D8D0A07499EAAFF910EDBE906BA9D1EFEECEECFE2F7EFBA0353C1221A49883CAA8B73D6CF4628D22196DA353C7EEF029A6E88B55E868206396B43C8C6AA11DF9A9050ADEE7D9A313176B935D44D5EAB5E83E0F73C61263D46AF333A21A7A40AF0D0F1E3F8E2B14318782E663085A0A8E1B0BF8ECE7481FAFDFBF1BCCBAEC5739FFC747C835F83578CB016AF22CF1DD46A4D64692C2C24C302E99B2268EB0D2D0C73EBADB74AA4059BA8312E9069F9362ED052E27CB6AA84BAE79E7BCA4DEA743192B69AACF8A1CA11DA9C0B2F11B5E321E08E3701D4CE81C92E2A82677A7A5608064BED52DA24C948982AAA258C0EE0D85322DD78E38DA2F29178A062EE6434B8234028ED04451CC1731264CE10E1C847AD1D619807F8E091C3B8E58B77E08E2327B0D8A62D954AD75751B7986B4B9F969323C98698F17D5C3DBF803D8D2930DAD3C932F40BA0E73908F927C981AC90B8BF71178A4D63232404FB37B3C83EE06640EA0009835F1DB2842E7C0604C729BC20443ED3C083EB1DDC73EC080EF78688221F412E6FA83E33B8922ED26BD7717C7D158F1B1578C193BE05DF7DD9322E7333AC27213A7181D0AFA3E78F107A19A2511FB9EB20287C0CD202BBF6ECC6F1A387F1FBBFFFFB78D7BB6E9507A6AD691940DA59DCC028F52D6D6E01A5F3756626DCA9D3B16B24B99A55A5E0D31F6CCC9253884177D5D51309B5939022801818CBA806EE7E5445E8532201D46A3571F8F06101CF8FFFF88F4B202B7396A8F2D17EA25A1333F2DA256BE788DDD072324429971EFD3B0EBC700EAB073BF8E37B3F83D71EBD1B4E1262B9368D224FC4C14ADB884E562E8182110F349D98F437E8C04B46D83D33872B1616315F0B900D47023E3A7487818390C7162E24C6ED947615251AB3BD55FFE1FFA58405370E63A00F9D44B29587A9832F1F3C8CC36B2730E409614DFC634E46164E23316C809C3B2C10053E8E867DAC272BF89EC62EBCE2FAEFC453F7EC42D2DD8FFB82049704D3C8D7531C9D0A9127299AAEC7C00BA4E9085E1460667A061FFDE847F1BAD7BD0EB7DF7EBB30A41A4C4C87B753A6888C46039412AA5A76455FC7B8E0CAF6F08C94A84BC8DF38A557FF65C32A44B29B576168CA4442ED249C54EDA1CA41F5C3324FD4EBA9BE1D3B7614D75E7B2D7EFBB77F1BD75F7FBDA97190966092B0A11C08235F4B5B251401298A06D5A00C7EA3857FB8E36EFCEE3D9FC63DDD0E2E49E6E0441EF2C841960C2575823E2CC7D6AFC835128141ACF44D099B1C27A8B9C0DE85362E9B99C78C1322CD637409C8BC40E8F8927671FAF41F8D7D63E40DFF380C901DC508FC08792D441CFA38B4B68E071E5A456FA8C1BCB5460B69CE8CF9017C7F5C568C6B92C989791860BD48409AA091E4584FFB288A003F7AC5E578FEE3AFC1E39A8B583FF020BAED1ADAC3508AC30C1DA6E313CB099A8D86B0A08F78C423244AE3AFFFFAAF259991E33937372F9127ACAD412915C743DCF3957BE007BE49B6A59B40372075529B9F6DB261ADA63694E886B25999DA7CA5B83200132337C3D51309B5A388520338903F0412550FDA45EC98F7B297BD1437DE7493FC9E60B301B0B461EDB1C26EA54378A187D9D4476D14A1B3348BCF76F6E30FFFF5C3B875AD83D9621AF5681A2B5101AFDF418B99B6918714996C953EB3B5A57D9196CA1A8A2871A45A2AD5B5A448304ABBB8A43E8BCBE767B1ECF9982E7CF4F30C23EA71C60763151A6D8D64ED2C168084A892851F4B1C9C5FF868D45A383CEAE3FEC387F1D04A0F497D0A919FCB221D243922C783EBE5C872122B3656B040C228F4C2956C612788D01FA5A8D75C745DA033ECE0FA4684E73FFE89F8B1BD8F40D4EFE04831825F8BD06370AD5393C80E26CA8A53D83876979696F0F9CFDF815B5EF31A7CE0831FC4E2E2B27198A7489221BE72CF57E0B1888D51F9F485557B73F85ED2370ABAB19094187781D78432F9D652E81C0DC98377906609AEBEEAEA0929B18390127688558FA286A84E470E1FC653BFF5A9F8ADDFFD6D5CB2BC0BD96884FE60A4EC179DA904209D9834BA47311A4E88F53917ADE31DE44B7B315C4BF1FFDEF5EFF87FEEFC2C0E3B1E16FC161A51842186020ACF67B4812F213C2E37506A6095C821C2AC0821C48033A2CA95A070422067E19501BC7C884BA7E670C5F43466A6EA480743014C4C89E61462F3A45C2B2ED541476C9E242030130459803C0AD02F121C5CEF63FF8955744729822894A80B8918674D7E297BAC3A12E3296C50B7140BCF1DB1B77AA3219825D16A46186631D298F70FD1F374D378F6EE4BF1926F790A964217D9600D491221F42344CE087D8A3FCF8597C772FDA1242ECE8BBDF3EE5BDF8BDFF9BF7F17ABAB6B989D9D0155BEAF7CE52B1A2B593AA08C9A4B56CF342654AE218753ABD73427CC20CEF2EAD47D95B9309EF08262309FD8503B08264B4AD046E8F5FA26BDE225B8E1593F84D5CE3A9C3C4332A2133790EDAF6051C9C0937A7834F6F31A0338735C96373098A9E12307EFC5AFDFF1097CEED03A1AF37B85C16BE4293AC90AC2D087C7C8877E8AD009117B40E28BA505576A7D19E53E4F91F2B75E80C0F50510EA8B62F43AD5D318A364849976139734A7B034DD46C410A85121922D0FA440895C8E11419453438F614504A787235982FDC78FE3E85A17591089BAE99952668C96E762CC2470573FBC33DD39A614147206AD3A9A6A521018F100C41F9DBA22C972076B418EDEE804AE19FA78D113BE1DCFD97739E6B31E0E1719FAA32EE69AD3E832A2DE6F0119D5CF42E202A9024FCDCCA23F18889ACD2AB7CC2BBBF79E7BD52561A2535422AB0F4D7DB7FC5B4B333BF55A5D8BB8D8B0A30A09310EFA53D6823614E3C326B4F9CEA1CA26C8FDD00FFD207EF9977F190B0B8BE2786C346AE88FFAF06B7524A31CA14355C945820411255527467D6A0641CDC77DEB3DBCEACB5FC4C73E750F8ECE31D4C643DCCDD1A464E1020DB83366F0F24CA4079534C6D051D513465D7C4CE3B6967C3B06A58AEB85FFA03F524A0316707C0FC33C45EE66084719969B0D5C3E338B2B9AF318C523ACD2EEA905702899B214D3614398BDD56284BB3B6B38D4ED03830C198BB49051CB3330CC909B8A309C127350F605D42CBD32509B214BBA16C5C6CB785E51E663E9572E42AF86B8D787DBACE3F0B087A7EC6AE1A5573F1ADFB77C2DF25E07C79355D46A1192CC0713FDD362887A54130C0C87319A5353989E9EC2FBDFFF01FCC44FFCB8AAE0A6D065190A56D693304D0A6DA672BD5E3309CB1B17C9A95C78D4392780DA3930F14AB48D6EBAE9260991611D6DFEDB293231E049F7AE73078D220419D38318B59621CA3CB49AF338EA7878FB9DFF865BF67F1EEB875378D3754C3B1E3A4981264224C301DCC813F52DA36AC96AA8E23765862D17B0AAF2D55871F99D34662689E0881A2AC71835262B8080602060221FBD51078D1CB8726911FBE61650CB81118351B9A3471E7A858395411F470F1DC67AEC60D0A84B4A3DA1CC77A154497951C39891A091D8BA71846919545A1201B4F3E954CD33B1F1C84EAA80E5B90E52537F9C36FF54AD8D63AB07D0AE87B879DF63F1C22B1E85AB66E771F4C4FD486BA18457859E8F51AF8F7A10220C23747B3D78AE8B5DBBF6482630E78536D4E963EAC7C9F0CEA90065C1A47F5B26433DEF8FBC5AABCF4C3E3B3302A4C059038F4525A5A3459EC2774390E64AC3026994A39502F9EA3ABC761B49EEA1DE9CC27F1C3B8EDFF9F4BFE19F4E1C4114D4500B69B8D3AE4AC4E7C2B2575C04243234FBDAA87455EAF794AF6009854D39B8A6CEBDF496A50B4A8802474272D20058ED1CC19E7A1DFB2ED983E55A0BADD8C78174802F1D3F8C636B1DE485A7CF98A570C35A192DBFDDA234F274560494617563F48944B351F0598E01622C390DDC9F0C310C627C933F879F7AF475F881EB2E45315A47BA4A82A281B4C1FA803D4469269116A30CD8BB67AF4459743B5D713C6B945145D468F1A3CAF80A29C1980DFDA5E8842628563DE163868FE3C814E58984DA1920D9AB10443FFBB33F2BEA1E2B0EB9BE27C1A7A3DE104EDB07D218D3EB29EA5113A39905AC65C05F7DFE7FE196BBFE052B8D3A16BC45346232574C514899A380C2F5D11F0DE004BEA4A807CC5DDAA9F83BE30FF284C97091C50952FA8B1A3E9C78042F4DB1777A018D2CC0E1EE3ABAF493B1FB066D2871D0D03ED23023CB56EEE488AA1B8275C959FBCF4523F1B0BFEE622E0DB1D4CFF1B9FA7134E32E7E78CF3EBCE009DF8C6F9C99C7E8C80AFAEE0869C3833BA41EE9C00943CCCDCE9680226DAECFAD7E35214A045F269ECF4AFBC89012C6EFA60E3A76509097D71C0ED3250A799CE2EA7D131B6A2717002514EB3C302E8F1A40A7DB157DDECD1C0CDD5880B2EC4DE14811E25DFB0FE2EF3FF63F717F081C9E0FD1CA81564CF713550EEEB4F4B4FAC83C5FFC2764C3683E3969BA6380D224760D49E39FC00B9064B9D8228DA001C4190E3E701079EA6269790ECDA9085990A313779117196A415DD43466D26A3C9C8D8BDB5A92E299C6DE5E4FD7B991B4641EA9066623E4A983F92C84DB9EC51DC70F61D7D10E5EF2C427E1C5DFF1541C397237FC5DF3708E0D2515A49F8EB07B79591CBE52FC45BA6F9013349B935C5FA3EE4B0E8232A81691A351CF7A59C8455E92F24CBDE816856C5AFDC8474E54BE9D06D42FFCC22FE0452F7A914C1C7756BFA04DE022F553A1BB67EA0BF8A7070EE3396FF96F18D5E9539AC7E5F5368A568615B783C223C9104AEC5A421F0ED332B2021E5533A6F33117EA0C16C0191769D59831A9EB6257B954FB948D6B784D847980F543EBE89F584746E76F54479E7631DD8C509FADC36D3B027C465A9048289550362810C09781DB273FCE99A4ABADC3573946640297BE695A106609E20888A30061E2217E60847CD4C2F1F8201E39EDE243CF7F3E1AF161F4EB21DA2B21529FDD4280E5A57991509C17DFF34DCA892D6EA951E7928622766721D5709D28AA09994E6AB212F668FC56A65F94E1DAE93D9E006A27E104992C028A555B299D58DF6EE4E66826394EB06EF8C841237271EBE10E6E7CD3AD886AAC5294C0AFE5989D69A211052868C3304427607A3B0D75CBCAB1BCB6D52FB62F01B8FB4A5B1AA69E7B115DC0488A1879C8E0D318CD3C440D750C7A239C5859C770C0D8C01A3C2F1456910B9B6B865D38A6A79BA8CDFB48E8DC4D33095ED5463AA4C599B54B06539326D5DD4CFF5C019FE6FAE9BA8F50BDB3B1A65CD56409736833027216542B1914ECFA6893D1EB0EB1D64DD065DA7F1121CE0A5C33E7E0D3CFBE19C79A6B98EBB8E8D6009F499B8E83E5C55D46E5EB688F5DE31B3385632BC1C106547C9B5AADA6B962622F19C88D83D24DFF4335C6C89A4C00F53002AAD311BE2A16401558A9FB68C70E9AA18B773FB4869BDE7C2B82DA0C3C97793C03385E8E563DC4EC7C1B458DD248FD53A324D585CA9D3673243BF61C05942C4A86D215452AAA1DAB22F98E2FC52DF3A183DEDA0027565690258EC4E431DE538BEEEB9AC9F83FB296C908CD4684A9D936DA33D3888B01567B2BF002551B8BCC8353B0C95C80CC2BC0661D1E231A4E1B27684C18A6DFF347D9389869CE70A111023740DDAB692DF624457F2DC1DA7A1F715CC067DB1DA7815196E0BA25179F7CF67370BCBE8299AE8F7E441053AA8F0125124A543E5BB2C80CA72129E4F726B05C0155FD54F9F24DDC799CA6B866A2F2ED28A2AC8462EA3A2514B933461D34D31C2B351FED11D0085DDCF6D03A6EFCDB5BE1856D448C832B62242963DFA8B0E798996DA0351D21F75D0CD2589CA34EC0DD9F0ED592E6DBDEB38B04A011CE9A1589D432AFFB4DF85988F563039C38BEC6807309A665992D3AFEF947C26C1989E0B9703C474A86911D7459103377D19C69A0315B87572F903A2C1D93A318E5146A52D492EA96684B927A72FA6797D417531C854B95AE01FAD402C745336802A31CBDD52EBABD21BA436E3235F86E0487753150C320E997805A69AE61BAE361C0F02C01948BA585A5B1CA67FD501B58D2939D4B4E8D2A9FE521C71E5E13D0580D9B65B0628A7D13406D6F519EE5E853036A2CA1A662078DD0C37B0EAFE3C637BF0B7E34656A27B23793234553923845C4CA0A418199F96934A6EA52F8A437EA8AA4A0856CE778E3121887448F459856F151654C0B3C03720000200049444154B67EE4058B99B05C5803C920C7606D20214E8402EB9DDB1639921FE8D2D6A00DAE5D00790D4698275E0E2F256B090CF33EEAAD1033F36DF8350D5E2560338980D7C299DC03A413A2B2F4FA34EA882AEB37A8CB8CCFEBC0173E9F00F3A41E7ADCCDB07E621D716F8494E923612811221C983863944403C36C807DB3193E75D3F3B0D258C374D7C320A464A4E3F96440295167483BABCF9967B205269CB01649093E8D3CD287B206A26E0E34EEB42C739226D8F7C87D133FD40E426A23A03AF07257C2829A4982957A84A96181460D78F743EBB8E96F6F455867EA76061244B6161F721F1999B39C5C5B8299761D53ED3A6A5335AC67EBC8C4A8F2240E4E15310D58859B18E59FCBD61624D71412B27022E5FC420887FAB089D5B53E4EACF7900C6284F59AA4ED8F688F48E80F43D5B856120991628522AA9B5C3B04965961722CC3A746C391A893D3AD69B4E62224B53E02AA7BA956452298F85E2467A45E839309F942A48965EFA5F03375EA8EC01AE7195ACE34DC9187D5F575AC9E1820CFE98F8B24C856630395592CC07E570DA9FBF7E8C5009FBAF18771343A81B9BE8F4E48954F01B56C25D4FABA867F1932450A4668AC9ED9874C933C2A855118092951CA221968A5CC8D71A593C05D23CEB0EF9A09A076104F2529A12A5F474880D8A5CA0751F9A6E21CF5D0C16D8754E50BEB6DB1A12C452C4E76E9B7C4969EECED95211E8ED024BB365547BB5543E130602941EAC49A4D20B1794C7E5079A54578CCCF6E26A5B9D850ADEEB3726C817890A1776420DD32689C33D29D80B65D3308184638287054DD7324AD436BE96DF8486683AD6357405A8B862EDA73116666A6A4D3476FB88684298FD22551438F1855C1B111BBCC49913999E45A79458480C17C5981A4E362D81BA2D7674D0C46F0D74505D5B2CC04A5761A64B11955F96205D44D37E358ED38667B01BA61069FE91B1540AD77D6D5CE138A5C0374A5F8B404C76AD486565C062561C8305DADE669AB0698803F11FC15D77492E6B8C6F4E9D9C94575315FEB2495AFC811BB0E9AB18F954681A9381340BDFB501737FEED6DD28FC975E9731A774797043C2912C285C20F834C33A4C31833D30D34DB35D4DA2106791F4931D4BEB5DCEEEDAE2DB415AFC77CA84C53C6BD26B22EBB1A76D0EBB24794271284159334EE8F3431179272C3E30443DB624683ABCD6E6C24A3E9C621EA2081C760564DAB778A54524AA6A6DAA8CF44C8DC14BD64244E6AAE4D864D514051B51BE6B41173D4BC86D4C7C84629FA9D213A6BB42B53448CC667B9337119494AB186D69BF8754D02A96310C778F4928F4F3FE779381A194005197CA6E15700C59C296E22654F28AD972BA926D242D78E070115459128CD638E6F6323A9713A8752A0FBF64D24D44E6E000414A513A9F30E435C9021765D34E3C0008A65BD5CBCFB500F37BEE93684B5165C8F8DA56D96AC768CA725CF9D976B864281067AC30D301C7411344334DB4DD4DB7538618124635E120F4D242F9DC4038B57720DB0086690FBE8ADF7B176620DD9886590A9EEF8C2206AE6AD662094C1D39217341E95719AB84DAA1BF35EF61CD17AD8078BFE9D34475000FD4CF3BA1A533534671BD2A626A53D93327C8A7CB8AA962C164436B0968588FB39D6D67BE8AFF5E1FA218230149B924555F8AC1C078942A74453554B9CE0AE4B4025B86E9180BA194708A87E808E9F21104039585E581652625D543E5E434BEB59B4D89A2B1A2461C643553ED5ACF563F56C5B837A3C52F4E44F00B59370523F144B26972C1F552C01948795466A543E0FEF3ED8C58D6FFE47048D69D9CD4F8E3050556E1CB7670B37B2565D82843D9EA6EA68B69AA8B310BF9B629851354A6411724776933A524AA5D5550CBA6C8616C1635CA1AC09D609573AFE54147C1985BD415A9D7AACAAC7D24795C4F45945524C32CB069200C834F5B9B910F5868794F5F78A04944B85CF629D5388D6231C3D760CFDE1004EE24B24434E0052D219E2624CAC58ED8B4B9D722E01F250F2A01EB32BC4BF3DFBB938565BC1F4BA8361C31DB37CF38B25A04ED51FAA1AD6677F560975D26723B8ECD79C987DD75C3321257610539B01C5DCA4C423A0A8F265984A52D4031FEF3ED0C18D7FF72E04B5365C8950D88AA3968E4E176110212D628CE2583281A7DA2D3466232064B9FE0239ED8F3845D60356567B12FDCD022AF5B0A9E5C828D1C44F79324D7C3E4361A5ACEBB0B4B42BFD6CA5108BEF61900E119068684468B61A68B49BC2028EB214BD6E82C10AD53B967B2924395348B3CC8658693CDF465554858696CC63FA3E1313333C6639C4EDCF7E0E8ED55730B5EE625823CBA72ADF521550265262F3FB6E2EDA22801AAB0FE362135666198E42E68FFAE9351395EF7CD6D049E79E195029A61392122E6E3DD8C5B3DFFC2E44B5295D105B0094AA26A4A4B5D50D4D693AE759B4845ADCE2D2AC2C56A65B1C3BB4A219B38C08109F8B49DDA07A27FD006CF99E9D05151B60B3404D4EC68E511E74D032852370E0339E911DE8231F7B969704689DA327D0E9F631741C51C3248CC9F3A491B6CB5267ACFB6E1A6CDBC1DE68DF6D04D4F5BB427CF2D93F8C63B51398EEB8E84B171D75EC2ECDAB1F8A2A5F197A6413DA4B7DCE8C87F9CB09A3A0906C43138B6487CB26940951A16D716407B866C2F2FD6F00942712EA4423C54C92A11E79B8F50055BEFF81A83E8D02CC271A4BA853EB13AAC5D3D149435E766C3169189303A9D910D26EA2EF87B6511E20F11DF492AED0F18CB2908E83DCD533824AFBECEA7D2D0D7EF6A1B0C57E4E294FB97F4B163025A99602A20A48BF153B17323371CA6F2300D9BBAE14A069D51BC8EA2E56BC18A334314997B934860B49784A37459655A35D37266EAC3573B2CA17E1F61B7F18C76B27D0362A9F444A380E163748282571B442540555640E4DB908918851188AFB8DF5006C354C4DF23211BB26014D3CD1A2F25D2BE4C4E4B3332370920D6522251845BE5A079A31301546B8F5C1153CE7ADEF02A2FA86E052895D338F42DF9186E1104812EE2C910601593DF64A4A33D9E56B610D41EC223EDE4711B333600D7EA381AC51200E32F4066C23938BAAC848081AE20CBCA1C3551BF08D8BCD9D6914241E4F8ED51875D202EA0B32D7A494715C24296B02FA08DD0C71DC47EA6468D59A68A10D0C72A4A304FDF51EBCCC413BACC39BF63098CAA40F14BD0689A7AA1E43A224E282528B9B88C994F00D63A26A20C1469631C0304E71DD5280DB6FFA611C8B56303F54524259BEB184627D09FACEA4DA919039A609A17145491336E37C768230105A4F01A5E566B5C884C99317346A9A2F93DFAEDD778DE4454D3E3B3302279312907257634015988A42DCBA7F1537BDF55D70682F08056CC8A34ABEB5462698740829E842F28F3D68638459282D6B4227C2A83B44D21B49E029D53F2103B8CBD61DD4A6D840C0453F4DB01EF7259489C9750C18158ADC24EF9DAC4E9DCA123F1950260CC3F0605A2783FE26D6C32B9214EDA081C86FA83F6E3DC1A81F4BC1C9665447CD0F3158EFC1F101772644441F9B976350F4D02F86C8A581754D6A4D08F1C1C876D2EDF453196ADB2529E1922535805A0E70FB8DEA879AEB87E85668736B43ADAEAD49555B194F6A8C961537318B25C9C2B90883A0900889B2DA910E8C86A6DB6652FC9A3525123CEADA6B256F67F2D99911D87140196A9712495AB93262DB0BD0F65B70060E46AB23A403F525895DC09D3CC9A57119034B1387B52A9AF0A7EA1821412F1B4A8301EEC2BE51A1AA2CD6195B979E42424993363B7452778BEB3E9380D576D844943750747374D7FAC8E2185EE84B0116E94125A91FCCFAA50B6704444034E523687A18B9313A4CD330522F60E1D09C640BD3F1956E17C942FFDB360145D693D9CF4A9B5B6349F9860D0E270A9E200C4D8B002BBFF46D75D08CA66EE29568D03EEA518F9A006A67B02457D90C284DDF00DA31B0522F54E58B2223A1FE874A281AB486BE2E553E495F3312C4A854A492032F44504448BA43744F0C10A62E6A7E4D6868D94759A52825554C3E823E29A09FC640E8A135DF82173918E523F4F358FBCBAAD3A5922555252936B6B891126992A4AA655734E055D5520DD61157B2843AB112AC330A91AEC7187546888A084EC8FA104AD5935C618402B7720FF4410143A78391C71A852E1A33118A46845E9660341A6AE96776E7602F5FE92745A5F51480B22A5FED04E6076145E51BB37C945081103525C360B230C6C110FC4E9E532225B6F8A1649A006A8B83B5C5C3AA80623ABC0D2815E58D91E22E30ED3978CF832B78EEDBDE836118A2C65262A6B0090148562B71B4925120E594C9961568E611FC61886197B5FDFA928220B5BB59E8D201060C5A75330951F3720F5EC645E749346B9E7799EA8B7623423117E2583D45DED33633999BA02624BA8617597849A4B844E28DB7635A111E555116536184108164C294580885365DDB09E1AD65E8ACB19976208B5FCAAE30725D1A5D2B99C2EE216400194EC4280D91B0B4F7136DC7E44DA5081B390A2F40AFC8E48FE3451217E890C871189AC5F378591FA324C3BE650F5FB8E97938E01FC5CC2044225D6B781CB0B8A82C1F2325AC1FEA6CD33A01D4D946E861FE7E8384928C5DDA3E8C44D0AA44DC55A723FAA156F1BCB7BE1B71382546334B2DB3CE1E435F860C6465D2A1CB809A00114278998B7C3D1330D126D6405A0D99F14D681B8370191327363C9730032D187121F557280BE8E781D820F57688ACE120CE5894BF8B946E2C2F82CBA824B1DB68879BEA43A64974D51D437532F552893564B2530375B4DD863481EB11483D76E0A823A5046323016156D42694A05BE28B928EEF4E9ADDB444254D2ECFCDFA810E4B9879081911D2F4D17763F4286DF976A407E438DA841CD810FD618C6B77F9F8C2739E87838D154C2721464E6A1AC039521E7B02A88719003B7D790B28861E490B4F59C2E2FD93C5CF8550F7805B0FAEE2A637FD7738F559B028B057A4F09D5C2AB452D30BE149392C4AA9B49322E966F024044FDBBB6E8C64B0B7D0A058319FC5682F3549D36E94A1412E5C861FD1CF3317C16B8740E862055D69E0C6443E8242CD212609F27A9490A605A7A87A4C332498D864DA91DA13CDBC867C2541776D2012493A5EF029A41478A512BFEE2A650408259334CC96C60A5A4E9900A30A494948B597A0F09B3E82962F2AEDB048E40FC7C64304C74F910C49B201D7EE09F099EF7F160EB65631350C3074D9795E651AEB9C4F00B5D32BFE61BEDE66407131324E8D3D93A84235C308619EE0B6633D3CFB2FFF014EABA5AA8B31E8C986B5DC10F52C423A84946D4E0629FCC4831369066B851454B89A5033910262D610BAAC0368E8601321AE347186D00B85054C923E8A86877633423374B0E2A5E8D1AAC9C89AA9C52DA548942C569F4D46254FCB4DD75C0F51EEC34D7C49FC8BBB31A2A02E4988626F999840F17DB99A0A2F25C12C4926A18AB926151A128DE790E266E14BD2EAE2BE760A8C18311F79684FB10B628E4E30449AA442B33B918B22659C60817D7B6AF88FEF7F0E0E4F75303F88D0CD7A083CDD2058747402A88719003B7DF953014A776B0D93618D8805BF897F38F0106E7EFB6D70BC16E0A59205DBE44E8F10FEC885DFC9D01FA6E8B1835F106AB7084A8B8C45336D147A8926433C195BC746B69EE42156E9C5DA7BCC6FA284C16880A10BCC450D84ED002BCD91B071235693F5553DA31A96B1A22BA31CD81CC0F751774334FA018A6E21F1778C1D679933F1C050E0F8243C52238D4CBE56851E538E6CEC2A5091AA4CB4326FCC2C26F83C4D361407558A80CD07DA0E9A33813086C7DD0CFDFE71B8ACCD517878EC7C880FDDF82CA4E931CCD597D01BF5E581286109A609A0767AC53FCCD7B3E91B2F79C94B84F1932E0EB95676A57AC370A0DD8BCB78E7E7BE8417BCF5BF23AF2F8A0A852010D5295E1F22EBB28A0FD52C360260F4C3B826BD4833A102B612FBB7F96555D7B2691054B158968C4980A4A4E9E3CAEB2E5AD34DA4418E13F19A04B686515D7C4A4E92A119B6C4D62AFA09D235764874852667C30269F026F1779A4B252D35A5D9D956AB9E2990F4C39F59875DC3AD287DE5BF39338487C256D6DA35A0568313A6E86729D6FA2770FD9C8BDB7FFA67B1961D879F441244CCF79C00EA615EF80FD7E52DA0347D43490902CA65421B0354591F22C9F0F124C0F7FEE17F0366E6B050AFA19104888F74908E728C588ACBE382F4A4B0254385243542DA139E47D5239322A20DCF487C1428924CEC3516AF2467C7227479E8A168FB5228A6EF26186424480234D93E6694235F8BE1F675D72F8C7A97524D7429BD683F696854B535E7D6C67B13A06C7E124129CE5DEDD411B16D569261E831D0B8803F1DA01FD4D139F610FEEB375D8A7FF8AE6760CD1B48BB9B24D74ABBFCB023C7D924D4E6C8C69359BEB202D2E61D4DAB1E4D68F3AD4DF5568FB2852E99BEC1204CF167D0E0F63DA429BB563059101814116E7FA88B57BDF383B8E39E63A84711DCA081A297C20B6BE8FBB4385284C200BAB25069BC5362D88AC05B7D267B9C3A2DC93672E71FC175B43C57BD003A640B8B1C330930F41D8C58F1BF1EA139457593AD69805177200B394A3D840360E433B53CD7AEEF8C1564E62D8B74D2F631B182A76D2F7ADA87AF90380490483E880DC5E7CE6A1EA6E31A8AC445528B512F5CAC748F61B9E1E2579FF75D78C2A397F024771A27D235B80851B8A974E260E02D8B5CB2B6B904C79A222DA70DB82F8363C3A0D094E8CD190163EC59F795FAA1269112DB5D98673ADE2618BEF295AF94AEE5CC0CE53873C7D62ABE9AD4C6101AFA4F12BF89DF7AFB3FE34FFEF92EA4B53978CD0097ACF670AC95A011336A3B1329C51E485EB329C9786C0AB6B5748F939FD4B633623116AA62AE306CAEB08BF409D1FE61BABAEF1598868B88BFCB1841EE6010FA389127C80A1735D65B2F987745758F01F38C7BD26673394B7F4926B02F3617A9FCEDA9A86685CA3A66CDBF0C53F5966447B046B95774904F35B13A6CC239760CCFBC6E377EE7FF7C06AE5F2E3062AF6209BF3501C42CDCD968481BD60D3694E7DB3A2C1515D3081D0315E149C220B45DA33634A816DC8B7F42236BF933C5F4B59348899DC4535953E2E52F7F79D93645AB08692D040195990CCD522FB030B3884FDD7514BFF2F71FC1873FFD15E0CA79EC4D7C8C0AB6D06C603566BDBEBA76C1A094D12279DBFED86069DEDF65192551D98098AA9514FFC944BD64BED62CA311564E60B4FF10D2CE3AD06CA0BDF712607601EB1EB0CAB63AA9F6E4656483941B1B25EAC0A5F6E869DD70A6606C4FA21AB54F3A9624F0EA0CA7F2305C198A9FABEEF938DCF431DC7F0CD7CF39F8999BBF15CF7FCA63E0AFDE87F534C2D063347B6CD44D668278D201857DA14A40ADAE09C9A3A69A8D341F37742F6BB570DB0A8240702D0536A4A0BB9E27FEE932E557AB4DB030C7A3AE9D841E6D7B659EE1044AA897BDEC6592B5CB9F494248BAB50407182048B113F6667231F47C04A32EE6030F2B6E0BEFBCFD21FCC23BDF87FE09C09B9F971A7E593A44443B62D413EA9D355ACF859290D20834D0D97B370B04CCB1A3855AF2780476679E891AF09204BD430F6278E8101AC81136027446230CF200ADF925B4969710B71B588B5911A9C088C16E9E8B801112AC72E42460CD18296AC9E008D3A462EBE36CE9494A620FFDD481DF6C8B27777062151876F033CF7C1AFEAF1F780C961A47D0ED0638EE2F62CACDE0255D242C7D2DE1AC9A7121E92BAE2BDDE1C5865A59831F6A540607525D0FA6AAB21028A6E91A0145092521F9528A99F55AF46F024BBAB431AF44764A76279F04C76E7D92B77624558BEFFEEEEFC69FFFF99F8BAAC7DD51B26453D64DD0E80631B0A96FD1AEF232F4923E5AB5169CAC867AE4607828C18FBEEF7FE183FF7A27123742ADD58093F6D18A5CC4096733300BC66A7EC6592A8F585652D1632A8F2D35F25CAA9001EA59037DF491BAA914929C725DB48619F29575AC1D3B8CE1A08746C8E6D9DA302D20855EB8E8242CFAE263716609E1DE5DE80701D69221BA8EA37186A92FBEA5C41D0A5F47768EA9236A828C1B09948D056C585359885F6BA0484D8D3C60151724A4ECE321D295FDB8F67157E0F5DFFD6D78DA358B38E0E568F686E883C1BE4018D4246AC36E3736FA822A5FBD5EC7FEFDFBF1A4273D09478E1E41E0876529669BB829744FB555107F0ED80FD18C64D92F548B248903511CD5A6EC531A27B8F6D18F9E04C76E0D2B5B3A8A0B85A07AE2139F08DA514F7EF2934552B1AF13FF445124AAB6A85D9E27D9A46CD539720AF48B111A5E84C0CB1136A7F0B7FFF30EFCE507BE80CF7CE900A6765D82B5511F4DBF40C198372E6C86F97147E58ECCD2C25CFCE208920023E39CD5B633B695114904D96CE9D6F113A19F5B898BA9CE10C9894318AC1C45983988F210891F4AD93136B2E6F51B858780394B1861444ABC3587687A06C5C20C561B01BADD44C049658ACD0D0AA3EA92554C28A532AD022B795EC2565282A9A460036C6EF2092B34A5EC3795206D904209B07AE8202E9F6DE0A7FFCB75F8A9673E1E332C5D3D28D019C560F0C854AD211A99644DD0359126A5ED3A3D3D2DE9226F7FFBDBF1EA57BF5A7EFF9F5FFA92365C93D42EDB9ED4F4B4114FB6955C245B7C096C323B9856C5D4F6A0636FB4D61E23F598E2D113406D09285B3D8880E2A4B14B5EBBDDC60D37DC20EA1F7578EE980457C8222AECFC1E6A578D643090A4402EB0AEF488854453B4679670A493E10F6FFD04FEECC377A0E34D6176BA867CD445EAF8A0C5D260F1D4AC8B78C03CA150E2EF1864AA0558A8E2E52221723608802F691DB114E077B0081F8D610749670D2B478E221BAE238C982BE58BBF4792424C25D998D47FC282956CFDC9B4F414FD848D067C4CCFCEA335B70BBD4613ABD2910352F588EB8C81B7391943D3565DB26E1D4D71D70CE4042E8311B3004EC69E236D24E97124D319BAC77C34E202DFF9C45DF8F51F7C2A9E78F92CD6568E48AB9DA8602747093B97B83F5BE486D76DB5DB180E07989D9DC33FFFF33FE3965B5E83CF7DEE3FD06AB5641AEFBAF34E2937AD26D4380ECA360F280592A46FB0C66E696B593E4F7FA1B92E96C2D0CAB113406D152A5B3B4E0115A2D96C49C335AAD5975DF608BCE215AFC0777CC77708D88E1E3D2A004BE2041977499785577C2104423742BF3742587391E47DCC4540DA58C6FBEF5CC19FBEED7DF8D0E71F42303D85C5998600A09F25C8FC1A9A0464A6055A52A67CE789F49D1D0D07A236515A305D824988045CABE62238BC8AECC043E8774F20F53384615DCA74D9D4055BD7D12A8E928F25414D0CC865143855BB447C528DDA34DC5DBB50EC9E45ECD5D0E991DE4FA47458416692D289956473F57FD9BC2BC70BF599E9AC0D586F9D0C680DC78EF9D8379FE2A53FF48DB8E9DB1F8BB07F04ABFD5534DBBBE090321F0EC506A4439912900E65197B3F94CD89DAC06FFEE66FE23DEF798F24D0CECFCD89E6C0F48F3B09285F01659B02E8BB56DB0768148A026AB3776AD35AB05FF3A613406D0D285B3D4A62D85C1F515813237865F5B8A8DAC78F9FC00FFCC00F483336768DFCFFDBBBF618B9AAF3FE9B997BEFDC3B8F7D785FB6B18383E210C02E860895FE81690085586DA380A0C14011C510290F1A90AA483136A63634362F2798004E31D40AC2089C4484B61675086D4442092125046442E59A871FBBEBF57A76E73D73E74EF5FBCE3977EE2E361EC79B508919C95AEFCE9DC73DE77CE7FB9DEFFB7DBF6F646444E01F0BE7B8E058BD41A8E22463C249ABF9717439361AB509149B16E6647C04DE5CACDFF92E1EFBD1BFE07F470FC31B3A1981E509D268362AA0F8013D0F7BF84E4EE6914AA545938FA5E595441D69C7418AA0A55440736C1895C3E34095671F39B200019B53D39B28D6BBEA99CBF0BA3A89C9518164D786F27681C5B211EADE25A4C175CDB290EC7291ECEB4773D63CE41A75549858650F612A2191EF5EABCAE6C1200155B748CAF2FD1812C92CE05A189F1C43A6F80EAEBD601956FEF552F4DBEFA1DE7451AA5490B4183AE7B762D778E6E6687C7121F5D24053290F8EE362C7BF3D8B35B7DD8691E161C93B11113017C5B969342AD8B5EB4D257419A9880AA37DD3265A7BA88814F3075817CB944F3FBD93876AD758DAB98E93C61D928C69655C54F2518A3EB9DC2169A24CA3BAEEBAEB2402C8DA1C3E38C1FC47122D99150C60483083DC3B028B7A15A95805C96C16AF8E00DFFAD737F0E473AFC1E9EF86ED57E0A5320862BEEA2BCB739AAF0C9B8B9511ACACD344B656437CEC102AB9832897738853EDB5C9C4A90D9FDF932104C2434D6D1267158973E8C6E81A11A94008EBB5448F3356D510AF8284E7C2E99E8F5A7F1FAA290FD5661C956A80244BD783B26860940FD781641C48DAB0260BF0BB5D4CBC3782733E7906BE71F5F9F8CB4F95112B1451F33D043C17C56DA1E1B3CC8515CB52114FD1CC8642043D3D59ECDEBD47CE493B76EC1043220AA0A129067B429F638F625051E38A06726C3943B56C4F32D5C625693517454EA6E2A88FD34FEB0425DA319476AF31908F46C55D9846434321A6CF66D32895CA92F03DF3CC33B16EDD3A9C7DF6D91209E43F1A91E953CB4520BC38CB454388ACCA5B38CD3ABA9240DCEBC253BFD8856F3DFE02FE275703126564337D68C42C54FCAA947E34EB4D3816E1640CA97219F5F7F6C23F94438CA172EA35580E1A0C0430E7A36F50209D68861F3B302F50886733D1A550455964D79325DEA8C76165D2704F1A426DA01F638C6A561A4805714CC658EE5EC72CB86814028C5835CC6AD858F7D973F137CB4E41B62B8E4394166B3848F0FEFD8618AB63C761D3DC6B55398FD2F3781E0312C0962D5BB069D32639A39E7CF2C9F2930F6E2E26754107E2FBDAA02C52C1A676A33173AC209E62DBC7AC08E493141993760C244ACC5C3762230D9F16EEFB38ADE3A1DAB595B6AEA341D13B71A285EBC68DAB5E473A9D42A9540C3D0F83167CEEAAABAE9226D7030303E2AD8C019A902FAB79034227BA2A8BB53F0E927E15B1FA04DCFEF93854AEE1CEED2FE0BE5F8FC31F3D88A1FE6E94C81362A331B21D0873F68DA0B27F042E43CA2C43E7992AA070BFD2A9B0589128E15F2A21999CCCB16F573CB00E0CF0EA20F0A56B08BD41C2579D0D93B0617777A3B16008A56412E47E374A55F4D8BDD85F2E21703C7C7E41376E5FBE181F5B3088746E12659E91E21E925602956A01B64B564620A5F0413306279591B54B2FF4F39FFF02EBD6DD8ED75F7F1D838383A1682B8D8DE36EE6803FF9BB9CA1DE5467285DF5D292118B189294C0307E62592CA2D6C7C8687B458906EAE4951E2B65501D0F75ECA5D3FE152A91680BB4A3C7E1247272B91848DF917D4F17D311DE150A799C74D23CAC5AB50A175F7CB1847879780ED9156C6E26D88A392C5BB874E4C93C0261BF000013AA4944415431CAC6F2082799443699C62BBBF663F58F5FC48ED7F621397B2EE6DA556446F7617278946811763D40E0DAA2259188276111EAD5ABD25D90FC194742C5AA8F1335F5DA6A322F89E2685123E12D398BBC571FC9781255B6E969FA48916430300BCEBC8FE39D58976C1EA7BA05ACB9E45C7CE1FC45B02B75346C17FB0AA3C85A2E52F4B4014BDE2DD8CD3A027A6C5614DB49A45D475EBF69D37D78ECB1C7C573D3B8A26243619E2B24042BB4D068D4555082A154E9EBA4D30AC666E47A2D9546CF9B48584DD5E24435E3950A4E09B56B413F4D905714AD4ED8BC7D5369EF4AE3A1441B4F4445147EE743B4134C5364FD763C5F118A8C8C0CE3924B2EC5EDB7AF9570EFD8D8283CCF9C0118817350C8E7E17ADE946ADD26DB6E36EBC8A6D218775D7CFF3FDEC2A67F7E12EFED1AC79C4C067E750CF5862570B350E299A40E3795062893CC85231A0FAA90D074396FCB98427C14491DF33DC8E7735C54AA75C4EA55245349544A05A4AD2EC45C07C3B55164FB8670F95F7D165FFDE29FE39414458B7CE40A07D5192E66CB62A7CC34352A9467614D982DE3C1C7B3CF3E8B0D1BEEC49E3D6F63CE9CB902A7795E3209F49091A2C3E2E6776E6ECAA0DE6CB504550AB0EA9014B6D4527C4B89765A5642153FCA20298C289E499F28A3014026183B51BEF60CA5DDAB8E665006C2BDBF29000DAD81743A8DBD7BF7A2A7A7075FFFFADFE1FAEB57209F9FD02D3963A856AB9247E1CFE90FD64DB1D71365ED7B7BB2D8F3BBFDD8F0E873D8FCC31790EAEE455F770AC56201AE65C34B7B389C1B87E72A48A404FD35C7B0DD9BFC80EB9A01EBA16CA9EF6288DC65933437815CA582DC8103387FC9C95873F315F8CCB90BD02CD4902B5A68B26F54A302D7A5B6845AD8DCEC5590A626E456321DDE79E71D3977EEDCB953D2128C629A5211698E2D245EC59B34617915185294AF9641ED52895DC9C71A29B1703FD1CAB1E2AA95414563EA61AB8E56FE2AD41AE061AF635033B08A226F713483E2DFCD441B38A276C5A62C985C2E171ACCE1C3E358B26409D6AE5D8333CF5C8262B124AFA531196F673E926BA541E677C246AC348A188A48F77D02BEEDE0E9E75FC6868D4FE1D7AFBE8E051FFF24FC660CF94219B37A7B50AA1425B9C93305031433F110F2B550E913A8F981C8A3F5245DBCB56717FAE6CEC1DF5F7705AEBEF43398D71DC3C4F89BF09B1EE256AF84BE4579427A40A90827173F8D8841051AC7238F3C827BEEB947C68BDEC8753D490D9009C1800EC787D7D3008FEDA176491572E899F4CD1BDEABEE71A3B8AFEA0C1586F58E4EF3D76CF38E41CDC4526ABD47D4A0B8C37261D0083EC8A00CB3823FD5219A8C8A49298B58B16205BEF295AF09EB82E786E8EECB4F655F5C8BDC4D86AEBD0CF27E1109DF412A7918D974370E4E76E1E1AD4F61F3D6ED982C07E81F5A806A59B506E56BA740D030F16F18812DEE9D814472A7E1CA935F5A877B81B3A461C4E0DA716160E4C6F7E32F969D87D537DF844F9D9C46DDDF8FC93C43F5196432ECA638AACA407C46456DB8AE83F1F14352BB4498FBF2CB2F8B577AF1C51771CA29A7682F43186D4B7A82B54DF4EEA644A65D0FD5B68C98094AB4B34CF8253A06D5CE48B57F8D3128C211E3818C473A524B16F39C5908860A432846633C70E0004E3D75A164FD2FB8E002D98D19B4903C15D5629B148F0CD0489267172056A9C3733328935F140BE0A5E3487829FCE7ABEFE28EEF6CC34F7EF632064E9A27CD05E80D9AD29797A5F6BA549FC45BC945718356755724BB2AD3D14C6C56258612107CD6978432A3E171CB456035303E7C080B66A7B0F2A62B71F9C5E7C16D1624A95B2C0748B341402C40A55687E528A9B17A9DF42B5BA05E6F6F9F94BE6CDCB811DBB76F9771983B77AE304F18EC61F2967FABD5AAE2AD4C30623A9C36704FCD49423C7C1894300586C798DA30CAD7CE12E818543BA3747CD7440D6ABA3799FEFB91DE595481F479803F1DC7C6A14363723EB8E8A28BB061C386B0258B54DE3602816E9249E2FFC928674F593F80E33A28D754A942A6A70F13350B3F78F2DF71E7FDDBB0B76421D3D50BDBF1E1971A483931C41BACB76235115565C934B755C5AC08EA9374CBE2C6A6F404968603FC2C36D62633A3E2C34BBA28141B8857C670CDB273B1F21B37A27F16509A98845F9E44C2756133AFC47C90A827314246E81587E32855D8EEEE1E3CF5D493B8EBAEBB255F4783A1A732B4399EB178E633B266D3CF4B5129E928B43639C18E411DDF7AFED0AF8E1A94817906D37F9041F139739D49EE727170576548989ECAECC0AB57AFC6F2E5CB05FE31B725A5E1012B80D93A46C1C65ABD0C3BA108B735963E90CFD63F287AE6EF8C16B07AE356FC60C7CF90887BE81F9C877A390FC70EE0D7E342CDA0D7909072A03886094BEBE6B1A33A397ABAF134AB68DDD4002A9500E307F7E04F162FC4FA55D7E3C2B3985C2DA358CD239DB451AFD590EDEAC5D8D838BC94271E83D4233EC878E8EFEBC7EEDD6F63EDDA7FC04F7FFA3C66CDEA15C3E186C2FB16E8CCBA2D6ABC470A2CA34189E993DF31A80FDD1C4EFC0B4CF750D128533B1E4A413E558C2849E11A2371247C2605EE71210E0F0FE3BCA54BB1F29BDFC492B3164B2E8B7C3687410642C0066B9102B8B6877285CDD89AB092094C164B88D92E322EF5D57BB1FD27AFE18E6F6FC3AEDF1DC0C0FC01E41B6524621921D93214EF0AD3BC815A9D9ECB819D484A293EFB24C659914B1E9F03E447F370FD1856DFFC45ACB8F27CC4BD0A460F1591B6D348260234A4A52ECF7AACC76241A26A584DB253571719E0317CEF7B0FE3DB1BEF938D21935670598C85C11CCA0048A77A5FA49E0955CDE6C2713ADAB846215FC7439DF8DAFE50DEC11814A35066F73406D2AE414577609E95785660C294410BAAD19274BB6FDF5E61635C76D9E558B5EA16785E12FBF7EF97A817D3244C10DB8E2DB420A59BCE9DDD470315246D17F9F11C86667F0C13BE833577FE13B6FDE8BF900F12C8F6F752231931D655356BC29D632F25C74E2097AFC34A649048D45171EA28157CD40F1671D185A7E1DE357F8B85B367A17C7812093B40CD6AA0CA8EF77617EA351260552D18D9EF648DF0C160C22F7FF92BD0E3BEF5D65BF2DDCD46429029DDED752BD0E9895A33B9512F74A4093746C5B9E0983092A8D8E6ED45363B67A80FC58C5A1F3A5306154D529A04B1395F996007BD15237FB367CFC62DB7ACC4B2659F9324E7D8D84111C667A450450E09B9B8E33711B76AE2F5B2E921E4F2C3F0524D7465E6E2B95FBD8B75776DC12BBF7D159ED7876C6A3E9AF1328AFE419681A3526E22E5F48AD7ABE60F225F1EC149030358F9B51B70F9A59F46509B40AD9C4733484A8302862AEC98A5FA033078A2FB3131ACCEB2127ADBFBEFBF1FDFFDEE03E8E9518C70425D1326E73DF28C7FA4BC5DBB531C45077C0D43EAA447750CAADD11FC7F70DD4C18146FC384DACD798A6708C340E7F3DCB9798DDA759B92B8A541DD76DB1ACC9E3D4742CFFC3BE5C7B8A8EDB827F0A95A9D403ADD8D529930AA8A386B95E022D39745C96FE0FBDB9FC55D1B9FC4482E81AEA141C02E8BDA90C54A624A8C156B28E586B1E2868BF1D52F7F1E0B7B065099AC20F02B88C51DF82CEB677FAA664C180FB55A1971491EABE475D2B1F0CC33CF487065F7EEDD181C1C1248CBE7E99D7866E426600233C66345830DED4EB33128335653A8471D0FD5EE307EB8D79D88414D87355C4C26FB6F169C818DE64CD04A66C6303939214676CB2DAB71CD3557CB40B098514A4862B644EA58B2C1A6D0B5660D5E3C059FE1F5440571CB4750B5D03BD08FBDC387B172FD7D787AE7ABB0522721E6A6D18CD55039B80F672D1CC49DAB6EC29F9DF309148B1368F05CE77AA857AB086249C458A744F9E4262B8AEBA8342A48BB69A4D31EF6BCFD2EFEF18EDBF1CC8F9F9648250D8C8187B04C2472763C1AC43BDED93567521A298DB5556038C3904F5075270F75BCF373CCEB4FC4A00C943330C71CCCA72F2EB348A21090A2A58984625433D979C61967E09E7BEEC5E9A79F2A410B7A329EB98AA5A254CE9260CB08A0913723E4A231964B25385E1AD9B4872776BE86BBBEB305BBDE7C17438343B8E68ACFE1A62F7F01191B38B86F2F0606FA91CB17A4AF2E830695725905461A0C1E9085D1405F6F9FC0BF071E78100F3DF820F2F902E6CC9D239FCBEF64A09EB9D7E963F0FB78A6E824991C14FF16B2CD7FBF335494B5D72A858F56B974F250C7B48FE3BEE0440DEA783FD0189B8188DC89B9584965E28EFCA52FDD20DC40E673B880E9E98CC19A64A7596C84948469EC27952F953077702EDE1D29E1F16D3FC49F7EFA1C5C78DEA918CF1F9630FCACEE6E1C3E34896492C117B5581954A03193C4CAC008830FAFBCF2DF58BB76AD9457F03BD02B29E8A52846D1C0CD899C978E366EC7655046A32FF266ADA0C4119E144A92A81E29BA48C7A08E77F91EFBFA0FC3A008FFCC99838B9530D09CC3DE7E7B0F162D3A4322694B972E9585CCE23B2E66322EB8C88D77E07BD4D822A659C1ACDE34F2B922BC64065EA64B58E9138786117302342D1DA44866C40BF1A06F2A6269D024F88E8C8CE2A1873663EBD6ADAA5B87A7724F86246CCE4934C42891F5443DD2F4193AB641BDDFD944FF12B31294116BB506992AD91BBD54699B77A847C73692E3B9E2C806A592A212023673733C6FFA01D71AD8673C9539C4D3B0F8A0CE422E378E42A188CB2EBB4CCAEF59D14A0FC6454E8F6216B7A2F058F0D2349871A5519EF4E0D77C58415CBAB557EB25A4BC341A4D6A59D4D1A89791E9EA12952726A0693C4F3CF1041E7E780B7EF39BDF62CE9CD902EBF8FD4C148F9F436FC96B0DE4E3F306CACED0D0846F6308C553201F09C111DD5169831AEA971BC7438126619BAB872A7D67AB7B5DB16B1A23EBA2AB8E879AE9A953EC7106013299AC8657FC0CD512946A44528334457E7266BF83615C1862AE626FAB7A2C0628D881E2C61B6FC4B5D75E2B8B5A95DA2BF8C5FFB39933375AD562900B8B11375B04514A9502DC24CB3E14644B26C901A4E25043E01E85246FBDF5563CFFFCF352A43734345B6A99A49D8F7E44A15E34D012AED9E32AC66A6FECA21EB05A2D493D14ABAA45E7486A0555A986349433EA608CF54BC56E22DE24A493E03F5562B5061FDB3C8A40949E4F467B5802DDF150ED4D4ABB572983A2024F5A75B9601366A1CA283DF93FC623EAB5B8106828CCEFA81DDA176FB278F162DC7BEFBD58B870A1404043308D063C548F270BF51A4535C94C575EC4B6791E2B4F29AF78F4D14771F7DD77CBF364C6B36A99FA19C63B99FB8E265A4DC4D2246FFF5063633C14EFB15EAF4A1E8ADD50A4F2DFF0E5796F5A9759598A82126181A1126D5656A7944395DA9ABC8CBFC679866A60D1A2451DE5D8199C49B5C3C591CD2A4A8D08AD4838583A47877ADB33F891477CAB70A7353AF7524C4B9D09EEC20DA12A917CCAC670D4B4106E1DBB5B54ABE199467CAB88A128E9676E0EF438BCD6B01A5E7AE925AC5FBF5ECA2C4C289C1E8C1EF968858B518FF1871E07730FFCC93161D8FC8D37DE10D55EE5A1D85552C456948DA8AE0921FA8B251209A585A9145A448F5A156F692FAEE9F814E720ED7F70604035F45220710A1C319052BD563FA73F502ED76D735819FCBE122CF31AE940A7AA87758B07FD3A835995A14FD1459345192949D650D5287BAAE73424E1BBEBCA4B11F3D46A3D51E51AD38356F74BD081197DB7D17B93F7921B8B481EAAEF493901A520A5EFA57550D5C290FA3E8200A94C0ADD5D5D12E5AAD71BB271D1C8A4D58BA6D2FC3116520B4651E84555B3D2C0C9C6A3D8251736611A9597D8208E9A16ED3E4873DABC7933B66DDB26C18DF9F3E74BF4CE041978BFAC59521E2FEA9AB52C8376D7D1D07FD48BB5FB3D8E7D9D3ABFB26309C3FA070EEC158DC418FF264646F5592D4FCD79D69D82E47BD319598984B4F95156A68AD54472827850C437A49D71680C2289CB174AF8CF2C43418B262838456F40493B2B4F270B4D4B3C4B5302E966A02C4114639428B40C2721A6885329FD0B3DC41133D6066B5A1A4F99882965CA4A015FE087699DA00BE5B879880496169E0FAB958D41E8EA1EBD1768E3335DD3F53D4D81007A93D1DA1C72AF5A275E75B29076EC61819DD9D9A8CCF3873C271D7B1175AE38DA08700EA955C1490B5B95EA3994A3921899B22C85E4546353DD59C03408500B596080AC61E3315A06217FD57DA3A65671B6821BC62B857A666230DA03E94E7DB2D0229FAF3F4D9448A58FAB5E6BEABB2B63332EC32CE9D03B85CD97F5EB8C07112CDF52706A7D9E0ABE28B8D3F27C2D7D0DADFCA48D31F478467F2374FBBAF58F8609A173D65EDC18730B4AEBE96B4A9B2F65E8E1C61371EEDAF04DEAC2C863AB0C87BE27DD8645A9236964A1E7468DADF696A10FD57310DEAFDE4CCD39DA1CBCF5E6168A3486D2DC4A9DA4358B916A5DF95C1D190EF7CA087A08BB6928B4D2D2808CC81AEBF736F2CEF249E675F2B2C8CEAD5BCA180D94B075935E22613BA61029882A8C39EDE8038DD653D1ABAB25AEAC505474AB0BD779441DCC84C8C3EF48C8172EEA0874315ED7740D3109DE16D66EA1B62962B3D1FCF051CCFE4897B402F466973733A290A50101AD44730466E94BDFFF71FA5511B817B147ED65153C350A3611F711BE9D7A4E1BBE0178DA98A2D0751A1A9CF6FAF721641551550037DC2C14AC30703BF27FBD5AA6A70B5BBFB70CCC8050592A219E9FB234A64C994A37B6C2C0D1319EBAA3456721AA366C56B0DE94D416A11748EBC8FEBE0F8D6C906A14CC917FFA7868A39A324AD1D99E7AEFAD816F9D1A5A65F891EF13BD5003F1308364F63C3D6D475ACAD16F69E641CE501D87DF1981CE08CCCC08740C6A66C6B1F32E9D115000BFE3A13A2BA133023337021D839AB9B1ECBC53670454946FA609869D71ED8CC047750424A8315D5DF4A33A189DFBEE8CC0898E801894F4EB89482D9DE89B765EDF19818FE208901411BB72F9F2E6E3DBB6C9FD773CD547711974EE792646804C783EFE0F0A507581F460CF450000000049454E44AE426082 WHERE `app_id` = '8';
+
+-- for R1 Enhanced Notification ticket source from JIRA
+INSERT INTO `ep_basic_auth_account` VALUES (1,'JIRA','jira','6APqvG4AU2rfLgCvMdySwQ==','Y');
+
commit;
diff --git a/deliveries/README.md b/deliveries/README.md
index 99832c8e..c3a208c6 100644
--- a/deliveries/README.md
+++ b/deliveries/README.md
@@ -1,6 +1,6 @@
This directory has configuration files for building docker images,
and management files for starting and stopping docker containers.
-The Apps_Users_OnBoarding_Script.sql file has data for ONAP demo deployments:
+[PORTAL-106] The Apps_Users_OnBoarding_Script.sql file has data for ONAP demo deployments:
it adds users and applications so the Portal app has meaningful content on
startup. These were moved from script EcompPortalDMLMySql_1707_OS.sql.
diff --git a/deliveries/properties_rackspace/ECOMPPORTALAPP/system.properties b/deliveries/properties_rackspace/ECOMPPORTALAPP/system.properties
index 10842953..5306c2ab 100644
--- a/deliveries/properties_rackspace/ECOMPPORTALAPP/system.properties
+++ b/deliveries/properties_rackspace/ECOMPPORTALAPP/system.properties
@@ -1,6 +1,6 @@
#mysql
-db.driver = com.mysql.jdbc.Driver
-db.connectionURL = jdbc:mysql://portal-db:3306/portal
+db.driver = org.mariadb.jdbc.Driver
+db.connectionURL = jdbc:mariadb:failover://portal-db:3306/portal
db.userName =root
db.password =Aa123456
db.hib.dialect = org.hibernate.dialect.MySQLDialect
@@ -95,3 +95,6 @@ external_access_enable = false
#delete auditlog from number of days ago
auditlog_del_day_from = 365
+
+#External system notification URL
+external_system_notification_url= https://jira.onap.org/browse/
diff --git a/ecomp-portal-BE-common-test/src/main/java/com/openecomp/portalapp/portal/ecomp/test/model/AppCatalogItemTest.java b/ecomp-portal-BE-common-test/src/main/java/com/openecomp/portalapp/portal/ecomp/test/model/AppCatalogItemTest.java
new file mode 100644
index 00000000..6fb89146
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/com/openecomp/portalapp/portal/ecomp/test/model/AppCatalogItemTest.java
@@ -0,0 +1,35 @@
+package com.openecomp.portalapp.portal.ecomp.test.model;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.ecomp.model.AppCatalogItem;
+
+public class AppCatalogItemTest {
+
+ public AppCatalogItem mockAppCatalogItem(){
+ AppCatalogItem appCatalogItem = new AppCatalogItem();
+
+ appCatalogItem.setAlternateUrl("test");
+ appCatalogItem.setMlAppName("test");
+
+ return appCatalogItem;
+ }
+
+ @Test
+ public void appCatalogItemTest(){
+ AppCatalogItem appCatalogItem = mockAppCatalogItem();
+
+ AppCatalogItem appCatalogItem1 = new AppCatalogItem();
+ appCatalogItem1.setAlternateUrl("test");
+ appCatalogItem1.setMlAppName("test");
+
+ assertEquals(appCatalogItem.getAlternateUrl(), appCatalogItem1.getAlternateUrl());
+ assertEquals(appCatalogItem.getMlAppName(), appCatalogItem1.getMlAppName());
+
+ assertEquals(appCatalogItem.toString(), "AppCatalogItem [id=null, name=null, access=null, select=null, pending=null]");
+ assertEquals(appCatalogItem.hashCode(), appCatalogItem1.hashCode());
+ assertTrue(appCatalogItem.equals(appCatalogItem1));
+
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/com/openecomp/portalapp/portal/ecomp/test/model/AppCategoryFunctionsItemTest.java b/ecomp-portal-BE-common-test/src/main/java/com/openecomp/portalapp/portal/ecomp/test/model/AppCategoryFunctionsItemTest.java
new file mode 100644
index 00000000..74e74b37
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/com/openecomp/portalapp/portal/ecomp/test/model/AppCategoryFunctionsItemTest.java
@@ -0,0 +1,42 @@
+package com.openecomp.portalapp.portal.ecomp.test.model;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.ecomp.model.AppCategoryFunctionsItem;
+
+public class AppCategoryFunctionsItemTest {
+
+ public AppCategoryFunctionsItem mockAppCategoryFunctionsItem(){
+ AppCategoryFunctionsItem appCategoryFunctionsItem = new AppCategoryFunctionsItem();
+
+ appCategoryFunctionsItem.setRowId("test");
+ appCategoryFunctionsItem.setAppId("test");
+ appCategoryFunctionsItem.setApplication("test");
+ appCategoryFunctionsItem.setFunctions("test");
+
+ return appCategoryFunctionsItem;
+ }
+
+ @Test
+ public void appCategoryFunctionsItemTest(){
+ AppCategoryFunctionsItem appCategoryFunctionsItem = mockAppCategoryFunctionsItem();
+
+ AppCategoryFunctionsItem appCategoryFunctionsItem1 = new AppCategoryFunctionsItem();
+
+ appCategoryFunctionsItem1.setRowId("test");
+ appCategoryFunctionsItem1.setAppId("test");
+ appCategoryFunctionsItem1.setApplication("test");
+ appCategoryFunctionsItem1.setFunctions("test");
+
+ assertEquals(appCategoryFunctionsItem.getRowId(), appCategoryFunctionsItem1.getRowId());
+ assertEquals(appCategoryFunctionsItem.getAppId(), appCategoryFunctionsItem1.getAppId());
+ assertEquals(appCategoryFunctionsItem.getApplication(), appCategoryFunctionsItem1.getApplication());
+ assertEquals(appCategoryFunctionsItem.getFunctions(), appCategoryFunctionsItem1.getFunctions());
+ assertEquals(appCategoryFunctionsItem.toString(), "AppCategoryFunctionsItem [rowId=test, appId=test, application=test, category=null, functions=test]");
+ assertEquals(appCategoryFunctionsItem.hashCode(), appCategoryFunctionsItem1.hashCode());
+ assertTrue(appCategoryFunctionsItem.equals(appCategoryFunctionsItem1));
+
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/com/openecomp/portalapp/portal/ecomp/test/model/AppContactUsItemTest.java b/ecomp-portal-BE-common-test/src/main/java/com/openecomp/portalapp/portal/ecomp/test/model/AppContactUsItemTest.java
new file mode 100644
index 00000000..41539282
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/com/openecomp/portalapp/portal/ecomp/test/model/AppContactUsItemTest.java
@@ -0,0 +1,49 @@
+package com.openecomp.portalapp.portal.ecomp.test.model;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.ecomp.model.AppContactUsItem;
+
+public class AppContactUsItemTest {
+
+ public AppContactUsItem mockAppContactUsItem(){
+ AppContactUsItem appContactUsItem = new AppContactUsItem();
+
+ appContactUsItem.setAppId((long)1);
+ appContactUsItem.setAppName("test");
+ appContactUsItem.setDescription("test");
+ appContactUsItem.setContactName("test");
+ appContactUsItem.setContactEmail("test");
+ appContactUsItem.setUrl("test");
+ appContactUsItem.setActiveYN("test");
+
+ return appContactUsItem;
+ }
+
+ @Test
+ public void appContactUsItemTest(){
+ AppContactUsItem appContactUsItem = mockAppContactUsItem();
+
+ AppContactUsItem appContactUsItem1 = new AppContactUsItem();
+ appContactUsItem1.setAppId((long)1);
+ appContactUsItem1.setAppName("test");
+ appContactUsItem1.setDescription("test");
+ appContactUsItem1.setContactName("test");
+ appContactUsItem1.setContactEmail("test");
+ appContactUsItem1.setUrl("test");
+ appContactUsItem1.setActiveYN("test");
+
+ assertEquals(appContactUsItem.getAppId(), appContactUsItem1.getAppId());
+ assertEquals(appContactUsItem.getAppName(), appContactUsItem1.getAppName());
+ assertEquals(appContactUsItem.getDescription(), appContactUsItem1.getDescription());
+ assertEquals(appContactUsItem.getContactName(), appContactUsItem1.getContactName());
+ assertEquals(appContactUsItem.getContactEmail(), appContactUsItem1.getContactEmail());
+ assertEquals(appContactUsItem.getUrl(), appContactUsItem1.getUrl());
+ assertEquals(appContactUsItem.getActiveYN(), appContactUsItem1.getActiveYN());
+ assertEquals(appContactUsItem.toString(), "AppContactUsItem [appId=1, appName=test, description=test, contactName=test, contactEmail=test, url=test, activeYN=test]");
+ assertEquals(appContactUsItem.hashCode(), appContactUsItem1.hashCode());
+ assertTrue(appContactUsItem.equals(appContactUsItem1));
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/com/openecomp/portalapp/portal/ecomp/test/model/SearchResultItemTest.java b/ecomp-portal-BE-common-test/src/main/java/com/openecomp/portalapp/portal/ecomp/test/model/SearchResultItemTest.java
new file mode 100644
index 00000000..97e3be6c
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/com/openecomp/portalapp/portal/ecomp/test/model/SearchResultItemTest.java
@@ -0,0 +1,41 @@
+package com.openecomp.portalapp.portal.ecomp.test.model;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.ecomp.model.SearchResultItem;
+
+public class SearchResultItemTest {
+
+ public SearchResultItem mockSearchResultItem(){
+ SearchResultItem searchResultItem = new SearchResultItem();
+
+ searchResultItem.setRowId("test");
+ searchResultItem.setCategory("test");
+ searchResultItem.setName("test");
+ searchResultItem.setTarget("test");
+ searchResultItem.setUuid("test");
+
+ return searchResultItem;
+ }
+
+ @Test
+ public void searchResultItemTest(){
+ SearchResultItem searchResultItem = mockSearchResultItem();
+
+ SearchResultItem searchResultItem1 = new SearchResultItem();
+ searchResultItem1.setRowId("test");
+ searchResultItem1.setCategory("test");
+ searchResultItem1.setName("test");
+ searchResultItem1.setTarget("test");
+ searchResultItem1.setUuid("test");
+
+ assertEquals(searchResultItem.getRowId(), searchResultItem.getRowId());
+ assertEquals(searchResultItem.getCategory(), searchResultItem.getCategory());
+ assertEquals(searchResultItem.getName(), searchResultItem.getName());
+ assertEquals(searchResultItem.getTarget(), searchResultItem.getTarget());
+ assertEquals(searchResultItem.getUuid(), searchResultItem.getUuid());
+ assertEquals(searchResultItem.toString(), searchResultItem.toString());
+
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/lm/FusionLicenseManagerImplTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/lm/FusionLicenseManagerImplTest.java
new file mode 100644
index 00000000..23e4c28e
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/lm/FusionLicenseManagerImplTest.java
@@ -0,0 +1,28 @@
+package org.openecomp.portalapp.lm;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.Date;
+
+import org.junit.Test;
+
+public class FusionLicenseManagerImplTest {
+
+
+ @Test
+ public void FusionLicenseManagerImplTest(){
+ FusionLicenseManagerImpl fusionLicenseManagerImpl = new FusionLicenseManagerImpl();
+
+ String nvlReturn = null;
+
+ int installLicenseInt = fusionLicenseManagerImpl.installLicense();
+ nvlReturn = fusionLicenseManagerImpl.nvl("test");
+ Date expiredDateReturn = fusionLicenseManagerImpl.getExpiredDate();
+
+ assertEquals(installLicenseInt, 0);
+ assertEquals(nvlReturn, null);
+ assertEquals(expiredDateReturn, null);
+
+ }
+
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/lm/LicenseableClassImplTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/lm/LicenseableClassImplTest.java
new file mode 100644
index 00000000..1d9f4a64
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/lm/LicenseableClassImplTest.java
@@ -0,0 +1,30 @@
+package org.openecomp.portalapp.lm;
+
+import static org.junit.Assert.assertEquals;
+
+import java.io.FileNotFoundException;
+
+import org.junit.Test;
+
+public class LicenseableClassImplTest {
+
+ @Test
+ public void licenseableClassImplTest() throws FileNotFoundException{
+ LicenseableClassImpl licenseableClassImpl = new LicenseableClassImpl();
+
+ String appNameReturn = licenseableClassImpl.getApplicationName();
+ java.io.InputStream inputStream = licenseableClassImpl.getPublicKeystoreAsInputStream();
+ String aliasReturn = licenseableClassImpl.getAlias();
+ String pswdReturn = licenseableClassImpl.getKeyPasswd();
+ String pkPswd = licenseableClassImpl.getPublicKeystorePassword();
+ String cpPswd = licenseableClassImpl.getCipherParamPassword();
+
+ assertEquals(appNameReturn, "");
+ assertEquals(inputStream, null);
+ assertEquals(aliasReturn, "");
+ assertEquals(pswdReturn, "");
+ assertEquals(pkPswd, "");
+ assertEquals(cpPswd, "");
+
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/AppsControllerExternalRequestTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/AppsControllerExternalRequestTest.java
index 52993d65..1db55526 100644
--- a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/AppsControllerExternalRequestTest.java
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/AppsControllerExternalRequestTest.java
@@ -67,8 +67,7 @@ public class AppsControllerExternalRequestTest extends MockitoTestSuite {
PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
expectedportalRestResponse.setMessage("Missing required field: email, loginId, or loginPwd");
expectedportalRestResponse.setResponse(null);
- PortalRestStatusEnum portalRestStatusEnum = null;
- expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ expectedportalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
EPUser user = mockUser.mockEPUser();
user.setEmail("guestT@test.portal.onap.org");
Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
@@ -82,8 +81,7 @@ public class AppsControllerExternalRequestTest extends MockitoTestSuite {
PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
expectedportalRestResponse.setMessage("java.lang.NullPointerException");
expectedportalRestResponse.setResponse(null);
- PortalRestStatusEnum portalRestStatusEnum = null;
- expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ expectedportalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
EPUser user = mockUser.mockEPUser();
user.setEmail("guestT@test.portal.onap.org");
user.setLoginPwd("pwd");
@@ -100,8 +98,7 @@ public class AppsControllerExternalRequestTest extends MockitoTestSuite {
PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
expectedportalRestResponse.setMessage(null);
expectedportalRestResponse.setResponse(null);
- PortalRestStatusEnum portalRestStatusEnum = null;
- expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ expectedportalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
EPUser user = mockUser.mockEPUser();
user.setEmail("guestT@test.portal.onap.org");
user.setLoginPwd("pwd");
@@ -120,8 +117,7 @@ public class AppsControllerExternalRequestTest extends MockitoTestSuite {
PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
expectedportalRestResponse.setMessage(null);
expectedportalRestResponse.setResponse(null);
- PortalRestStatusEnum portalRestStatusEnum = null;
- expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
+ expectedportalRestResponse.setStatus(PortalRestStatusEnum.OK);
EPUser user = mockUser.mockEPUser();
user.setEmail("guestT@test.portal.onap.org");
user.setLoginPwd("pwd");
@@ -142,8 +138,7 @@ public class AppsControllerExternalRequestTest extends MockitoTestSuite {
PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
expectedportalRestResponse.setMessage(null);
expectedportalRestResponse.setResponse(null);
- PortalRestStatusEnum portalRestStatusEnum = null;
- expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
+ expectedportalRestResponse.setStatus(PortalRestStatusEnum.OK);
EPUser user = mockUser.mockEPUser();
user.setEmail("guestT@test.portal.onap.org");
user.setLoginPwd("pwd");
@@ -175,8 +170,7 @@ public class AppsControllerExternalRequestTest extends MockitoTestSuite {
PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
expectedportalRestResponse.setMessage("FieldsValidator [httpStatusCode=500, errorCode=null, fields=null]");
expectedportalRestResponse.setResponse(null);
- PortalRestStatusEnum portalRestStatusEnum = null;
- expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ expectedportalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
EPUser user = mockUser.mockEPUser();
user.setEmail("guestT@test.portal.onap.org");
user.setLoginPwd("pwd");
@@ -210,8 +204,7 @@ public class AppsControllerExternalRequestTest extends MockitoTestSuite {
PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
expectedportalRestResponse.setMessage("Unexpected field: id");
expectedportalRestResponse.setResponse(null);
- PortalRestStatusEnum portalRestStatusEnum = null;
- expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ expectedportalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
OnboardingApp expectedOnboardingApp = new OnboardingApp();
expectedOnboardingApp.id = (long) 1;
@@ -227,8 +220,7 @@ public class AppsControllerExternalRequestTest extends MockitoTestSuite {
expectedportalRestResponse.setMessage(
"Missing required field: name, url, restUrl, restrictedApp, isOpen, isEnabled, myLoginsAppOwner");
expectedportalRestResponse.setResponse(null);
- PortalRestStatusEnum portalRestStatusEnum = null;
- expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ expectedportalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
OnboardingApp expectedOnboardingApp = new OnboardingApp();
expectedOnboardingApp.id = null;
@@ -244,8 +236,7 @@ public class AppsControllerExternalRequestTest extends MockitoTestSuite {
PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
expectedportalRestResponse.setMessage("Unexpected value for field: id");
expectedportalRestResponse.setResponse(null);
- PortalRestStatusEnum portalRestStatusEnum = null;
- expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ expectedportalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
Long appId = null;
OnboardingApp expectedOnboardingApp = new OnboardingApp();
expectedOnboardingApp.id = null;
@@ -261,8 +252,7 @@ public class AppsControllerExternalRequestTest extends MockitoTestSuite {
expectedportalRestResponse.setMessage(
"Missing required field: name, url, restUrl, restrictedApp, isOpen, isEnabled, myLoginsAppOwner");
expectedportalRestResponse.setResponse(null);
- PortalRestStatusEnum portalRestStatusEnum = null;
- expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ expectedportalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
Long appId = (long) 1;
OnboardingApp expectedOnboardingApp = new OnboardingApp();
expectedOnboardingApp.id = (long) 1;
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/AuditLogControllerTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/AuditLogControllerTest.java
new file mode 100644
index 00000000..33079b0c
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/AuditLogControllerTest.java
@@ -0,0 +1,102 @@
+package org.openecomp.portalapp.portal.test.controller;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.controller.AuditLogController;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.test.core.MockEPUser;
+import org.openecomp.portalapp.test.framework.MockitoTestSuite;
+import org.openecomp.portalapp.util.EPUserUtils;
+import org.openecomp.portalsdk.core.service.AuditService;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest(EPUserUtils.class)
+public class AuditLogControllerTest {
+
+
+ @Mock
+ AuditService auditService;
+
+ @InjectMocks
+ AuditLogController auditLogController = new AuditLogController();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+ NullPointerException nullPointerException = new NullPointerException();
+ MockEPUser mockUser = new MockEPUser();
+ @Test
+ public void auditLogTest()
+ {
+ PowerMockito.mockStatic(EPUserUtils.class);
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(EPUserUtils.getUserId(mockedRequest)).thenReturn((int)1);
+ auditLogController.auditLog(mockedRequest, "1", "app", "test");
+ }
+
+ @Test
+ public void auditLogTabTest()
+ {
+ PowerMockito.mockStatic(EPUserUtils.class);
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(EPUserUtils.getUserId(mockedRequest)).thenReturn((int)1);
+ auditLogController.auditLog(mockedRequest, "1", "tab", "test");
+ }
+
+ @Test
+ public void auditLogfunctionalTest()
+ {
+ PowerMockito.mockStatic(EPUserUtils.class);
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(EPUserUtils.getUserId(mockedRequest)).thenReturn((int)1);
+ auditLogController.auditLog(mockedRequest, "1", "functional", "test");
+ }
+
+ @Test
+ public void auditLogleftMenuTest()
+ {
+ PowerMockito.mockStatic(EPUserUtils.class);
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(EPUserUtils.getUserId(mockedRequest)).thenReturn((int)1);
+ auditLogController.auditLog(mockedRequest, "1", "leftMenu", "test");
+ }
+
+ @Test(expected = NumberFormatException.class)
+ public void auditLogExceptionTest()
+ {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(EPUserUtils.getUserId(mockedRequest)).thenReturn((int)1);
+ auditLogController.auditLog(mockedRequest, "1", "app", "test");
+ }
+
+ @Test
+ public void auditLogerrorTest()
+ {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenThrow(nullPointerException);
+ auditLogController.auditLog(mockedRequest, "1", "app", "test");
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/BEPropertyReaderControllerTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/BEPropertyReaderControllerTest.java
index b621d9ad..e4d34ceb 100644
--- a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/BEPropertyReaderControllerTest.java
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/BEPropertyReaderControllerTest.java
@@ -66,7 +66,6 @@ public class BEPropertyReaderControllerTest extends MockitoTestSuite {
PowerMockito.mockStatic(SystemProperties.class);
Mockito.when(new BEProperty(key, SystemProperties.getProperty(key))).thenThrow(nullPointerException);
actualPortalRestResponse = bEPropertyReaderController.readProperty(mockedRequest, key);
- System.out.println(actualPortalRestResponse);
assertTrue(actualPortalRestResponse.equals(ecpectedPortalRestResponse));
}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/BasicAuthAccountControllerTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/BasicAuthAccountControllerTest.java
index 70505274..8f9549ce 100644
--- a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/BasicAuthAccountControllerTest.java
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/BasicAuthAccountControllerTest.java
@@ -86,8 +86,7 @@ public class BasicAuthAccountControllerTest extends MockitoTestSuite {
PortalRestResponse<String> expectedResponse = new PortalRestResponse<String>();
expectedResponse.setMessage("SUCCESS");
expectedResponse.setResponse("");
- PortalRestStatusEnum portalRestStatusEnum = null;
- expectedResponse.setStatus(portalRestStatusEnum.OK);
+ expectedResponse.setStatus(PortalRestStatusEnum.OK);
long accountd = 1;
Mockito.when(basicAuthAccountService.saveBasicAuthAccount(basicAuthCredentials)).thenReturn(accountd);
@@ -106,8 +105,7 @@ public class BasicAuthAccountControllerTest extends MockitoTestSuite {
PortalRestResponse<String> expectedResponse = new PortalRestResponse<String>();
expectedResponse.setMessage("Authorization Required");
expectedResponse.setResponse("Admin Only Operation! ");
- PortalRestStatusEnum portalRestStatusEnum = null;
- expectedResponse.setStatus(portalRestStatusEnum.ERROR);
+ expectedResponse.setStatus(PortalRestStatusEnum.ERROR);
PortalRestResponse<String> actualResponse = basicAuthAccountController.createBasicAuthAccount(mockedRequest,
mockedResponse, basicAuthCredentials);
@@ -123,8 +121,7 @@ public class BasicAuthAccountControllerTest extends MockitoTestSuite {
PortalRestResponse<String> expectedResponse = new PortalRestResponse<String>();
expectedResponse.setMessage("FAILURE");
expectedResponse.setResponse("newBasicAuthAccount cannot be null or empty");
- PortalRestStatusEnum portalRestStatusEnum = null;
- expectedResponse.setStatus(portalRestStatusEnum.ERROR);
+ expectedResponse.setStatus(PortalRestStatusEnum.ERROR);
PortalRestResponse<String> actualResponse = basicAuthAccountController.createBasicAuthAccount(mockedRequest,
mockedResponse, basicAuthCredentials);
assertEquals(actualResponse, expectedResponse);
@@ -139,8 +136,7 @@ public class BasicAuthAccountControllerTest extends MockitoTestSuite {
expectedPortalResponse.setMessage("Success");
expectedPortalResponse.setResponse(null);
- PortalRestStatusEnum portalRestStatusEnum = null;
- expectedPortalResponse.setStatus(portalRestStatusEnum.OK);
+ expectedPortalResponse.setStatus(PortalRestStatusEnum.OK);
EPUser user = mockUser.mockEPUser();
Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
@@ -161,8 +157,7 @@ public class BasicAuthAccountControllerTest extends MockitoTestSuite {
expectedPortalResponse.setMessage("UnAuthorized! Admin Only Operation");
expectedPortalResponse.setResponse(new ArrayList<>());
- PortalRestStatusEnum portalRestStatusEnum = null;
- expectedPortalResponse.setStatus(portalRestStatusEnum.ERROR);
+ expectedPortalResponse.setStatus(PortalRestStatusEnum.ERROR);
EPUser user = mockUser.mockEPUser();
Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
@@ -183,8 +178,7 @@ public class BasicAuthAccountControllerTest extends MockitoTestSuite {
PortalRestResponse<String> expectedResponse = new PortalRestResponse<String>();
expectedResponse.setMessage("SUCCESS");
expectedResponse.setResponse("");
- PortalRestStatusEnum portalRestStatusEnum = null;
- expectedResponse.setStatus(portalRestStatusEnum.OK);
+ expectedResponse.setStatus(PortalRestStatusEnum.OK);
long accountd = 1;
PortalRestResponse<String> actualResponse = basicAuthAccountController.updateAccount(mockedRequest,
mockedResponse, accountd, basicAuthCredentials);
@@ -201,8 +195,7 @@ public class BasicAuthAccountControllerTest extends MockitoTestSuite {
PortalRestResponse<String> expectedResponse = new PortalRestResponse<String>();
expectedResponse.setMessage("Authorization Required");
expectedResponse.setResponse("Admin Only Operation! ");
- PortalRestStatusEnum portalRestStatusEnum = null;
- expectedResponse.setStatus(portalRestStatusEnum.ERROR);
+ expectedResponse.setStatus(PortalRestStatusEnum.ERROR);
long accountd = 1;
PortalRestResponse<String> actualResponse = basicAuthAccountController.updateAccount(mockedRequest,
mockedResponse, accountd, basicAuthCredentials);
@@ -219,8 +212,7 @@ public class BasicAuthAccountControllerTest extends MockitoTestSuite {
PortalRestResponse<String> expectedResponse = new PortalRestResponse<String>();
expectedResponse.setMessage("FAILURE");
expectedResponse.setResponse("BasicAuthCredentials cannot be null or empty");
- PortalRestStatusEnum portalRestStatusEnum = null;
- expectedResponse.setStatus(portalRestStatusEnum.ERROR);
+ expectedResponse.setStatus(PortalRestStatusEnum.ERROR);
long accountd = 1;
PortalRestResponse<String> actualResponse = basicAuthAccountController.updateAccount(mockedRequest,
mockedResponse, accountd, basicAuthCredentials);
@@ -235,8 +227,7 @@ public class BasicAuthAccountControllerTest extends MockitoTestSuite {
PortalRestResponse<String> expectedResponse = new PortalRestResponse<String>();
expectedResponse.setMessage("SUCCESS");
expectedResponse.setResponse("");
- PortalRestStatusEnum portalRestStatusEnum = null;
- expectedResponse.setStatus(portalRestStatusEnum.OK);
+ expectedResponse.setStatus(PortalRestStatusEnum.OK);
long accountd = 1;
Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
PortalRestResponse<String> actualResponse = basicAuthAccountController.deleteAccount(mockedRequest,
@@ -252,8 +243,7 @@ public class BasicAuthAccountControllerTest extends MockitoTestSuite {
PortalRestResponse<String> expectedResponse = new PortalRestResponse<String>();
expectedResponse.setMessage("Authorization Required");
expectedResponse.setResponse("Admin Only Operation! ");
- PortalRestStatusEnum portalRestStatusEnum = null;
- expectedResponse.setStatus(portalRestStatusEnum.ERROR);
+ expectedResponse.setStatus(PortalRestStatusEnum.ERROR);
long accountd = 1;
Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
PortalRestResponse<String> actualResponse = basicAuthAccountController.deleteAccount(mockedRequest,
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/DashboardControllerTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/DashboardControllerTest.java
new file mode 100644
index 00000000..eed560de
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/DashboardControllerTest.java
@@ -0,0 +1,427 @@
+package org.openecomp.portalapp.portal.test.controller;
+
+import static org.junit.Assert.assertEquals;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.controller.DashboardController;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.openecomp.portalapp.portal.service.DashboardSearchService;
+import org.openecomp.portalapp.portal.service.DashboardSearchServiceImpl;
+import org.openecomp.portalapp.portal.test.core.MockEPUser;
+import org.openecomp.portalapp.portal.transport.CommonWidget;
+import org.openecomp.portalapp.portal.transport.CommonWidgetMeta;
+import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;
+import org.openecomp.portalapp.test.framework.MockitoTestSuite;
+import org.openecomp.portalapp.util.EPUserUtils;
+import org.openecomp.portalsdk.core.domain.support.CollaborateList;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest({EPUserUtils.class, CollaborateList.class, SystemProperties.class, EPCommonSystemProperties.class})
+public class DashboardControllerTest {
+
+ @Mock
+ DashboardSearchService searchService = new DashboardSearchServiceImpl();
+
+ @InjectMocks
+ DashboardController dashboardController = new DashboardController();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+
+ NullPointerException nullPointerException = new NullPointerException();
+
+ MockEPUser mockUser = new MockEPUser();
+
+ public CommonWidgetMeta mockCommonWidgetMeta() {
+ CommonWidgetMeta commonWidgetMeta= new CommonWidgetMeta();
+ List<CommonWidget> widgetList = new ArrayList<>();
+ CommonWidget commonWidget = new CommonWidget();
+ commonWidget.setId((long) 1);
+ commonWidget.setCategory("test");
+ commonWidget.setHref("testhref");
+ commonWidget.setTitle("testTitle");
+ commonWidget.setContent("testcontent");
+ commonWidget.setEventDate("testDate");
+ commonWidget.setSortOrder(1);
+ widgetList.add(commonWidget);
+ commonWidgetMeta.setItems(widgetList);
+
+ return commonWidgetMeta;
+ }
+
+ public CommonWidget mockCommonWidget() {
+
+ CommonWidget commonWidget = new CommonWidget();
+ commonWidget.setId((long) 1);
+ commonWidget.setCategory("test");
+ commonWidget.setHref("testhref");
+ commonWidget.setTitle("testTitle");
+ commonWidget.setContent("testcontent");
+ commonWidget.setEventDate("testDate");
+ commonWidget.setSortOrder(1);
+
+ return commonWidget;
+ }
+
+
+ @Test
+ public void getWidgetDataTest() throws IOException {
+
+ String resourceType = null;
+ PortalRestResponse<CommonWidgetMeta> expectedData = new PortalRestResponse<CommonWidgetMeta>();
+ expectedData.setStatus(PortalRestStatusEnum.ERROR);
+ expectedData.setMessage("Unexpected resource type null");
+ expectedData.setResponse(null);
+
+ PortalRestResponse<CommonWidgetMeta> actualResponse = dashboardController.getWidgetData(mockedRequest, resourceType);
+ assertEquals(expectedData,actualResponse);
+ }
+
+ @Test
+ public void getWidgetDataWithValidResourceTest() throws IOException {
+ String resourceType = "EVENTS";
+ CommonWidgetMeta commonWidgetMeta= mockCommonWidgetMeta();
+ commonWidgetMeta.setCategory(null);
+
+ Mockito.when(searchService.getWidgetData(resourceType)).thenReturn(commonWidgetMeta);
+ PortalRestResponse<CommonWidgetMeta> expectedData = new PortalRestResponse<CommonWidgetMeta>();
+ expectedData.setStatus(PortalRestStatusEnum.OK);
+ expectedData.setMessage("success");
+ expectedData.setResponse(commonWidgetMeta);
+
+ PortalRestResponse<CommonWidgetMeta> actualResponse = dashboardController.getWidgetData(mockedRequest, resourceType);
+ System.out.println(actualResponse);
+ assertEquals(expectedData,actualResponse);
+ }
+
+ @Test
+ public void saveWidgetDataBulkNullTest() throws IOException {
+ CommonWidgetMeta commonWidgetMeta= mockCommonWidgetMeta();
+ commonWidgetMeta.setCategory(null);
+
+ PortalRestResponse<String> expectedData = new PortalRestResponse<String>();
+ expectedData.setStatus(PortalRestStatusEnum.ERROR);
+ expectedData.setMessage("ERROR");
+ expectedData.setResponse("Category cannot be null or empty");
+
+ PortalRestResponse<String> actualResponse = dashboardController.saveWidgetDataBulk(commonWidgetMeta);
+ assertEquals(expectedData,actualResponse);
+ }
+
+ @Test
+ public void saveWidgetUnexpectedDataBulkTest() throws IOException {
+ CommonWidgetMeta commonWidgetMeta= mockCommonWidgetMeta();
+ commonWidgetMeta.setCategory("Unexpected Data");
+
+ PortalRestResponse<String> expectedData = new PortalRestResponse<String>();
+ expectedData.setStatus(PortalRestStatusEnum.ERROR);
+ expectedData.setMessage("Unexpected resource type Unexpected Data");
+ expectedData.setResponse(null);
+
+ PortalRestResponse<String> actualResponse = dashboardController.saveWidgetDataBulk(commonWidgetMeta);
+ assertEquals(expectedData,actualResponse);
+
+ }
+
+ @Test
+ public void saveWidgetInvalidDataBulkTest() throws IOException {
+ CommonWidgetMeta commonWidgetMeta= mockCommonWidgetMeta();
+ commonWidgetMeta.setCategory("EVENTS");
+
+ PortalRestResponse<String> expectedData = new PortalRestResponse<String>();
+ expectedData.setStatus(PortalRestStatusEnum.ERROR);
+ expectedData.setMessage("Invalid category: test");
+ expectedData.setResponse(null);
+
+ PortalRestResponse<String> actualResponse = dashboardController.saveWidgetDataBulk(commonWidgetMeta);
+ assertEquals(expectedData,actualResponse);
+ }
+
+ @Test
+ public void saveWidgetDataBulkTest() throws IOException {
+
+ List<CommonWidget> widgetList = new ArrayList<>();
+ CommonWidget commonWidget = new CommonWidget("EVENTS", "http://test.com", "testTitle", "testcontent", "2017-07-01", 1);
+ widgetList.add(commonWidget);
+ CommonWidgetMeta commonWidgetMeta= new CommonWidgetMeta("EVENTS", widgetList);
+
+
+
+ /* commonWidgetMeta.setItems(widgetList);
+
+ commonWidgetMeta.setCategory("EVENTS");*/
+
+ PortalRestResponse<String> expectedData = new PortalRestResponse<String>();
+ expectedData.setStatus(PortalRestStatusEnum.OK);
+ expectedData.setMessage("success");
+ expectedData.setResponse("success");
+
+ Mockito.when(searchService.saveWidgetDataBulk(commonWidgetMeta)).thenReturn("success");
+
+ PortalRestResponse<String> actualResponse = dashboardController.saveWidgetDataBulk(commonWidgetMeta);
+ assertEquals(expectedData,actualResponse);
+ }
+
+ @Test
+ public void saveWidgetDataNullTest() throws IOException {
+
+ CommonWidget commonWidget = mockCommonWidget();
+ commonWidget.setId((long)1);
+ commonWidget.setContent("test");
+ commonWidget.setCategory(null);
+ PortalRestResponse<String> expectedData = new PortalRestResponse<String>();
+ expectedData.setStatus(PortalRestStatusEnum.ERROR);
+ expectedData.setMessage("ERROR");
+ expectedData.setResponse("Category cannot be null or empty");
+
+ PortalRestResponse<String> actualResponse = dashboardController.saveWidgetData(commonWidget);
+ assertEquals(expectedData,actualResponse);
+
+ }
+
+ @Test
+ public void saveWidgetDataErrorTest() throws IOException {
+
+ CommonWidget commonWidget = mockCommonWidget();
+ PortalRestResponse<String> expectedData = new PortalRestResponse<String>();
+ expectedData.setStatus(PortalRestStatusEnum.ERROR);
+ expectedData.setMessage("Invalid category: test");
+ expectedData.setResponse(null);
+
+ PortalRestResponse<String> actualResponse = dashboardController.saveWidgetData(commonWidget);
+ assertEquals(expectedData,actualResponse);
+ }
+
+ @Test
+ public void saveWidgetDataTest() throws IOException {
+
+ CommonWidgetMeta commonWidgetMeta= new CommonWidgetMeta();
+ List<CommonWidget> widgetList = new ArrayList<>();
+ CommonWidget commonWidget = new CommonWidget();
+ commonWidget.setId((long) 1);
+ commonWidget.setCategory("EVENTS");
+ commonWidget.setHref("http://test.com");
+ commonWidget.setTitle("testTitle");
+ commonWidget.setContent("testcontent");
+ commonWidget.setEventDate("2017-07-01");
+ commonWidget.setSortOrder(1);
+ widgetList.add(commonWidget);
+ commonWidgetMeta.setItems(widgetList);
+
+ commonWidgetMeta.setCategory("EVENTS");
+
+ PortalRestResponse<String> expectedData = new PortalRestResponse<String>();
+ expectedData.setStatus(PortalRestStatusEnum.OK);
+ expectedData.setMessage("success");
+ expectedData.setResponse("success");
+
+ Mockito.when(searchService.saveWidgetData(commonWidget)).thenReturn("success");
+
+ PortalRestResponse<String> actualResponse = dashboardController.saveWidgetData(commonWidget);
+ assertEquals(expectedData,actualResponse);
+
+ }
+
+ @Test
+ public void deleteWidgetDataTest() throws IOException {
+
+ CommonWidget commonWidget = mockCommonWidget();
+
+ PortalRestResponse<String> expectedData = new PortalRestResponse<String>();
+ expectedData.setStatus(PortalRestStatusEnum.OK);
+ expectedData.setMessage("success");
+ expectedData.setResponse(null);
+
+ Mockito.when(searchService.saveWidgetData(commonWidget)).thenReturn("success");
+
+ PortalRestResponse<String> actualResponse = dashboardController.deleteWidgetData(commonWidget);
+ assertEquals(expectedData,actualResponse);
+
+ }
+
+ @Test
+ public void getActiveUsersTest(){
+ List<String> activeUsers = new ArrayList<>();
+ List<String> expectedUsersList = new ArrayList<>();
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ String userId = user.getOrgUserId();
+ Mockito.when(searchService.getRelatedUsers(userId)).thenReturn(activeUsers);
+ expectedUsersList= dashboardController.getActiveUsers(mockedRequest);
+ assertEquals(expectedUsersList, activeUsers);
+ }
+
+
+ @Test
+ public void getActiveUsersExceptionTest(){
+ List<String> activeUsers = new ArrayList<>();
+ List<String> expectedUsersList = new ArrayList<>();
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ String userId = user.getOrgUserId();
+ Mockito.when(searchService.getRelatedUsers(userId)).thenThrow(nullPointerException);
+ expectedUsersList = dashboardController.getActiveUsers(mockedRequest);
+ assertEquals(expectedUsersList, activeUsers);
+ }
+
+ @Test
+ public void getOnlineUserUpdateRateTest(){
+ PortalRestResponse<String> expectedData = new PortalRestResponse<String>();
+ expectedData.setStatus(PortalRestStatusEnum.OK);
+ expectedData.setMessage("success");
+ expectedData.setResponse("{onlineUserUpdateRate=1400000, onlineUserUpdateDuration=1400000}");
+
+ PowerMockito.mockStatic(SystemProperties.class);
+ PowerMockito.mockStatic(EPCommonSystemProperties.class);
+ Mockito.when(SystemProperties.getProperty(EPCommonSystemProperties.ONLINE_USER_UPDATE_RATE)).thenReturn("1400");
+ Mockito.when(SystemProperties.getProperty(EPCommonSystemProperties.ONLINE_USER_UPDATE_DURATION)).thenReturn("1400");
+
+ PortalRestResponse<Map<String, String>> actualResponse = dashboardController.getOnlineUserUpdateRate(mockedRequest);
+ assertEquals(expectedData.getStatus(),actualResponse.getStatus());
+ }
+
+ @Test
+ public void getOnlineUserUpdateRateExceptionTest(){
+ PortalRestResponse<String> expectedData = new PortalRestResponse<String>();
+ expectedData.setStatus(PortalRestStatusEnum.ERROR);
+ expectedData.setMessage("java.lang.NullPointerException");
+ expectedData.setResponse(null);
+
+ PowerMockito.mockStatic(SystemProperties.class);
+ PowerMockito.mockStatic(EPCommonSystemProperties.class);
+ Mockito.when(SystemProperties.getProperty(EPCommonSystemProperties.ONLINE_USER_UPDATE_RATE)).thenThrow(nullPointerException);
+ Mockito.when(SystemProperties.getProperty(EPCommonSystemProperties.ONLINE_USER_UPDATE_DURATION)).thenThrow(nullPointerException);
+
+ PortalRestResponse<Map<String, String>> actualResponse = dashboardController.getOnlineUserUpdateRate(mockedRequest);
+ assertEquals(expectedData,actualResponse);
+ }
+
+ @Test
+ public void getWindowWidthThresholdForRightMenuTest(){
+ PortalRestResponse<String> expectedData = new PortalRestResponse<String>();
+ expectedData.setStatus(PortalRestStatusEnum.OK);
+ expectedData.setMessage("success");
+ expectedData.setResponse("{windowWidth=1400}");
+
+ PowerMockito.mockStatic(SystemProperties.class);
+ PowerMockito.mockStatic(EPCommonSystemProperties.class);
+ Mockito.when(SystemProperties.getProperty(EPCommonSystemProperties.WINDOW_WIDTH_THRESHOLD_RIGHT_MENU)).thenReturn("1400");
+
+ PortalRestResponse<Map<String, String>> actualResponse = dashboardController.getWindowWidthThresholdForRightMenu(mockedRequest);
+ assertEquals(expectedData.getStatus(),actualResponse.getStatus());
+ }
+
+ @Test
+ public void getWindowWidthThresholdForRightMenuExceptionTest(){
+ PortalRestResponse<String> expectedData = new PortalRestResponse<String>();
+ expectedData.setStatus(PortalRestStatusEnum.ERROR);
+ expectedData.setMessage("java.lang.NullPointerException");
+ expectedData.setResponse(null);
+
+ PowerMockito.mockStatic(SystemProperties.class);
+ PowerMockito.mockStatic(EPCommonSystemProperties.class);
+ Mockito.when(SystemProperties.getProperty(EPCommonSystemProperties.WINDOW_WIDTH_THRESHOLD_RIGHT_MENU)).thenThrow(nullPointerException);
+
+ PortalRestResponse<Map<String, String>> actualResponse = dashboardController.getWindowWidthThresholdForRightMenu(mockedRequest);
+ assertEquals(expectedData,actualResponse);
+ }
+
+ @Test
+ public void getWindowWidthThresholdForLeftMenuTest(){
+ PortalRestResponse<String> expectedData = new PortalRestResponse<String>();
+ expectedData.setStatus(PortalRestStatusEnum.OK);
+ expectedData.setMessage("success");
+ expectedData.setResponse("{windowWidth=1400}");
+
+ PowerMockito.mockStatic(SystemProperties.class);
+ PowerMockito.mockStatic(EPCommonSystemProperties.class);
+ Mockito.when(SystemProperties.getProperty(EPCommonSystemProperties.WINDOW_WIDTH_THRESHOLD_LEFT_MENU)).thenReturn("1400");
+
+ PortalRestResponse<Map<String, String>> actualResponse = dashboardController.getWindowWidthThresholdForLeftMenu(mockedRequest);
+ assertEquals(expectedData.getStatus(),actualResponse.getStatus());
+ }
+
+ @Test
+ public void getWindowWidthThresholdForLeftMenuExceptionTest(){
+ PortalRestResponse<String> expectedData = new PortalRestResponse<String>();
+ expectedData.setStatus(PortalRestStatusEnum.ERROR);
+ expectedData.setMessage("java.lang.NullPointerException");
+ expectedData.setResponse(null);
+
+ PowerMockito.mockStatic(SystemProperties.class);
+ PowerMockito.mockStatic(EPCommonSystemProperties.class);
+ Mockito.when(SystemProperties.getProperty(EPCommonSystemProperties.WINDOW_WIDTH_THRESHOLD_LEFT_MENU)).thenThrow(nullPointerException);
+
+ PortalRestResponse<Map<String, String>> actualResponse = dashboardController.getWindowWidthThresholdForLeftMenu(mockedRequest);
+ assertEquals(expectedData,actualResponse);
+ }
+
+ @Test
+ public void getActiveUsersNullTest(){
+ PortalRestResponse<List<String>> expectedData = new PortalRestResponse<List<String>>();
+ expectedData.setStatus(PortalRestStatusEnum.ERROR);
+ expectedData.setMessage("User object is null? - check logs");
+ expectedData.setResponse(new ArrayList<>());
+
+ PortalRestResponse<List<String>> actualResponse = dashboardController.activeUsers(mockedRequest);
+ assertEquals(expectedData,actualResponse);
+ }
+
+ @Test
+ public void activeUsersTest(){
+ EPUser user = mockUser.mockEPUser();
+ PortalRestResponse<List<String>> expectedData = new PortalRestResponse<List<String>>();
+ expectedData.setStatus(PortalRestStatusEnum.OK);
+ expectedData.setMessage("success");
+ expectedData.setResponse(new ArrayList<>());
+ PowerMockito.mockStatic(EPUserUtils.class);
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ PortalRestResponse<List<String>> actualResponse = dashboardController.activeUsers(mockedRequest);
+ assertEquals(expectedData,actualResponse);
+ }
+
+// @Test
+// public void activeUsersExceptionTest(){
+// EPUser user = mockUser.mockEPUser();
+// user.setLoginId("test");
+// String loginId = "abc";
+// PortalRestResponse<List<String>> expectedData = new PortalRestResponse<List<String>>();
+// expectedData.setStatus(PortalRestStatusEnum.ERROR);
+// expectedData.setMessage("java.lang.NullPointerException");
+// expectedData.setResponse(null);
+//
+//// PowerMockito.mockStatic(EPUserUtils.class);
+// Mockito.when(searchService.getRelatedUsers(user.getLoginId(user.getLoginId()))).thenReturn(nullPointerException);
+// PortalRestResponse<List<String>> actualResponse = dashboardController.activeUsers(mockedRequest);
+// System.out.println(actualResponse);
+// //assertEquals(expectedData,actualResponse);
+// }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/EPFusionBaseControllerTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/EPFusionBaseControllerTest.java
new file mode 100644
index 00000000..683738b9
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/EPFusionBaseControllerTest.java
@@ -0,0 +1,64 @@
+package org.openecomp.portalapp.portal.test.controller;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.controller.EPFusionBaseController;
+import org.openecomp.portalapp.portal.controller.DashboardController;
+import org.openecomp.portalapp.portal.service.DashboardSearchService;
+import org.openecomp.portalapp.portal.service.DashboardSearchServiceImpl;
+import org.openecomp.portalapp.portal.test.core.MockEPUser;
+import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;
+import org.openecomp.portalapp.test.framework.MockitoTestSuite;
+import org.openecomp.portalapp.util.EPUserUtils;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest({EPUserUtils.class, SystemProperties.class})
+public class EPFusionBaseControllerTest {
+
+ @Mock
+ DashboardSearchService searchService = new DashboardSearchServiceImpl();
+
+ @InjectMocks
+ EPFusionBaseController epFusionBaseController; /*= mock(EPFusionBaseController.class);*/
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+
+ NullPointerException nullPointerException = new NullPointerException();
+
+ MockEPUser mockUser = new MockEPUser();
+
+ @Test
+ public void messagesTest(){
+ Map<String, Object> expectedData = new HashMap<String, Object>();
+ Map<String, Object> actualData = null;
+
+ PowerMockito.mockStatic(SystemProperties.class);
+ Mockito.when(SystemProperties.getProperty(EPCommonSystemProperties.APPLICATION_MENU_ATTRIBUTE_NAME)).then(null);
+ actualData = epFusionBaseController.messages(mockedRequest);
+ System.out.println();
+
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/ExternalAccessRolesControllerTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/ExternalAccessRolesControllerTest.java
new file mode 100644
index 00000000..d2e1b13c
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/ExternalAccessRolesControllerTest.java
@@ -0,0 +1,509 @@
+package org.openecomp.portalapp.portal.test.controller;
+
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.controller.ExternalAccessRolesController;
+import org.openecomp.portalapp.portal.domain.CentralRoleFunction;
+import org.openecomp.portalapp.portal.domain.EPApp;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.openecomp.portalapp.portal.service.ExternalAccessRolesService;
+import org.openecomp.portalapp.portal.service.ExternalAccessRolesServiceImpl;
+import org.openecomp.portalapp.portal.test.core.MockEPUser;
+import org.openecomp.portalapp.portal.transport.CentralRole;
+import org.openecomp.portalapp.test.framework.MockitoTestSuite;
+import org.openecomp.portalsdk.core.domain.AuditLog;
+import org.openecomp.portalsdk.core.domain.Role;
+import org.springframework.http.HttpStatus;
+import org.springframework.web.client.HttpClientErrorException;
+public class ExternalAccessRolesControllerTest {
+
+ @Mock
+ ExternalAccessRolesService externalAccessRolesService = new ExternalAccessRolesServiceImpl();
+
+ @InjectMocks
+ ExternalAccessRolesController externalAccessRolesController = new ExternalAccessRolesController();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+ @Mock
+ AuditLog auditLog = new AuditLog();
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+ NullPointerException nullPointerException = new NullPointerException();
+ HttpClientErrorException httpClientErrorException = new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Failed");
+
+ MockEPUser mockUser = new MockEPUser();
+ String loginId = "guestT";
+ String uebKey = "testUebKey";
+
+ @Test
+ public void getUserTest() throws Exception {
+ List<EPUser> userList = new ArrayList<>();
+ Mockito.when(externalAccessRolesService.getUser(loginId)).thenReturn(userList);
+ assertNull(externalAccessRolesController.getUser(mockedRequest, mockedResponse, loginId));
+ }
+
+ @Test
+ public void getUserExceptionTest() throws Exception {
+ Mockito.when(externalAccessRolesService.getUser(loginId))
+ .thenThrow(nullPointerException);
+ assertNull(externalAccessRolesController.getUser(mockedRequest, mockedResponse, loginId));
+ }
+
+ public EPApp mockApp()
+ {
+ EPApp app = new EPApp();
+ app.setName("Test");
+ app.setImageUrl("test");
+ app.setDescription("test");
+ app.setNotes("test");
+ app.setUrl("test");
+ app.setId((long) 1);
+ app.setAppRestEndpoint("test");
+ app.setAlternateUrl("test");
+ app.setName("test");
+ app.setMlAppName("test");
+ app.setMlAppAdminId("test");
+ app.setUsername("test");
+ app.setAppPassword("test");
+ app.setOpen(false);
+ app.setEnabled(false);
+ app.setUebKey("test");
+ app.setUebSecret("test");
+ app.setUebTopicName("test");
+ app.setAppType(1);
+ return app;
+ }
+
+ @Test
+ public void getRolesForAppTest() throws Exception {
+ List<EPApp> applicationList = new ArrayList<EPApp>();
+ List<CentralRole> answer = new ArrayList<>();
+ EPApp app = mockApp();
+ applicationList.add(app);
+ Mockito.when(externalAccessRolesService.getApp(mockedRequest.getHeader(uebKey))).thenReturn(applicationList);
+ Mockito.doNothing().when(externalAccessRolesService).syncApplicationRolesWithEcompDB(app);
+ Mockito.when(externalAccessRolesService.getRolesForApp(mockedRequest.getHeader(uebKey))).thenReturn(answer);
+ assertEquals(externalAccessRolesController.getRolesForApp(mockedRequest, mockedResponse), answer);
+ }
+
+ @Test
+ public void getRolesForAppExceptionTest() throws Exception {
+ List<EPApp> applicationList = new ArrayList<EPApp>();
+ List<CentralRole> answer = new ArrayList<>();
+ EPApp app = mockApp();
+ applicationList.add(app);
+ Mockito.when(externalAccessRolesService.getApp(mockedRequest.getHeader(uebKey))).thenReturn(applicationList);
+ Mockito.doNothing().when(externalAccessRolesService).syncApplicationRolesWithEcompDB(app);
+ Mockito.when(externalAccessRolesService.getRolesForApp(mockedRequest.getHeader(uebKey)))
+ .thenThrow(httpClientErrorException);
+ assertNull(externalAccessRolesController.getRolesForApp(mockedRequest, mockedResponse));
+ }
+
+ @Test
+ public void getRoleFunctionsListTest() throws Exception {
+ List<CentralRoleFunction> answer = new ArrayList<>();
+ Mockito.when(externalAccessRolesService.getRoleFuncList(mockedRequest.getHeader(uebKey))).thenReturn(answer);
+ assertEquals(externalAccessRolesController.getRoleFunctionsList(mockedRequest, mockedResponse), answer);
+ }
+
+ @Test
+ public void getRoleFunctionsListExceptionTest() throws Exception {
+ Mockito.when(externalAccessRolesService.getRoleFuncList(mockedRequest.getHeader(uebKey)))
+ .thenThrow(httpClientErrorException);
+ assertNull(externalAccessRolesController.getRoleFunctionsList(mockedRequest, mockedResponse));
+ }
+
+ @Test
+ public void getRoleInfoTest() throws Exception {
+ CentralRole answer = new CentralRole();
+ long roleId = 1;
+ Mockito.when(externalAccessRolesService.getRoleInfo(roleId, mockedRequest.getHeader(uebKey)))
+ .thenReturn(answer);
+ assertEquals(externalAccessRolesController.getRoleInfo(mockedRequest, mockedResponse, roleId), answer);
+ }
+
+ @Test
+ public void getRoleInfoExceptionTest() throws Exception {
+ long roleId = 1;
+ Mockito.when(externalAccessRolesService.getRoleInfo(roleId, mockedRequest.getHeader(uebKey)))
+ .thenThrow(httpClientErrorException);
+ assertNull(externalAccessRolesController.getRoleInfo(mockedRequest, mockedResponse, roleId));
+ }
+
+ @Test
+ public void getRoleFunctionTest() throws Exception {
+ CentralRoleFunction centralRoleFunction = new CentralRoleFunction();
+ String code = "test_menu";
+ Mockito.when(externalAccessRolesService.getRoleFunction(code, mockedRequest.getHeader(uebKey)))
+ .thenReturn(centralRoleFunction);
+ assertEquals(externalAccessRolesController.getRoleFunction(mockedRequest, mockedResponse, code),
+ centralRoleFunction);
+ }
+
+ @Test
+ public void getRoleFunctionExceptionTest() throws Exception {
+ String code = "test_menu";
+ Mockito.when(externalAccessRolesService.getRoleFunction(code, mockedRequest.getHeader(uebKey)))
+ .thenThrow(httpClientErrorException);
+ assertNull(externalAccessRolesController.getRoleFunction(mockedRequest, mockedResponse, code));
+ }
+
+ @Test
+ public void saveRoleFunctionIfIsIsNotDeletedTest() throws Exception {
+ List<EPApp> applicationList = new ArrayList<EPApp>();
+ EPApp app = mockApp();
+ applicationList.add(app);
+ Mockito.when(externalAccessRolesService.getApp(mockedRequest.getHeader(uebKey))).thenReturn(applicationList);
+ PortalRestResponse<String> portalRestResponse = null;
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage(null);
+ expectedportalRestResponse.setResponse("Failed");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ String data = null;
+ CentralRoleFunction centralRoleFunction = new CentralRoleFunction();
+ Mockito.when(externalAccessRolesService.saveCentralRoleFunction(centralRoleFunction, app)).thenReturn(false);
+ portalRestResponse = externalAccessRolesController.saveRoleFunction(mockedRequest, mockedResponse, data);
+ assertEquals(portalRestResponse, expectedportalRestResponse);
+ }
+
+ @Test
+ public void saveRoleFunctionExceptionTest() throws Exception {
+ List<EPApp> applicationList = new ArrayList<EPApp>();
+ EPApp app = mockApp();
+ applicationList.add(app);
+ Mockito.when(externalAccessRolesService.getApp(mockedRequest.getHeader(uebKey))).thenReturn(applicationList);
+ PortalRestResponse<String> portalRestResponse = null;
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage(null);
+ expectedportalRestResponse.setResponse("Failed");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ String data = null;
+ CentralRoleFunction centralRoleFunction = new CentralRoleFunction();
+ Mockito.when(externalAccessRolesService.saveCentralRoleFunction(centralRoleFunction, app)).thenThrow(nullPointerException);
+ portalRestResponse = externalAccessRolesController.saveRoleFunction(mockedRequest, mockedResponse, data);
+ System.out.println(portalRestResponse);
+ assertEquals(portalRestResponse, expectedportalRestResponse);
+ }
+
+ @Test
+ public void saveRoleFunctionTest() throws Exception {
+ List<EPApp> applicationList = new ArrayList<EPApp>();
+ List<CentralRole> answer = new ArrayList<>();
+ EPApp app = mockApp();
+ applicationList.add(app);
+ Mockito.when(externalAccessRolesService.getApp(mockedRequest.getHeader(uebKey))).thenReturn(applicationList);
+ PortalRestResponse<String> portalRestResponse = null;
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage(null);
+ expectedportalRestResponse.setResponse("Failed");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ String data = null;
+ CentralRoleFunction centralRoleFunction = new CentralRoleFunction();
+ Mockito.when(externalAccessRolesService.saveCentralRoleFunction(centralRoleFunction, app)).thenReturn(true);
+ portalRestResponse = externalAccessRolesController.saveRoleFunction(mockedRequest, mockedResponse, data);
+ System.out.println(portalRestResponse);
+ assertEquals(portalRestResponse, expectedportalRestResponse);
+ }
+
+// @Test
+// public void deleteRoleFunctionTest() throws Exception {
+// PortalRestResponse<String> portalRestResponse = null;
+// PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+// expectedportalRestResponse.setMessage("Successfully Deleted");
+// expectedportalRestResponse.setResponse("Success");
+// PortalRestStatusEnum portalRestStatusEnum = null;
+// EPUser user = mockUser.mockEPUser();
+// EPApp app = mockApp();
+// expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
+// String code ="testNew";
+// Mockito.when(externalAccessRolesService.getUser(mockedRequest.getHeader("LOGIN_ID"))).thenReturn((List<EPUser>) user);
+// Mockito.when(externalAccessRolesService.getApp(mockedRequest.getHeader("UEBKEY")).get(0)).thenReturn(app);
+// Mockito.when(externalAccessRolesService.deleteCentralRoleFunction(code, app)).thenReturn(true);
+// portalRestResponse = externalAccessRolesController.deleteRoleFunction(mockedRequest, mockedResponse, code);
+// assertEquals(portalRestResponse, expectedportalRestResponse);
+// }
+
+ @Test
+ public void getActiveRolesTest() throws Exception {
+ List<CentralRole> cenRole = new ArrayList<>();
+ Mockito.when(externalAccessRolesService.getActiveRoles(mockedRequest.getHeader(uebKey))).thenReturn(cenRole);
+ List<CentralRole> expectedCenRole = externalAccessRolesController.getActiveRoles(mockedRequest, mockedResponse);
+ assertEquals(expectedCenRole, cenRole);
+ }
+
+ @Test
+ public void getActiveRolesExceptionTest() throws Exception {
+ Mockito.when(externalAccessRolesService.getActiveRoles(mockedRequest.getHeader(uebKey)))
+ .thenThrow(httpClientErrorException);
+ assertNull(externalAccessRolesController.getActiveRoles(mockedRequest, mockedResponse));
+ }
+
+ @Test
+ public void deleteDependcyRoleRecordExceptionTest() throws Exception {
+ PortalRestResponse<String> portalRestResponse = null;
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("Failed to deleteDependencyRoleRecord");
+ expectedportalRestResponse.setResponse("Failed");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ long roleId = 123;
+ portalRestResponse = externalAccessRolesController.deleteDependencyRoleRecord(mockedRequest, mockedResponse, roleId);
+ assertEquals(expectedportalRestResponse, portalRestResponse);
+ }
+
+ @Test
+ public void bulkUploadFunctionsTest() throws Exception {
+ Integer result = 0;
+ Mockito.when(externalAccessRolesService.bulkUploadFunctions(mockedRequest.getHeader(uebKey)))
+ .thenReturn(result);
+ PortalRestResponse<String> portalRestResponse = null;
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("Successfully added: 0");
+ expectedportalRestResponse.setResponse("Success");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
+ portalRestResponse = externalAccessRolesController.bulkUploadFunctions(mockedRequest, mockedResponse);
+ assertEquals(portalRestResponse, expectedportalRestResponse);
+ }
+
+ @Test
+ public void bulkUploadFunctionsExceptionTest() throws Exception {
+ Mockito.when(externalAccessRolesService.bulkUploadFunctions(mockedRequest.getHeader(uebKey)))
+ .thenThrow(httpClientErrorException);
+ PortalRestResponse<String> portalRestResponse = null;
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("Failed to bulkUploadFunctions");
+ expectedportalRestResponse.setResponse("Failed");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ portalRestResponse = externalAccessRolesController.bulkUploadFunctions(mockedRequest, mockedResponse);
+ assertEquals(portalRestResponse, expectedportalRestResponse);
+ }
+
+ @Test
+ public void bulkUploadRolesTest() throws Exception {
+ Integer result = 0;
+ PortalRestResponse<String> portalRestResponse = null;
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("Successfully added: 0");
+ expectedportalRestResponse.setResponse("Success");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
+ Mockito.when(externalAccessRolesService.bulkUploadRoles(mockedRequest.getHeader(uebKey))).thenReturn(result);
+ portalRestResponse = externalAccessRolesController.bulkUploadRoles(mockedRequest, mockedResponse);
+ assertEquals(portalRestResponse, expectedportalRestResponse);
+ }
+
+ @Test
+ public void bulkUploadRolesTestException() throws Exception {
+ Mockito.when(externalAccessRolesService.bulkUploadRoles(mockedRequest.getHeader(uebKey)))
+ .thenThrow(httpClientErrorException);
+ PortalRestResponse<String> portalRestResponse = null;
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("Failed to bulkUploadRoles");
+ expectedportalRestResponse.setResponse("Failed");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ portalRestResponse = externalAccessRolesController.bulkUploadRoles(mockedRequest, mockedResponse);
+ assertEquals(portalRestResponse, expectedportalRestResponse);
+ }
+
+ @Test
+ public void bulkUploadRoleFunctionsTest() throws Exception {
+ Integer result = 0;
+ PortalRestResponse<String> portalRestResponse = null;
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("Successfully added: 0");
+ expectedportalRestResponse.setResponse("Success");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
+ Mockito.when(externalAccessRolesService.bulkUploadRolesFunctions(mockedRequest.getHeader(uebKey)))
+ .thenReturn(result);
+ portalRestResponse = externalAccessRolesController.bulkUploadRoleFunctions(mockedRequest, mockedResponse);
+ assertEquals(portalRestResponse, expectedportalRestResponse);
+ }
+
+ @Test
+ public void bulkUploadRoleFunctionsException() throws Exception {
+ Mockito.when(externalAccessRolesService.bulkUploadRolesFunctions(mockedRequest.getHeader(uebKey)))
+ .thenThrow(httpClientErrorException);
+ PortalRestResponse<String> portalRestResponse = null;
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("Failed to bulkUploadRoleFunctions");
+ expectedportalRestResponse.setResponse("Failed");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ portalRestResponse = externalAccessRolesController.bulkUploadRoleFunctions(mockedRequest, mockedResponse);
+ assertEquals(portalRestResponse, expectedportalRestResponse);
+ }
+
+ @Test
+ public void bulkUploadUserRolesTest() throws Exception {
+ Integer result = 0;
+ PortalRestResponse<String> portalRestResponse = null;
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("Successfully added: 0");
+ expectedportalRestResponse.setResponse("Success");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
+ Mockito.when(externalAccessRolesService.bulkUploadUserRoles(mockedRequest.getHeader(uebKey)))
+ .thenReturn(result);
+ portalRestResponse = externalAccessRolesController.bulkUploadUserRoles(mockedRequest, mockedResponse);
+ assertEquals(portalRestResponse, expectedportalRestResponse);
+ }
+
+ @Test
+ public void bulkUploadUserRolesExceptionTest() throws Exception {
+ Mockito.when(externalAccessRolesService.bulkUploadUserRoles(mockedRequest.getHeader(uebKey)))
+ .thenThrow(httpClientErrorException);
+ PortalRestResponse<String> portalRestResponse = null;
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("Failed to bulkUploadUserRoles");
+ expectedportalRestResponse.setResponse("Failed");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ portalRestResponse = externalAccessRolesController.bulkUploadUserRoles(mockedRequest, mockedResponse);
+ assertEquals(portalRestResponse, expectedportalRestResponse);
+ }
+
+ @Test
+ public void bulkUploadPartnerFunctionsTest() throws Exception {
+ PortalRestResponse<String> portalRestResponse = null;
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("Successfully added");
+ expectedportalRestResponse.setResponse("Success");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
+ portalRestResponse = externalAccessRolesController.bulkUploadPartnerFunctions(mockedRequest, mockedResponse, null);
+ assertEquals(portalRestResponse, expectedportalRestResponse);
+ }
+
+
+ @Test
+ public void bulkUploadPartnerRolesTest() throws Exception {
+ PortalRestResponse<String> portalRestResponse = null;
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("Successfully added");
+ expectedportalRestResponse.setResponse("Success");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
+ List<Role> upload = new ArrayList<>();
+ portalRestResponse = externalAccessRolesController.bulkUploadPartnerRoles(mockedRequest, mockedResponse,
+ upload);
+ assertEquals(portalRestResponse, expectedportalRestResponse);
+ }
+
+ @Test
+ public void bulkUploadPartnerRolesExceptionTest() throws Exception
+ {
+ ExternalAccessRolesService externalAccessRolesService = null;
+ PortalRestResponse<String> portalRestResponse = null;
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("Successfully added");
+ expectedportalRestResponse.setResponse("Success");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
+ List<Role> upload = new ArrayList<>();
+ portalRestResponse = externalAccessRolesController.bulkUploadPartnerRoles(mockedRequest, mockedResponse,
+ upload);
+ assertEquals(portalRestResponse, expectedportalRestResponse);
+ }
+
+ @Test
+ public void getMenuFunctionsTest() throws Exception {
+ List<String> functionsList = new ArrayList<>();
+ Mockito.when(externalAccessRolesService.getMenuFunctionsList(mockedRequest.getHeader(uebKey)))
+ .thenReturn(functionsList);
+ List<String> expectedFunctionsList = externalAccessRolesController.getMenuFunctions(mockedRequest,
+ mockedResponse);
+ assertEquals(functionsList, expectedFunctionsList);
+ }
+
+ @Test
+ public void getMenuFunctionsExceptionTest() throws Exception {
+ Mockito.when(externalAccessRolesService.getMenuFunctionsList(mockedRequest.getHeader(uebKey)))
+ .thenThrow(httpClientErrorException);
+ assertNull(externalAccessRolesController.getMenuFunctions(mockedRequest, mockedResponse));
+ }
+
+// @Test
+// public void getUsersOfApplicationTest() throws Exception {
+// List<String> users = new ArrayList<>();
+// Mockito.when(externalAccessRolesService.getAllUsers(mockedRequest.getHeader(uebKey))).thenReturn(users);
+// List<String> expectedusers = externalAccessRolesController.getUsersOfApplication(mockedRequest, mockedResponse);
+// assertEquals(users, expectedusers);
+// }
+
+// @Test
+// public void getUsersOfApplicationExceptionTest() throws Exception {
+// Mockito.when(externalAccessRolesService.getAllUsers(mockedRequest.getHeader(uebKey)))
+// .thenThrow(httpClientErrorException);
+// assertNull(externalAccessRolesController.getUsersOfApplication(mockedRequest, mockedResponse));
+// }
+
+ @Test
+ public void saveRoleExceptionTest() throws Exception {
+ Role role = new Role();
+ PortalRestResponse<String> portalRestResponse = null;
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("Failed to saveRole");
+ expectedportalRestResponse.setResponse("Failed");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ List<Role> upload = new ArrayList<>();
+ portalRestResponse = externalAccessRolesController.saveRole(mockedRequest, mockedResponse,role);
+ assertEquals(portalRestResponse, expectedportalRestResponse);
+ }
+
+ @Test
+ public void deleteRoleExceptionTest() throws Exception {
+ String role = "TestNew";
+ PortalRestResponse<String> portalRestResponse = null;
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("Failed to deleteRole for 'TestNew'");
+ expectedportalRestResponse.setResponse("Failed");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ portalRestResponse = externalAccessRolesController.deleteRole(mockedRequest, mockedResponse,role);
+ assertEquals(portalRestResponse, expectedportalRestResponse);
+ }
+
+
+ @Test
+ public void bulkUploadPartnerRoleFunctionsTest() throws Exception {
+ PortalRestResponse<String> portalRestResponse = null;
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("Successfully added");
+ expectedportalRestResponse.setResponse("Success");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
+ List<Role> upload = new ArrayList<>();
+ portalRestResponse = externalAccessRolesController.bulkUploadPartnerRoleFunctions(mockedRequest, mockedResponse,upload);
+ assertEquals(portalRestResponse, expectedportalRestResponse);
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/FunctionalMenuControllerTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/FunctionalMenuControllerTest.java
index 6e1b5d1c..03e2107a 100644
--- a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/FunctionalMenuControllerTest.java
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/FunctionalMenuControllerTest.java
@@ -40,21 +40,32 @@ import org.mockito.MockitoAnnotations;
import org.mockito.runners.MockitoJUnitRunner;
import org.openecomp.portalapp.portal.controller.FunctionalMenuController;
import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
import org.openecomp.portalapp.portal.service.AdminRolesService;
import org.openecomp.portalapp.portal.service.AdminRolesServiceImpl;
import org.openecomp.portalapp.portal.service.FunctionalMenuService;
import org.openecomp.portalapp.portal.service.FunctionalMenuServiceImpl;
+import org.openecomp.portalapp.portal.service.SearchService;
import org.openecomp.portalapp.portal.test.core.MockEPUser;
import org.openecomp.portalapp.portal.test.framework.MockitoTestSuite;
import org.openecomp.portalapp.portal.transport.BusinessCardApplicationRole;
import org.openecomp.portalapp.portal.transport.BusinessCardApplicationRolesList;
+import org.openecomp.portalapp.portal.transport.FavoritesFunctionalMenuItem;
+import org.openecomp.portalapp.portal.transport.FavoritesFunctionalMenuItemJson;
import org.openecomp.portalapp.portal.transport.FieldsValidator;
import org.openecomp.portalapp.portal.transport.FieldsValidator.FieldName;
+import org.openecomp.portalapp.portal.transport.FunctionalMenuItem;
+import org.openecomp.portalapp.portal.transport.FunctionalMenuItemWithRoles;
import org.openecomp.portalapp.util.EPUserUtils;
import org.openecomp.portalsdk.core.service.DataAccessService;
import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
-@RunWith(MockitoJUnitRunner.class)
+@RunWith(PowerMockRunner.class)
+@PrepareForTest(SystemProperties.class)
public class FunctionalMenuControllerTest extends MockitoTestSuite {
String userid = "ab1234";
@@ -67,6 +78,9 @@ public class FunctionalMenuControllerTest extends MockitoTestSuite {
@Mock
private DataAccessService dataAccessService;
+
+ @Mock
+ SearchService searchService;
@Mock
AdminRolesService adminRolesService = new AdminRolesServiceImpl();
@@ -184,5 +198,309 @@ public class FunctionalMenuControllerTest extends MockitoTestSuite {
acutualFieldValidator = functionalMenuController.regenerateAncestorTable(mockedRequest, mockedResponse);
assertTrue(acutualFieldValidator.equals(expectedFieldValidator));
}
+
+ @Test
+ public void getFunctionalMenuStaticInfoExceptionTest(){
+ String fnMenuStaticactualResponse = null;
+ String fnMenuStaticexpectedResponse = null;
+ String orgUserIdStr = null;
+
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(searchService.searchUserByUserId(orgUserIdStr)).thenReturn(user);
+ fnMenuStaticactualResponse = functionalMenuController.getFunctionalMenuStaticInfo(mockedRequest, mockedResponse);
+
+ assertEquals(fnMenuStaticactualResponse, fnMenuStaticexpectedResponse);
+
+ }
+
+ @Test
+ public void getFunctionalMenuStaticInfoTest(){
+ String fnMenuStaticactualResponse = null;
+ String fnMenuStaticexpectedResponse = "{\"firstName\":\"test\",\"lastName\":\"test\",\"last_login\":\"09/08/2017 03:48:13-0400\",\"userId\":\"guestT\",\"email\":\"test\"}";
+ String orgUserIdStr = null;
+
+ EPUser user = mockUser.mockEPUser();
+ user.setEmail("test");
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(searchService.searchUserByUserId(orgUserIdStr)).thenReturn(user);
+ fnMenuStaticactualResponse = functionalMenuController.getFunctionalMenuStaticInfo(mockedRequest, mockedResponse);
+ assertEquals(fnMenuStaticactualResponse.length(), fnMenuStaticexpectedResponse.length());
+ }
+
+ @Test
+ public void getMenuItemsForAuthUserNullTest(){
+ List<FunctionalMenuItem> actualmenuItems = null;
+ List<FunctionalMenuItem> expectedmenuItems = null;
+
+ actualmenuItems = functionalMenuController.getMenuItemsForAuthUser(mockedRequest, mockedResponse);
+ assertEquals(actualmenuItems, expectedmenuItems);
+ }
+
+ @Test
+ public void getMenuItemsForAuthUserIsSuperAdminTest(){
+ List<FunctionalMenuItem> actualmenuItems = null;
+ List<FunctionalMenuItem> expectedmenuItems = new ArrayList<FunctionalMenuItem>();
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+
+ actualmenuItems = functionalMenuController.getMenuItemsForAuthUser(mockedRequest, mockedResponse);
+ assertEquals(actualmenuItems, expectedmenuItems);
+ }
+ @Test
+ public void getMenuItemsForAuthUserTest(){
+ List<FunctionalMenuItem> actualmenuItems = null;
+ List<FunctionalMenuItem> expectedmenuItems = new ArrayList<FunctionalMenuItem>();
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+
+ actualmenuItems = functionalMenuController.getMenuItemsForAuthUser(mockedRequest, mockedResponse);
+ assertEquals(actualmenuItems, expectedmenuItems);
+ }
+
+ @Test
+ public void getFunctionalMenuItemDetailsBadPermissionTest(){
+ Integer menuId = 1234;
+ FunctionalMenuItem actualmenuItem = null;
+ FunctionalMenuItem expectedmenuItem = null;
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+
+ actualmenuItem = functionalMenuController.getFunctionalMenuItemDetails(mockedRequest, menuId, mockedResponse);
+ assertEquals(actualmenuItem, expectedmenuItem);
+ }
+
+ @Test
+ public void getFunctionalMenuItemDetailsTest(){
+ Integer menuId = 1234;
+ FunctionalMenuItem actualmenuItem = null;
+ FunctionalMenuItem expectedmenuItem = null;
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(functionalMenuService.getFunctionalMenuItemDetails(menuId)).thenReturn(actualmenuItem);
+
+ actualmenuItem = functionalMenuController.getFunctionalMenuItemDetails(mockedRequest, menuId, mockedResponse);
+ assertEquals(actualmenuItem, expectedmenuItem);
+ }
+
+ @Test
+ public void getMenuItemsForEditingTest(){
+ List<FunctionalMenuItem> actualMenuItems = null;
+ List<FunctionalMenuItem> expectedMenuItems = null;
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(functionalMenuService.getFunctionalMenuItems(true)).thenReturn(actualMenuItems);
+
+ actualMenuItems = functionalMenuController.getMenuItemsForEditing(mockedRequest, mockedResponse);
+ assertEquals(actualMenuItems, expectedMenuItems);
+ }
+
+ @Test
+ public void getMenuItemsForEditingBadPermissionsTest(){
+ List<FunctionalMenuItem> actualMenuItems = null;
+ List<FunctionalMenuItem> expectedMenuItems = null;
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(functionalMenuService.getFunctionalMenuItems(true)).thenReturn(actualMenuItems);
+
+ actualMenuItems = functionalMenuController.getMenuItemsForEditing(mockedRequest, mockedResponse);
+ assertEquals(actualMenuItems, expectedMenuItems);
+ }
+
+ @Test
+ public void getMenuItemsForNotificationsTest(){
+ List<FunctionalMenuItem> actualMenuItems = null;
+ List<FunctionalMenuItem> expectedMenuItems = new ArrayList<FunctionalMenuItem>();
+ Mockito.when(functionalMenuService.getFunctionalMenuItemsForNotificationTree(false)).thenReturn(actualMenuItems);
+
+ actualMenuItems = functionalMenuController.getMenuItemsForNotifications(mockedRequest, mockedResponse);
+ assertEquals(actualMenuItems, expectedMenuItems);
+ }
+
+ @Test
+ public void getMenuItemsForAppTest(){
+ Integer appId = 1234;
+ List<FunctionalMenuItem> actualMenuItems = null;
+ List<FunctionalMenuItem> expectedMenuItems = null;
+ Mockito.when(functionalMenuService.getFunctionalMenuItemsForApp(appId)).thenReturn(actualMenuItems);
+
+ actualMenuItems = functionalMenuController.getMenuItemsForApp(mockedRequest, appId);
+ assertEquals(actualMenuItems, expectedMenuItems);
+ }
+
+ @Test
+ public void getMenuItemsForUserTest(){
+ String orgUserId ="test";
+ List<FunctionalMenuItem> actualMenuItems = null;
+ List<FunctionalMenuItem> expectedMenuItems = null;
+ Mockito.when(functionalMenuService.getFunctionalMenuItemsForUser(orgUserId)).thenReturn(actualMenuItems);
+
+ actualMenuItems = functionalMenuController.getMenuItemsForUser(mockedRequest, orgUserId);
+ assertEquals(actualMenuItems, expectedMenuItems);
+ }
+
+ @Test
+ public void createFunctionalMenuItemTest(){
+ FieldsValidator actualFieldsValidator = new FieldsValidator();
+ FieldsValidator expectedFieldsValidator = new FieldsValidator();
+ List<FieldName> fields = new ArrayList<>();
+ expectedFieldsValidator.setHttpStatusCode((long) 200);
+ expectedFieldsValidator.setFields(fields);
+ expectedFieldsValidator.setErrorCode(null);
+ FunctionalMenuItemWithRoles menuItemJson = new FunctionalMenuItemWithRoles();
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ Mockito.when(functionalMenuService.createFunctionalMenuItem(menuItemJson)).thenReturn(expectedFieldsValidator);
+ actualFieldsValidator = functionalMenuController.createFunctionalMenuItem(mockedRequest, menuItemJson, mockedResponse);
+ assertEquals(actualFieldsValidator, expectedFieldsValidator);
+ }
+
+ @Test
+ public void createFunctionalMenuItemBadPermisssionsTest(){
+ FieldsValidator actualFieldsValidator = null;
+ FieldsValidator expectedFieldsValidator = null;
+ FunctionalMenuItemWithRoles menuItemJson = new FunctionalMenuItemWithRoles();
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+ Mockito.when(functionalMenuService.createFunctionalMenuItem(menuItemJson)).thenReturn(expectedFieldsValidator);
+ actualFieldsValidator = functionalMenuController.createFunctionalMenuItem(mockedRequest, menuItemJson, mockedResponse);
+ assertEquals(actualFieldsValidator, expectedFieldsValidator);
+ }
+
+ @Test
+ public void getFavoritesForUserTest(){
+ List<FavoritesFunctionalMenuItemJson> actualFavoritesFunctionalMenuItemsJson = null;
+ List<FavoritesFunctionalMenuItemJson> expectedFunctionalMenuItemsJson = new ArrayList<FavoritesFunctionalMenuItemJson>();
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+ Mockito.when(functionalMenuService.getFavoriteItems(user.getId())).thenReturn(expectedFunctionalMenuItemsJson);
+ actualFavoritesFunctionalMenuItemsJson = functionalMenuController.getFavoritesForUser(mockedRequest, mockedResponse);
+ assertEquals(actualFavoritesFunctionalMenuItemsJson, expectedFunctionalMenuItemsJson);
+ }
+
+ @Test
+ public void deleteFavoriteItemTest(){
+ Long userId = (long)1;
+ Long menuId = (long)1;
+ FieldsValidator actualFieldsValidator = new FieldsValidator();
+ FieldsValidator expectedFieldsValidator = new FieldsValidator();
+ List<FieldName> fields = new ArrayList<>();
+ expectedFieldsValidator.setHttpStatusCode((long) 200);
+ expectedFieldsValidator.setFields(fields);
+ expectedFieldsValidator.setErrorCode(null);
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(functionalMenuService.removeFavoriteItem(user.getId(), menuId)).thenReturn(actualFieldsValidator);
+ actualFieldsValidator = functionalMenuController.deleteFavoriteItem(mockedRequest, menuId, mockedResponse);
+ assertEquals(actualFieldsValidator, expectedFieldsValidator);
+ }
+
+ @Test
+ public void addFavoriteItemTest(){
+ FavoritesFunctionalMenuItem menuItemJson = new FavoritesFunctionalMenuItem();
+ FieldsValidator actualFieldsValidator = new FieldsValidator();
+ FieldsValidator expectedFieldsValidator = new FieldsValidator();
+ List<FieldName> fields = new ArrayList<>();
+ expectedFieldsValidator.setHttpStatusCode((long) 200);
+ expectedFieldsValidator.setFields(fields);
+ expectedFieldsValidator.setErrorCode(null);
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(functionalMenuService.setFavoriteItem(menuItemJson)).thenReturn(actualFieldsValidator);
+ actualFieldsValidator = functionalMenuController.addFavoriteItem(mockedRequest, menuItemJson, mockedResponse);
+ assertEquals(actualFieldsValidator, expectedFieldsValidator);
+ }
+
+ @Test
+ public void getMenuItemsTest(){
+ List<FunctionalMenuItem> actualFunctionalMenuItems = new ArrayList<FunctionalMenuItem>();
+ List<FunctionalMenuItem> expectedFunctionalMenuItems = new ArrayList<FunctionalMenuItem>();
+ List<FunctionalMenuItem> menuItems = new ArrayList<FunctionalMenuItem>();
+ Mockito.when(functionalMenuService.getFunctionalMenuItems()).thenReturn(menuItems);
+ actualFunctionalMenuItems = functionalMenuController.getMenuItems(mockedRequest, mockedResponse);
+ assertEquals(actualFunctionalMenuItems, expectedFunctionalMenuItems);
+ }
+
+ @Test
+ public void deleteFunctionalMenuItemTest(){
+ Long menuId = (long)1;
+ FieldsValidator actualFieldsValidator = new FieldsValidator();
+ FieldsValidator expectedFieldsValidator = new FieldsValidator();
+ List<FieldName> fields = new ArrayList<>();
+ expectedFieldsValidator.setHttpStatusCode((long) 200);
+ expectedFieldsValidator.setFields(fields);
+ expectedFieldsValidator.setErrorCode(null);
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ Mockito.when(functionalMenuService.deleteFunctionalMenuItem(menuId)).thenReturn(actualFieldsValidator);
+ actualFieldsValidator = functionalMenuController.deleteFunctionalMenuItem(mockedRequest, menuId, mockedResponse);
+ assertEquals(actualFieldsValidator, expectedFieldsValidator);
+ }
+
+ @Test
+ public void deleteFunctionalMenuItemBadPermissionsTest(){
+ Long menuId = (long)1;
+ FieldsValidator actualFieldsValidator = null;
+ FieldsValidator expectedFieldsValidator = null;
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+ Mockito.when(functionalMenuService.deleteFunctionalMenuItem(menuId)).thenReturn(actualFieldsValidator);
+ actualFieldsValidator = functionalMenuController.deleteFunctionalMenuItem(mockedRequest, menuId, mockedResponse);
+ assertEquals(actualFieldsValidator, expectedFieldsValidator);
+ }
+
+ @Test
+ public void editFunctionalMenuItemTest(){
+ FunctionalMenuItemWithRoles menuItemJson = new FunctionalMenuItemWithRoles();
+ FieldsValidator actualFieldsValidator = new FieldsValidator();
+ FieldsValidator expectedFieldsValidator = new FieldsValidator();
+ List<FieldName> fields = new ArrayList<>();
+ expectedFieldsValidator.setHttpStatusCode((long) 200);
+ expectedFieldsValidator.setFields(fields);
+ expectedFieldsValidator.setErrorCode(null);
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ Mockito.when(functionalMenuService.editFunctionalMenuItem(menuItemJson)).thenReturn(actualFieldsValidator);
+ actualFieldsValidator = functionalMenuController.editFunctionalMenuItem(mockedRequest, menuItemJson, mockedResponse);
+ assertEquals(actualFieldsValidator, expectedFieldsValidator);
+ }
+
+ @Test
+ public void editFunctionalMenuItemBadPermissionsTest(){
+ FunctionalMenuItemWithRoles menuItemJson = new FunctionalMenuItemWithRoles();
+ FieldsValidator actualFieldsValidator = null;
+ FieldsValidator expectedFieldsValidator = null;
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+ Mockito.when(functionalMenuService.editFunctionalMenuItem(menuItemJson)).thenReturn(actualFieldsValidator);
+ actualFieldsValidator = functionalMenuController.editFunctionalMenuItem(mockedRequest, menuItemJson, mockedResponse);
+ assertEquals(actualFieldsValidator, expectedFieldsValidator);
+ }
+
+ @Test
+ public void getECOMPTitleTest(){
+ PortalRestResponse<String> actualportalRestResponse = null;
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setStatus(PortalRestStatusEnum.OK);
+ expectedportalRestResponse.setMessage("success");
+ expectedportalRestResponse.setResponse("Portal");
+ PowerMockito.mockStatic(SystemProperties.class);
+ Mockito.when(SystemProperties.getProperty(SystemProperties.APP_DISPLAY_NAME)).thenReturn("Portal");
+ actualportalRestResponse = functionalMenuController.getECOMPTitle(mockedRequest, mockedResponse);
+ assertEquals(actualportalRestResponse, expectedportalRestResponse);
+ }
+
}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/MicroserviceControllerTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/MicroserviceControllerTest.java
index 567446ee..765de291 100644
--- a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/MicroserviceControllerTest.java
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/MicroserviceControllerTest.java
@@ -80,8 +80,7 @@ public class MicroserviceControllerTest extends MockitoTestSuite{
PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
expectedportalRestResponse.setMessage("FAILURE");
expectedportalRestResponse.setResponse("MicroserviceData cannot be null or empty");
- PortalRestStatusEnum portalRestStatusEnum = null;
- expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ expectedportalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
MicroserviceData microserviceData = null;
PortalRestResponse<String> actualportalRestResponse = microserviceController.createMicroservice(mockedRequest,
mockedResponse, microserviceData);
@@ -93,8 +92,7 @@ public class MicroserviceControllerTest extends MockitoTestSuite{
PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
expectedportalRestResponse.setMessage("SUCCESS");
expectedportalRestResponse.setResponse("");
- PortalRestStatusEnum portalRestStatusEnum = null;
- expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
+ expectedportalRestResponse.setStatus(PortalRestStatusEnum.OK);
PortalRestResponse<String> actualportalRestResponse = microserviceController.createMicroservice(mockedRequest,
mockedResponse, microserviceData);
assertEquals(actualportalRestResponse, expectedportalRestResponse);
@@ -105,8 +103,7 @@ public class MicroserviceControllerTest extends MockitoTestSuite{
PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
expectedportalRestResponse.setMessage("FAILURE");
expectedportalRestResponse.setResponse(null);
- PortalRestStatusEnum portalRestStatusEnum = null;
- expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ expectedportalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
Mockito.when(microserviceService.saveMicroservice(microserviceData)).thenReturn((long) 1);
Mockito.when(microserviceData.getParameterList()).thenThrow(nullPointerException);
PortalRestResponse<String> actualportalRestResponse = microserviceController.createMicroservice(mockedRequest,
@@ -126,8 +123,7 @@ public class MicroserviceControllerTest extends MockitoTestSuite{
PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
expectedportalRestResponse.setMessage("FAILURE");
expectedportalRestResponse.setResponse("MicroserviceData cannot be null or empty");
- PortalRestStatusEnum portalRestStatusEnum = null;
- expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ expectedportalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
MicroserviceData microserviceData = null;
PortalRestResponse<String> actualportalRestResponse = microserviceController.updateMicroservice(mockedRequest,
mockedResponse, 1, microserviceData);
@@ -139,8 +135,7 @@ public class MicroserviceControllerTest extends MockitoTestSuite{
PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
expectedportalRestResponse.setMessage("SUCCESS");
expectedportalRestResponse.setResponse("");
- PortalRestStatusEnum portalRestStatusEnum = null;
- expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
+ expectedportalRestResponse.setStatus(PortalRestStatusEnum.OK);
PortalRestResponse<String> actualportalRestResponse = microserviceController.updateMicroservice(mockedRequest,
mockedResponse, 1, microserviceData);
assertEquals(actualportalRestResponse, expectedportalRestResponse);
@@ -151,8 +146,7 @@ public class MicroserviceControllerTest extends MockitoTestSuite{
PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
expectedportalRestResponse.setMessage("FAILURE");
expectedportalRestResponse.setResponse(null);
- PortalRestStatusEnum portalRestStatusEnum = null;
- expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ expectedportalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
Mockito.when(microserviceController.updateMicroservice(mockedRequest, mockedResponse, 1, microserviceData))
.thenThrow(nullPointerException);
PortalRestResponse<String> actualportalRestResponse = microserviceController.updateMicroservice(mockedRequest,
@@ -166,8 +160,7 @@ public class MicroserviceControllerTest extends MockitoTestSuite{
expectedportalRestResponse.setMessage("FAILURE");
expectedportalRestResponse.setResponse(
"I/O error on GET request for \"" + EcompPortalUtils.widgetMsProtocol() + "://null/widget/microservices/widgetCatalog/service/1\":null; nested exception is java.net.UnknownHostException: null");
- PortalRestStatusEnum portalRestStatusEnum = null;
- expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ expectedportalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
PowerMockito.mockStatic(WidgetServiceHeaders.class);
PortalRestResponse<String> actuaPportalRestResponse = microserviceController.deleteMicroservice(mockedRequest,
mockedResponse, 1);
@@ -181,8 +174,7 @@ public class MicroserviceControllerTest extends MockitoTestSuite{
PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
expectedportalRestResponse.setMessage("SOME WIDGETS ASSOICATE WITH THIS SERVICE");
expectedportalRestResponse.setResponse("'null' ,'null' ");
- PortalRestStatusEnum portalRestStatusEnum = null;
- expectedportalRestResponse.setStatus(portalRestStatusEnum.WARN);
+ expectedportalRestResponse.setStatus(PortalRestStatusEnum.WARN);
List<WidgetCatalog> List = new ArrayList<WidgetCatalog>();
WidgetCatalog widgetCatalog = new WidgetCatalog();
widgetCatalog.setId(1);
@@ -212,8 +204,7 @@ public class MicroserviceControllerTest extends MockitoTestSuite{
PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
expectedportalRestResponse.setMessage("SUCCESS");
expectedportalRestResponse.setResponse("");
- PortalRestStatusEnum portalRestStatusEnum = null;
- expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
+ expectedportalRestResponse.setStatus(PortalRestStatusEnum.OK);
List<WidgetCatalog> List = new ArrayList<WidgetCatalog>();
PowerMockito.mockStatic(WidgetServiceHeaders.class);
String whatService = "widgets-service";
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/RoleManageControllerTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/RoleManageControllerTest.java
new file mode 100644
index 00000000..faa9b1f7
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/RoleManageControllerTest.java
@@ -0,0 +1,189 @@
+package org.openecomp.portalapp.portal.test.controller;
+
+import static org.junit.Assert.assertEquals;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.controller.core.RoleController;
+import org.openecomp.portalapp.controller.core.RoleFunctionListController;
+import org.openecomp.portalapp.controller.core.RoleListController;
+import org.openecomp.portalapp.portal.controller.RoleManageController;
+import org.openecomp.portalapp.portal.domain.EPApp;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.openecomp.portalapp.portal.service.ExternalAccessRolesService;
+import org.openecomp.portalapp.portal.test.core.MockEPUser;
+import org.openecomp.portalapp.test.framework.MockitoTestSuite;
+import org.springframework.web.servlet.ModelAndView;
+
+public class RoleManageControllerTest {
+
+
+
+ @Mock
+ RoleController roleController;
+
+ @Mock
+ RoleListController roleListController;
+
+ @Mock
+ RoleFunctionListController roleFunctionListController;
+
+
+ @Mock
+ ExternalAccessRolesService externalAccessRolesService;
+
+ @Mock
+ ExternalAccessRolesService externalAccessRolesService1 = null;
+
+ @InjectMocks
+ RoleManageController roleManageController = new RoleManageController();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+ NullPointerException nullPointerException = new NullPointerException();
+ MockEPUser mockUser = new MockEPUser();
+
+ @Test
+ public void toggleRoleTest()
+ {
+ PortalRestResponse<String> portalRestResponse = new PortalRestResponse<String>();
+ portalRestResponse.setMessage("success");
+ portalRestResponse.setResponse(null);
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ portalRestResponse.setStatus(portalRestStatusEnum.OK);
+
+ PortalRestResponse<String> expectedpPortalRestResponse=roleManageController.toggleRole(mockedRequest, mockedResponse);
+ assertEquals(portalRestResponse,expectedpPortalRestResponse);
+
+ }
+
+// @Test
+// public void toggleRoleExceptionTest()
+// {
+// PortalRestResponse<String> portalRestResponse = new PortalRestResponse<String>();
+// portalRestResponse.setMessage("success");
+// portalRestResponse.setResponse(null);
+// PortalRestStatusEnum portalRestStatusEnum = null;
+// portalRestResponse.setStatus(portalRestStatusEnum.OK);
+// Mockito.doNothing().when(roleListController).toggleRole(mockedRequest, mockedResponse))).th
+// getRoleListController().toggleRole(request, response)
+//
+// PortalRestResponse<String> expectedpPortalRestResponse=roleManageController.toggleRole(mockedRequest, mockedResponse);
+// assertEquals(portalRestResponse,expectedpPortalRestResponse);
+//
+// }
+ @Test
+ public void removeRoleTest() throws Exception
+ {
+ ModelAndView modelandView = new ModelAndView("login.htm");
+ Mockito.when(roleListController.removeRole(mockedRequest, mockedResponse)).thenReturn(modelandView);
+ ModelAndView expectedModelandView = roleManageController.removeRole(mockedRequest, mockedResponse);
+ assertEquals(expectedModelandView, modelandView);
+ }
+
+ @Test
+ public void saveRoleTest() throws Exception
+ {
+ ModelAndView modelandView = new ModelAndView("login.htm");
+ Mockito.when(roleController.saveRole(mockedRequest, mockedResponse)).thenReturn(modelandView);
+ ModelAndView expectedModelandView = roleManageController.saveRole(mockedRequest, mockedResponse);
+ assertEquals(expectedModelandView, modelandView);
+ }
+
+ @Test
+ public void removeRoleRoleFunctionTest() throws Exception
+ {
+ ModelAndView modelandView = new ModelAndView("login.htm");
+ Mockito.when(roleController.removeRoleFunction(mockedRequest, mockedResponse)).thenReturn(modelandView);
+ ModelAndView expectedModelandView = roleManageController.removeRoleRoleFunction(mockedRequest, mockedResponse);
+ assertEquals(expectedModelandView, modelandView);
+ }
+
+ @Test
+ public void addRoleRoRoleFunctionTest() throws Exception
+ {
+ ModelAndView modelandView = new ModelAndView("login.htm");
+ Mockito.when(roleController.addRoleFunction(mockedRequest, mockedResponse)).thenReturn(modelandView);
+ ModelAndView expectedModelandView = roleManageController.addRoleRoRoleFunction(mockedRequest, mockedResponse);
+ assertEquals(expectedModelandView, modelandView);
+ }
+
+ @Test
+ public void removeChildRoleTest() throws Exception
+ {
+ ModelAndView modelandView = new ModelAndView("login.htm");
+ Mockito.when(roleController.removeChildRole(mockedRequest, mockedResponse)).thenReturn(modelandView);
+ ModelAndView expectedModelandView = roleManageController.removeChildRole(mockedRequest, mockedResponse);
+ assertEquals(expectedModelandView, modelandView);
+ }
+
+
+ @Test
+ public void getRoleTest() throws Exception
+ {
+ Mockito.doNothing().when(roleController).getRole(mockedRequest, mockedResponse);
+ roleManageController.getRole(mockedRequest, mockedResponse);
+ }
+
+ @Test
+ public void getRolesTest() throws Exception
+ {
+ Mockito.doNothing().when(roleListController).getRoles(mockedRequest, mockedResponse);
+ roleManageController.getRoles(mockedRequest, mockedResponse);
+ }
+
+ @Test
+ public void getRoleFunctionListTest() throws Exception
+ {
+ Mockito.doNothing().when(roleFunctionListController).getRoleFunctionList(mockedRequest, mockedResponse);
+ roleManageController.getRoleFunctionList(mockedRequest, mockedResponse);
+ }
+
+ @Test
+ public void saveRoleFunctionTest() throws Exception
+ {
+ Mockito.doNothing().when(roleFunctionListController).saveRoleFunction(mockedRequest, mockedResponse, "test");
+ roleManageController.saveRoleFunction(mockedRequest, mockedResponse, "test");
+ }
+
+ @Test
+ public void removeRoleFunctionTest() throws Exception
+ {
+ Mockito.doNothing().when(roleFunctionListController).removeRoleFunction(mockedRequest, mockedResponse, "test");
+ roleManageController.removeRoleFunction(mockedRequest, mockedResponse, "test");
+ }
+
+ @Test
+ public void syncRolesTest() throws Exception
+ {
+ EPApp app = new EPApp();
+ Mockito.doNothing().when(externalAccessRolesService).syncApplicationRolesWithEcompDB(app);
+ roleManageController.syncRoles(app);
+ }
+
+
+ @Test
+ public void addeChildRoleTest() throws Exception
+ {
+ ModelAndView modelandView = new ModelAndView("login.htm");
+ Mockito.when(roleController.addChildRole(mockedRequest, mockedResponse)).thenReturn(modelandView);
+ ModelAndView expectedModelandView = roleManageController.addChildRole(mockedRequest, mockedResponse);
+ assertEquals(expectedModelandView, modelandView);
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/RolesApprovalSystemControllerTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/RolesApprovalSystemControllerTest.java
index 6286245f..79ae0276 100644
--- a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/RolesApprovalSystemControllerTest.java
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/RolesApprovalSystemControllerTest.java
@@ -47,8 +47,7 @@ public class RolesApprovalSystemControllerTest extends MockitoTestSuite {
PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
expectedportalRestResponse.setMessage("Request has no roles");
expectedportalRestResponse.setResponse("save user profile failed");
- PortalRestStatusEnum portalRestStatusEnum = null;
- expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ expectedportalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
ExternalSystemUser extSysUser = new ExternalSystemUser();
extSysUser.setApplicationName("Test_App");
extSysUser.setLoginId("1");
@@ -66,8 +65,7 @@ public class RolesApprovalSystemControllerTest extends MockitoTestSuite {
PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
expectedportalRestResponse.setMessage("Saved Successfully");
expectedportalRestResponse.setResponse("Success");
- PortalRestStatusEnum portalRestStatusEnum = null;
- expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
+ expectedportalRestResponse.setStatus(PortalRestStatusEnum.OK);
ExternalSystemUser extSysUser = new ExternalSystemUser();
extSysUser.setApplicationName("Test_App");
extSysUser.setLoginId("1");
@@ -91,8 +89,7 @@ public class RolesApprovalSystemControllerTest extends MockitoTestSuite {
PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
expectedportalRestResponse.setMessage("Received Bad String");
expectedportalRestResponse.setResponse("save user profile failed");
- PortalRestStatusEnum portalRestStatusEnum = null;
- expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ expectedportalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
ExternalSystemUser extSysUser = new ExternalSystemUser();
extSysUser.setApplicationName("Test_App");
extSysUser.setLoginId("1");
@@ -116,8 +113,7 @@ public class RolesApprovalSystemControllerTest extends MockitoTestSuite {
PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
expectedportalRestResponse.setMessage(null);
expectedportalRestResponse.setResponse("save user profile failed");
- PortalRestStatusEnum portalRestStatusEnum = null;
- expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ expectedportalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
ExternalSystemUser extSysUser = new ExternalSystemUser();
extSysUser.setApplicationName("Test_App");
extSysUser.setLoginId("1");
@@ -137,8 +133,7 @@ public class RolesApprovalSystemControllerTest extends MockitoTestSuite {
PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
expectedportalRestResponse.setMessage("Request has no login ID");
expectedportalRestResponse.setResponse("save user profile failed");
- PortalRestStatusEnum portalRestStatusEnum = null;
- expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ expectedportalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
ExternalSystemUser extSysUser = new ExternalSystemUser();
extSysUser.setApplicationName("Test_App");
extSysUser.setLoginId(null);
@@ -155,8 +150,7 @@ public class RolesApprovalSystemControllerTest extends MockitoTestSuite {
PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
expectedportalRestResponse.setMessage("Updated Successfully");
expectedportalRestResponse.setResponse("Success");
- PortalRestStatusEnum portalRestStatusEnum = null;
- expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
+ expectedportalRestResponse.setStatus(PortalRestStatusEnum.OK);
ExternalSystemUser extSysUser = new ExternalSystemUser();
extSysUser.setApplicationName("Test_App");
extSysUser.setLoginId("1");
@@ -180,8 +174,7 @@ public class RolesApprovalSystemControllerTest extends MockitoTestSuite {
PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
expectedportalRestResponse.setMessage("Received Bad String");
expectedportalRestResponse.setResponse("save user profile failed");
- PortalRestStatusEnum portalRestStatusEnum = null;
- expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ expectedportalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
ExternalSystemUser extSysUser = new ExternalSystemUser();
extSysUser.setApplicationName("Test_App");
extSysUser.setLoginId("1");
@@ -206,8 +199,7 @@ public class RolesApprovalSystemControllerTest extends MockitoTestSuite {
PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
expectedportalRestResponse.setMessage(null);
expectedportalRestResponse.setResponse("save user profile failed");
- PortalRestStatusEnum portalRestStatusEnum = null;
- expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ expectedportalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
ExternalSystemUser extSysUser = new ExternalSystemUser();
extSysUser.setApplicationName("Test_App");
extSysUser.setLoginId("1");
@@ -228,8 +220,7 @@ public class RolesApprovalSystemControllerTest extends MockitoTestSuite {
PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
expectedportalRestResponse.setMessage("Request has no application name");
expectedportalRestResponse.setResponse("delete user profile failed");
- PortalRestStatusEnum portalRestStatusEnum = null;
- expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ expectedportalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
ExternalSystemUser extSysUser = new ExternalSystemUser();
extSysUser.setApplicationName(null);
extSysUser.setLoginId("1");
@@ -247,8 +238,7 @@ public class RolesApprovalSystemControllerTest extends MockitoTestSuite {
PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
expectedportalRestResponse.setMessage("Request has no request ID");
expectedportalRestResponse.setResponse("delete user profile failed");
- PortalRestStatusEnum portalRestStatusEnum = null;
- expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ expectedportalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
ExternalSystemUser extSysUser = new ExternalSystemUser();
extSysUser.setApplicationName("Test");
extSysUser.setLoginId("1");
@@ -265,8 +255,7 @@ public class RolesApprovalSystemControllerTest extends MockitoTestSuite {
PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
expectedportalRestResponse.setMessage("Deleted Successfully");
expectedportalRestResponse.setResponse("Success");
- PortalRestStatusEnum portalRestStatusEnum = null;
- expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
+ expectedportalRestResponse.setStatus(PortalRestStatusEnum.OK);
ExternalSystemUser extSysUser = new ExternalSystemUser();
extSysUser.setApplicationName("Test_App");
extSysUser.setLoginId("1");
@@ -291,8 +280,7 @@ public class RolesApprovalSystemControllerTest extends MockitoTestSuite {
PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
expectedportalRestResponse.setMessage("failed");
expectedportalRestResponse.setResponse("delete user profile failed");
- PortalRestStatusEnum portalRestStatusEnum = null;
- expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ expectedportalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
ExternalSystemUser extSysUser = new ExternalSystemUser();
extSysUser.setApplicationName("Test_App");
extSysUser.setLoginId("1");
@@ -317,8 +305,7 @@ public class RolesApprovalSystemControllerTest extends MockitoTestSuite {
PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
expectedportalRestResponse.setMessage(null);
expectedportalRestResponse.setResponse("delete user profile failed");
- PortalRestStatusEnum portalRestStatusEnum = null;
- expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ expectedportalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
ExternalSystemUser extSysUser = new ExternalSystemUser();
extSysUser.setApplicationName("Test_App");
extSysUser.setLoginId("1");
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/SchedulerControllerTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/SchedulerControllerTest.java
new file mode 100644
index 00000000..c5280814
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/SchedulerControllerTest.java
@@ -0,0 +1,75 @@
+package org.openecomp.portalapp.portal.test.controller;
+
+import java.sql.DriverManager;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.json.simple.JSONObject;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.controller.SchedulerController;
+import org.openecomp.portalapp.portal.scheduler.SchedulerProperties;
+import org.openecomp.portalapp.portal.scheduler.SchedulerRestInterface;
+import org.openecomp.portalapp.portal.test.core.MockEPUser;
+import org.openecomp.portalapp.test.framework.MockitoTestSuite;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.openecomp.portalsdk.core.web.support.UserUtils;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest({UserUtils.class,SystemProperties.class})
+
+public class SchedulerControllerTest {
+
+ @Mock
+ SchedulerRestInterface schedulerRestInterface;
+
+
+
+ @InjectMocks
+ SchedulerController schedulerController = new SchedulerController();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ MockEPUser mockUser = new MockEPUser();
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+ NullPointerException nullPointerException = new NullPointerException();
+
+ @Test
+ public void getTimeSlotsTest() throws Exception{
+ schedulerController.getTimeSlots(mockedRequest, "12");
+
+ }
+
+ @Test
+ public void postCreateNewVNFChangeTest() throws Exception{
+ //String testJsonData="{\"domain\":\"ChangeManagement\",\"scheduleName\":\"VnfUpgrade/DWF\",\"userId\":\"su7376\",\"domainData\":[{\"WorkflowName\":\"HEAT Stack Software Update for vNFs\",\"CallbackUrl\":\"http://127.0.0.1:8989/scheduler/v1/loopbacktest/vid\",\"CallbackData\":\"testing\"}],\"schedulingInfo\":{\"normalDurationInSeconds\":60,\"additionalDurationInSeconds\":60,\"concurrencyLimit\":60,\"policyId\":\"SNIRO_CM_1707.Config_MS_Demo_TimeLimitAndVerticalTopology_zone_localTime.1.xml\",\"vnfDetails\":[{\"groupId\":\"group1\",\"node\":[\"satmo415vbc\",\"satmo455vbc\"]}]}}";
+ JSONObject jsonObject =Mockito.mock(JSONObject.class);
+
+ schedulerController.postCreateNewVNFChange(mockedRequest, jsonObject);
+ }
+
+ @Test
+ public void postSubmitVnfChangeTimeslotsTest() throws Exception{
+ JSONObject jsonObject =Mockito.mock(JSONObject.class);
+ Mockito.when(jsonObject.get("scheduleId")).thenReturn("12");
+ PowerMockito.mockStatic(SystemProperties.class);
+ PowerMockito.when(SystemProperties.getProperty(SchedulerProperties.SCHEDULER_SUBMIT_NEW_VNF_CHANGE)).thenReturn("/v1/ChangeManagement/schedules/{scheduleId}/approvals");
+ schedulerController.postSubmitVnfChangeTimeslots(mockedRequest, jsonObject);
+ }
+
+} \ No newline at end of file
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/SessionCommunicationControllerTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/SessionCommunicationControllerTest.java
new file mode 100644
index 00000000..cc7bf040
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/SessionCommunicationControllerTest.java
@@ -0,0 +1,59 @@
+package org.openecomp.portalapp.portal.test.controller;
+
+import static org.junit.Assert.*;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.drools.core.command.assertion.AssertEquals;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.controller.sessionmgt.SessionCommunicationController;
+import org.openecomp.portalapp.portal.test.core.MockEPUser;
+import org.openecomp.portalapp.service.sessionmgt.ManageService;
+import org.openecomp.portalapp.test.framework.MockitoTestSuite;
+
+public class SessionCommunicationControllerTest {
+
+
+ @Mock
+ ManageService manageService;
+
+ @InjectMocks
+ SessionCommunicationController SessionCommunicationController = new SessionCommunicationController();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ NullPointerException nullPointerException = new NullPointerException();
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+ MockEPUser mockUser = new MockEPUser();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+
+
+ @Test
+ public void getSessionSlotCheckIntervalTest() throws Exception
+ {
+ Mockito.when(manageService.fetchSessionSlotCheckInterval()).thenReturn(1);
+ int result = SessionCommunicationController.getSessionSlotCheckInterval(mockedRequest, mockedResponse);
+ assertEquals(result, 1);
+
+ }
+
+ @Test
+ public void extendSessionTimeOutsTest() throws Exception
+ {
+ Mockito.doNothing().when(manageService).extendSessionTimeOuts("test");
+ Boolean result = SessionCommunicationController.extendSessionTimeOuts(mockedRequest, mockedResponse, "test");
+ assertEquals(result, true);
+
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/UserControllerTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/UserControllerTest.java
index 492a39d6..19f309b4 100644
--- a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/UserControllerTest.java
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/UserControllerTest.java
@@ -60,8 +60,7 @@ public class UserControllerTest extends MockitoTestSuite {
PortalRestResponse<ProfileDetail> expectedResponse = new PortalRestResponse<ProfileDetail>();
expectedResponse.setMessage(null);
expectedResponse.setResponse(null);
- PortalRestStatusEnum enu = null;
- expectedResponse.setStatus(enu.ERROR);
+ expectedResponse.setStatus(PortalRestStatusEnum.ERROR);
PortalRestResponse<ProfileDetail> response = userController.getLoggedinUser(mockedRequest);
assertEquals(response, expectedResponse);
}
@@ -74,8 +73,7 @@ public class UserControllerTest extends MockitoTestSuite {
expectedResponse.setMessage("success");
ProfileDetail profileDetail = new ProfileDetail();
expectedResponse.setResponse(profileDetail);
- PortalRestStatusEnum enu = null;
- expectedResponse.setStatus(enu.OK);
+ expectedResponse.setStatus(PortalRestStatusEnum.OK);
PowerMockito.mockStatic(CipherUtil.class);
Mockito.when(CipherUtil.decrypt(epUser.getLoginPwd())).thenReturn("Password");
PortalRestResponse<ProfileDetail> response = userController.getLoggedinUser(mockedRequest);
@@ -88,8 +86,7 @@ public class UserControllerTest extends MockitoTestSuite {
PortalRestResponse<String> expectedResponse = new PortalRestResponse<String>();
expectedResponse.setMessage("java.lang.NullPointerException");
expectedResponse.setResponse(null);
- PortalRestStatusEnum enu = null;
- expectedResponse.setStatus(enu.ERROR);
+ expectedResponse.setStatus(PortalRestStatusEnum.ERROR);
ProfileDetail profileDetail = null;
PortalRestResponse<String> actualResponse = userController.modifyLoggedinUser(mockedRequest, profileDetail);
assertEquals(actualResponse, expectedResponse);
@@ -104,8 +101,7 @@ public class UserControllerTest extends MockitoTestSuite {
expectedResponse.setMessage(
"java.lang.ClassCastException: com.sun.crypto.provider.AESCipher$General cannot be cast to javax.crypto.CipherSpi");
expectedResponse.setResponse(null);
- PortalRestStatusEnum enu = null;
- expectedResponse.setStatus(enu.ERROR);
+ expectedResponse.setStatus(PortalRestStatusEnum.ERROR);
ProfileDetail profileDetail = new ProfileDetail();
profileDetail.setFirstName("Test_FirstName");
profileDetail.setLastName("Test_LastName");
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/UserRolesControllerTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/UserRolesControllerTest.java
index 1459caa4..4014f441 100644
--- a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/UserRolesControllerTest.java
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/UserRolesControllerTest.java
@@ -30,29 +30,50 @@ import javax.servlet.http.HttpSession;
import org.junit.Before;
import org.junit.Test;
+import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
import org.openecomp.portalapp.portal.controller.UserRolesController;
import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.domain.EcompAuditLog;
+import org.openecomp.portalapp.portal.service.AdminRolesService;
+import org.openecomp.portalapp.portal.service.SearchService;
import org.openecomp.portalapp.portal.service.UserRolesService;
import org.openecomp.portalapp.portal.test.core.MockEPUser;
import org.openecomp.portalapp.portal.transport.AppWithRolesForUser;
+import org.openecomp.portalapp.portal.transport.AppsListWithAdminRole;
import org.openecomp.portalapp.portal.transport.FieldsValidator;
import org.openecomp.portalapp.portal.transport.FieldsValidator.FieldName;
import org.openecomp.portalapp.portal.transport.RoleInAppForUser;
+import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;
+import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
import org.openecomp.portalapp.test.framework.MockitoTestSuite;
import org.openecomp.portalapp.util.EPUserUtils;
+import org.openecomp.portalsdk.core.service.AuditService;
import org.openecomp.portalsdk.core.service.DataAccessService;
import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+@RunWith(PowerMockRunner.class)
+@PrepareForTest({EcompPortalUtils.class, EPCommonSystemProperties.class, EcompAuditLog.class, SystemProperties.class})
public class UserRolesControllerTest extends MockitoTestSuite {
String userid = "ab1234";
@Mock
UserRolesService userRolesService;
+
+ @Mock
+ SearchService searchService;
+
+ @Mock
+ AuditService auditService;
+
+ @Mock
+ AdminRolesService adminRolesService;
@Mock
FieldsValidator fieldsValidator;
@@ -127,4 +148,161 @@ public class UserRolesControllerTest extends MockitoTestSuite {
assertEquals(expectedFieldValidator.getFields(), actualFieldsValidator.getFields());
}
+
+ @Test
+ public void getPhoneBookSearchResultBadPermissionsTest() {
+ String searchString = "test";
+ String actualResult = null;
+ String expectedResult = null;
+
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+ Mockito.when(adminRolesService.isAccountAdmin(user)).thenReturn(false);
+ Mockito.when(searchService.searchUsersInPhoneBook(searchString)).thenReturn(actualResult);
+
+ actualResult = userRolesController.getPhoneBookSearchResult(mockedRequest, searchString, mockedResponse);
+ assertEquals(expectedResult, actualResult);
+
+ }
+
+ @Test
+ public void getPhoneBookSearchResultValidationTest() {
+ String searchString = " t";
+ String actualResult = null;
+ String expectedResult = null;
+
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ Mockito.when(adminRolesService.isAccountAdmin(user)).thenReturn(false);
+ Mockito.when(searchService.searchUsersInPhoneBook(searchString)).thenReturn(actualResult);
+
+ actualResult = userRolesController.getPhoneBookSearchResult(mockedRequest, searchString, mockedResponse);
+ assertEquals(expectedResult, actualResult);
+
+ }
+
+ @Test
+ public void getPhoneBookSearchResultTest() {
+ String searchString = "test";
+ String actualResult = null;
+ String expectedResult = null;
+
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ Mockito.when(adminRolesService.isAccountAdmin(user)).thenReturn(false);
+ Mockito.when(searchService.searchUsersInPhoneBook(searchString)).thenReturn(actualResult);
+
+ actualResult = userRolesController.getPhoneBookSearchResult(mockedRequest, searchString, mockedResponse);
+ assertEquals(expectedResult, actualResult);
+
+ }
+
+ @Test
+ public void getAppsWithAdminRoleStateForUserTest(){
+
+ String orgUserId = "hb123f";
+ AppsListWithAdminRole actualResult = new AppsListWithAdminRole();
+ AppsListWithAdminRole expectedResult = new AppsListWithAdminRole();
+ EPUser user = mockUser.mockEPUser();
+ // PowerMockito.mockStatic(EcompPortalUtils.class);
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ Mockito.when(adminRolesService.getAppsWithAdminRoleStateForUser(orgUserId)).thenReturn(actualResult);
+
+ actualResult = userRolesController.getAppsWithAdminRoleStateForUser(mockedRequest, orgUserId, mockedResponse);
+ assertEquals(expectedResult, actualResult);
+ }
+
+ /*@Test
+ public void getAppsWithAdminRoleStateForUserBadRequestTest(){
+
+ String orgUserId = "hb123f";
+ AppsListWithAdminRole actualResult = null;
+ AppsListWithAdminRole expectedResult = null;
+ EPUser user = mockUser.mockEPUser();
+ PowerMockito.mockStatic(EcompPortalUtils.class);
+ PowerMockito.when(EcompPortalUtils.legitimateUserId(orgUserId)).thenReturn(false);
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ Mockito.when(adminRolesService.getAppsWithAdminRoleStateForUser(orgUserId)).thenReturn(actualResult);
+
+ actualResult = userRolesController.getAppsWithAdminRoleStateForUser(mockedRequest, orgUserId, mockedResponse);
+ assertEquals(expectedResult, actualResult);
+ }*/
+
+ @Test
+ public void putAppsWithAdminRoleStateForUserBadStatusCodeTest(){
+ FieldsValidator actualFieldsValidator = null;
+ AppsListWithAdminRole newAppsListWithAdminRoles = new AppsListWithAdminRole();
+ FieldsValidator expectedFieldsValidator = new FieldsValidator();
+ List<FieldName> fieldNames = new ArrayList<FieldName>();
+ expectedFieldsValidator.setErrorCode(null);
+ expectedFieldsValidator.setFields(fieldNames);
+ expectedFieldsValidator.setHttpStatusCode((long)200);
+
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+
+ actualFieldsValidator = userRolesController.putAppsWithAdminRoleStateForUser(mockedRequest, newAppsListWithAdminRoles, mockedResponse);
+ assertEquals(expectedFieldsValidator, actualFieldsValidator);
+ }
+
+
+ /*@Test
+ public void putAppsWithAdminRoleStateForUserTest() {
+
+ FieldsValidator actualFieldsValidator = null;
+ AppsListWithAdminRole newAppsListWithAdminRoles = new AppsListWithAdminRole();
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ Mockito.when(adminRolesService.isAccountAdmin(user)).thenReturn(false);
+ PowerMockito.mockStatic(EPCommonSystemProperties.class);
+ PowerMockito.mockStatic(EcompAuditLog.class);
+ PowerMockito.mockStatic(SystemProperties.class);
+ Mockito.when(SystemProperties.getProperty(EcompAuditLog.CD_ACTIVITY_UPDATE_ACCOUNT_ADMIN)).thenReturn("1400");
+ Mockito.when(SystemProperties.getProperty(EPCommonSystemProperties.AUDITLOG_BEGIN_TIMESTAMP)).thenReturn("1400");
+ Mockito.when(SystemProperties.getProperty(EPCommonSystemProperties.AUDITLOG_END_TIMESTAMP)).thenReturn("1400");
+ Mockito.when(SystemProperties.getProperty(SystemProperties.MDC_TIMER)).thenReturn("1400");
+
+ actualFieldsValidator = userRolesController.putAppsWithAdminRoleStateForUser(mockedRequest, newAppsListWithAdminRoles, mockedResponse);
+
+ System.out.println(actualFieldsValidator);
+ Mockito.when(searchService.searchUsersInPhoneBook(searchString)).thenReturn(actualResult);
+
+ actualResult = userRolesController.getPhoneBookSearchResult(mockedRequest, searchString, mockedResponse);
+ assertEquals(expectedResult, actualResult);
+
+ }*/
+
+ /*@Test
+ public void putAppsWithAdminRoleStateForUserTest(){
+ FieldsValidator actualFieldsValidator = null;
+ AppsListWithAdminRole newAppsListWithAdminRoles = new AppsListWithAdminRole();
+ FieldsValidator expectedFieldsValidator = new FieldsValidator();
+ List<FieldName> fieldNames = new ArrayList<FieldName>();
+ expectedFieldsValidator.setErrorCode(null);
+ expectedFieldsValidator.setFields(fieldNames);
+ expectedFieldsValidator.setHttpStatusCode((long)200);
+
+ EPUser user = mockUser.mockEPUser();
+ PowerMockito.mockStatic(EPCommonSystemProperties.class);
+ PowerMockito.mockStatic(EcompAuditLog.class);
+ PowerMockito.mockStatic(SystemProperties.class);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ Mockito.when(adminRolesService.setAppsWithAdminRoleStateForUser(newAppsListWithAdminRoles));
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+
+ // Mockito.call(auditService.logActivity(auditLog, null));
+// Mockito.when(SystemProperties.getProperty(EcompAuditLog.CD_ACTIVITY_UPDATE_ACCOUNT_ADMIN)).thenReturn("1400");
+// Mockito.when(SystemProperties.getProperty(EPCommonSystemProperties.AUDITLOG_BEGIN_TIMESTAMP)).thenReturn("1400");
+// Mockito.when(SystemProperties.getProperty(EPCommonSystemProperties.AUDITLOG_END_TIMESTAMP)).thenReturn("1400");
+// Mockito.when(SystemProperties.getProperty(SystemProperties.MDC_TIMER)).thenReturn("1400");
+
+ actualFieldsValidator = userRolesController.putAppsWithAdminRoleStateForUser(mockedRequest, newAppsListWithAdminRoles, mockedResponse);
+ assertEquals(expectedFieldsValidator, actualFieldsValidator);
+ }*/
}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/WidgetsCatalogController.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/WidgetsCatalogController.java
new file mode 100644
index 00000000..f3255917
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/controller/WidgetsCatalogController.java
@@ -0,0 +1,111 @@
+package org.openecomp.portalapp.portal.test.controller;
+
+import static org.junit.Assert.assertEquals;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.controller.DashboardController;
+import org.openecomp.portalapp.portal.domain.WidgetCatalog;
+import org.openecomp.portalapp.portal.domain.WidgetServiceHeaders;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.openecomp.portalapp.portal.service.ConsulHealthService;
+import org.openecomp.portalapp.portal.service.ConsulHealthServiceImpl;
+import org.openecomp.portalapp.portal.service.DashboardSearchService;
+import org.openecomp.portalapp.portal.service.DashboardSearchServiceImpl;
+import org.openecomp.portalapp.portal.service.MicroserviceService;
+import org.openecomp.portalapp.portal.service.MicroserviceServiceImpl;
+import org.openecomp.portalapp.portal.service.WidgetParameterService;
+import org.openecomp.portalapp.portal.service.WidgetParameterServiceImpl;
+import org.openecomp.portalapp.portal.test.core.MockEPUser;
+import org.openecomp.portalapp.portal.transport.CommonWidgetMeta;
+import org.openecomp.portalapp.portal.utils.CustomLoggingFilter;
+import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
+import org.openecomp.portalapp.test.framework.MockitoTestSuite;
+import org.openecomp.portalapp.util.EPUserUtils;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.client.RestClientException;
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest({EPUserUtils.class})
+public class WidgetsCatalogController {
+
+ @Mock
+ ConsulHealthService consulHealthService = new ConsulHealthServiceImpl();
+
+ @Mock
+ MicroserviceService microserviceService = new MicroserviceServiceImpl();
+
+ @Mock
+ WidgetParameterService widgetParameterService = new WidgetParameterServiceImpl();
+
+ @InjectMocks
+ WidgetsCatalogController widgetsCatalogController = new WidgetsCatalogController();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+
+ NullPointerException nullPointerException = new NullPointerException();
+
+ MockEPUser mockUser = new MockEPUser();
+
+ /*public List<WidgetCatalog> getUserWidgetCatalog(HttpServletRequest request, HttpServletResponse response,
+ @PathVariable("loginName") String loginName) throws RestClientException, Exception {
+ List<WidgetCatalog> widgets = new ArrayList<>();
+ try {
+ CustomLoggingFilter d;
+ ResponseEntity<ArrayList> ans = template.exchange(
+ EcompPortalUtils.widgetMsProtocol() + "://" + consulHealthService.getServiceLocation(whatService,
+ SystemProperties.getProperty("microservices.widget.local.port"))
+ + "/widget/microservices/widgetCatalog/" + loginName,
+ HttpMethod.GET, new HttpEntity(WidgetServiceHeaders.getInstance()), ArrayList.class);
+ widgets = ans.getBody();
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "getUserWidgetCatalog failed", e);
+ // returning null because null help check on the UI if there was a
+ // communication problem with Microservice.
+ return null;
+ }
+ return widgets;
+ }
+
+ @Test
+ public void getWidgetDataTest(){
+
+ String resourceType = null;
+ List<WidgetCatalog> expectedData = new ArrayList<WidgetCatalog>();
+ expectedData.setStatus(PortalRestStatusEnum.ERROR);
+ expectedData.setMessage("Unexpected resource type null");
+ expectedData.setResponse(null);
+
+ PortalRestResponse<CommonWidgetMeta> actualResponse = dashboardController.getWidgetData(mockedRequest, resourceType);
+ assertEquals(expectedData,actualResponse);
+
+
+ }*/
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/AdminUserAppTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/AdminUserAppTest.java
new file mode 100644
index 00000000..ed13c2df
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/AdminUserAppTest.java
@@ -0,0 +1,36 @@
+package org.openecomp.portalapp.portal.test.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.AdminUserApp;
+
+public class AdminUserAppTest {
+
+ public AdminUserApp mockAdminUserApp(){
+
+ AdminUserApp adminUserApp = new AdminUserApp();
+
+ adminUserApp.setUserId((long)1);
+ adminUserApp.setFirstName("test");
+ adminUserApp.setLastName("test");
+ adminUserApp.setOrgUserId("test");
+ adminUserApp.setAppId((long)1);
+ adminUserApp.setAppName("test");
+
+ return adminUserApp;
+ }
+
+ @Test
+ public void adminUserAppTest(){
+ AdminUserApp adminUserApp = mockAdminUserApp();
+
+ assertEquals(adminUserApp.getUser_Id(), new Long(1));
+ assertEquals(adminUserApp.getFirstName(), "test");
+ assertEquals(adminUserApp.getLastName(), "test");
+ assertEquals(adminUserApp.getOrgUserId(), "test");
+ assertEquals(adminUserApp.getAppName(), "test");
+ assertEquals(adminUserApp.getAppId(), new Long(1));
+
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/AdminUserApplicationsTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/AdminUserApplicationsTest.java
new file mode 100644
index 00000000..6faf44a8
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/AdminUserApplicationsTest.java
@@ -0,0 +1,57 @@
+package org.openecomp.portalapp.portal.test.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import javax.persistence.Column;
+import javax.persistence.Id;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.AdminUserApp;
+import org.openecomp.portalapp.portal.domain.AdminUserApplications;
+
+public class AdminUserApplicationsTest {
+
+ public AdminUserApplications mockAdminUserApplications(){
+
+ AdminUserApp adminUserApp = new AdminUserApp();
+
+ adminUserApp.setUserId((long)1);
+ adminUserApp.setFirstName("test");
+ adminUserApp.setLastName("test");
+ adminUserApp.setOrgUserId("test");
+ adminUserApp.setAppId((long)1);
+ adminUserApp.setAppName("test");
+
+ AdminUserApplications adminUserApplications = new AdminUserApplications(adminUserApp);
+
+ adminUserApplications.setUser_Id((long)1);
+ adminUserApplications.setFirstName("test");
+ adminUserApplications.setLastName("test");
+ adminUserApplications.setOrgUserId("test");
+ return adminUserApplications;
+ }
+
+ @Test
+ public void adminUserAppTest(){
+ AdminUserApplications adminUserApplications = mockAdminUserApplications();
+ AdminUserApp adminUserApp = new AdminUserApp();
+
+ adminUserApp.setUserId((long)1);
+ adminUserApp.setFirstName("test");
+ adminUserApp.setLastName("test");
+ adminUserApp.setOrgUserId("test");
+ adminUserApp.setAppId((long)1);
+ adminUserApp.setAppName("test");
+ AdminUserApplications adminUserApplications1 = new AdminUserApplications(adminUserApp);
+
+ assertEquals(adminUserApplications.getUser_Id(), new Long(1));
+ assertEquals(adminUserApplications.getFirstName(), "test");
+ assertEquals(adminUserApplications.getLastName(), "test");
+ assertEquals(adminUserApplications.getOrgUserId(), "test");
+
+
+ assertEquals(adminUserApplications1.getApps().get(0).getAppId(),adminUserApp.getAppId());
+ assertEquals(adminUserApplications1.getApps().get(0).getAppName(),adminUserApp.getAppName());
+
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/AppContactUsTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/AppContactUsTest.java
new file mode 100644
index 00000000..f4368616
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/AppContactUsTest.java
@@ -0,0 +1,32 @@
+package org.openecomp.portalapp.portal.test.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.AppContactUs;
+
+public class AppContactUsTest {
+
+ public AppContactUs mockAppContactUs(){
+ AppContactUs appContactUs = new AppContactUs();
+ appContactUs.setDescription("test");
+ appContactUs.setContactEmail("test");
+ appContactUs.setContactName("test");
+ appContactUs.setUrl("test");
+ appContactUs.setActiveYN("test");
+
+ return appContactUs;
+ }
+
+ @Test
+ public void mockAppContactUsTest(){
+ AppContactUs appContactUs = mockAppContactUs();
+
+ assertEquals(appContactUs.getDescription(), "test");
+ assertEquals(appContactUs.getContactEmail(), "test");
+ assertEquals(appContactUs.getContactName(), "test");
+ assertEquals(appContactUs.getUrl(), "test");
+ assertEquals(appContactUs.getActiveYN(), "test");
+
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/CentralRoleFunctionTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/CentralRoleFunctionTest.java
new file mode 100644
index 00000000..83bdc591
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/CentralRoleFunctionTest.java
@@ -0,0 +1,31 @@
+package org.openecomp.portalapp.portal.test.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.CentralRoleFunction;
+
+public class CentralRoleFunctionTest {
+
+ public CentralRoleFunction mockCentralRoleFunction(){
+
+ CentralRoleFunction centralRoleFunction = new CentralRoleFunction();
+
+ centralRoleFunction.setCode("test");
+ centralRoleFunction.setName("test");
+ centralRoleFunction.setAppId((long)1);
+ centralRoleFunction.setEditUrl("test");
+
+ return centralRoleFunction;
+ }
+
+ @Test
+ public void centralRoleFunctionTest(){
+ CentralRoleFunction centralRoleFunction = mockCentralRoleFunction();
+
+ assertEquals(centralRoleFunction.getAppId(), new Long(1));
+ assertEquals(centralRoleFunction.getCode(), "test");
+ assertEquals(centralRoleFunction.getName(), "test");
+ assertEquals(centralRoleFunction.getEditUrl(), "test");
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPAppRoleFunctionTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPAppRoleFunctionTest.java
new file mode 100644
index 00000000..a3f24631
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPAppRoleFunctionTest.java
@@ -0,0 +1,27 @@
+package org.openecomp.portalapp.portal.test.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.EPAppRoleFunction;
+
+public class EPAppRoleFunctionTest {
+
+ public EPAppRoleFunction mockEPAppRoleFunction(){
+ EPAppRoleFunction epAppRoleFunction = new EPAppRoleFunction();
+ epAppRoleFunction.setRoleId((long)1);
+ epAppRoleFunction.setAppId((long)1);
+ epAppRoleFunction.setCode("test");
+
+ return epAppRoleFunction;
+ }
+
+ @Test
+ public void epAppRoleFunctionTest(){
+ EPAppRoleFunction epAppRoleFunction = mockEPAppRoleFunction();
+
+ assertEquals(epAppRoleFunction.getRoleId(), new Long(1));
+ assertEquals(epAppRoleFunction.getAppId(), new Long(1));
+ assertEquals(epAppRoleFunction.getCode(), "test");
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPAppTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPAppTest.java
new file mode 100644
index 00000000..9a60e7d7
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPAppTest.java
@@ -0,0 +1,61 @@
+package org.openecomp.portalapp.portal.test.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.EPApp;
+
+public class EPAppTest {
+
+ public EPApp mockEPApp(){
+ EPApp epApp = new EPApp();
+
+ epApp.setName("test");
+ epApp.setImageUrl("test");
+ epApp.setDescription("test");
+ epApp.setNotes("test");
+ epApp.setUrl("test");
+ epApp.setAlternateUrl("test");
+ epApp.setAppRestEndpoint("test");
+ epApp.setMlAppName("test");
+ epApp.setMlAppAdminId("test");
+ epApp.setMotsId((long)1);
+ epApp.setUsername("test");
+ epApp.setAppPassword("test");
+ epApp.setOpen(false);
+ epApp.setEnabled(false);
+ epApp.setUebTopicName("test");
+ epApp.setUebSecret("test");
+ epApp.setAppType(1);
+ epApp.setCentralAuth(false);
+ epApp.setNameSpace("test");
+
+ return epApp;
+ }
+
+ @Test
+ public void epAppTest(){
+ EPApp epApp = mockEPApp();
+
+ assertEquals(epApp.getName(), "test");
+ assertEquals(epApp.getImageUrl(), "test");
+ assertEquals(epApp.getDescription(), "test");
+ assertEquals(epApp.getNotes(), "test");
+ assertEquals(epApp.getUrl(), "test");
+ assertEquals(epApp.getAlternateUrl(), "test");
+ assertEquals(epApp.getAppRestEndpoint(), "test");
+ assertEquals(epApp.getMlAppName(), "test");
+ assertEquals(epApp.getMlAppAdminId(), "test");
+ assertEquals(epApp.getMotsId(), new Long(1));
+ assertEquals(epApp.getUsername(), "test");
+ assertEquals(epApp.getAppPassword(), "test");
+ assertEquals(epApp.getOpen(), false);
+ assertEquals(epApp.getEnabled(), false);
+ assertEquals(epApp.getUebTopicName(), "test");
+ assertEquals(epApp.getUebSecret(), "test");
+ assertEquals(epApp.getAppType(), Integer.valueOf(1));
+ assertEquals(epApp.getCentralAuth(), false);
+ assertEquals(epApp.getNameSpace(), "test");
+
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPEndpointAccountTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPEndpointAccountTest.java
new file mode 100644
index 00000000..07206244
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPEndpointAccountTest.java
@@ -0,0 +1,29 @@
+package org.openecomp.portalapp.portal.test.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.EPEndpointAccount;
+
+public class EPEndpointAccountTest {
+
+ public EPEndpointAccount mockEPEndpointAccount(){
+ EPEndpointAccount epEndpointAccount = new EPEndpointAccount();
+
+ epEndpointAccount.setEp_id((long)1);
+ epEndpointAccount.setAccount_id((long)1);
+ epEndpointAccount.setId((long)1);
+
+ return epEndpointAccount;
+ }
+
+ @Test
+ public void epEndpointAccount(){
+ EPEndpointAccount epEndpointAccount = mockEPEndpointAccount();
+ assertEquals(epEndpointAccount.getEp_id(), new Long(1));
+ assertEquals(epEndpointAccount.getAccount_id(), new Long(1));
+ assertEquals(epEndpointAccount.getId(), new Long(1));
+
+ assertEquals(epEndpointAccount.toString(), "EPEndpointAccount [id=1, ep_id=1, account_id=1]");
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPEndpointTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPEndpointTest.java
new file mode 100644
index 00000000..8fbee988
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPEndpointTest.java
@@ -0,0 +1,27 @@
+package org.openecomp.portalapp.portal.test.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.EPEndpoint;
+
+public class EPEndpointTest {
+
+ public EPEndpoint mockEPEndpoint(){
+ EPEndpoint epEndpoint = new EPEndpoint();
+
+ epEndpoint.setId((long)1);
+ epEndpoint.setName("test");
+
+ return epEndpoint;
+ }
+
+ @Test
+ public void epEndpointTest(){
+ EPEndpoint epEndpoint = mockEPEndpoint();
+
+ assertEquals(epEndpoint.getId(), new Long(1));
+ assertEquals(epEndpoint.getName(), "test");
+ assertEquals("EPEndpoint [id=1, name=test]", epEndpoint.toString());
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPRoleTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPRoleTest.java
new file mode 100644
index 00000000..05453bfa
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPRoleTest.java
@@ -0,0 +1,36 @@
+package org.openecomp.portalapp.portal.test.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.EPRole;
+
+public class EPRoleTest {
+
+ public EPRole mockEPRole(){
+ EPRole epRole = new EPRole();
+
+ epRole.setName("test");
+ epRole.setActive(false);
+ epRole.setPriority(1);
+ epRole.setAppId((long)1);
+ epRole.setAppRoleId((long)1);
+
+ return epRole;
+ }
+
+ @Test
+ public void epRoleTest(){
+ EPRole epRole = mockEPRole();
+
+ assertEquals(epRole.getName(), "test");
+ assertEquals(epRole.getActive(), false);
+ assertEquals(epRole.getPriority().toString(),"1");
+ assertEquals(epRole.getAppId(), new Long(1));
+ assertEquals(epRole.getAppRoleId(), new Long(1));
+
+ assertEquals(epRole.toString(), "[Id = null, name = test]");
+
+
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPUserAppCatalogRolesTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPUserAppCatalogRolesTest.java
new file mode 100644
index 00000000..a21eec76
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPUserAppCatalogRolesTest.java
@@ -0,0 +1,32 @@
+package org.openecomp.portalapp.portal.test.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.EPUserAppCatalogRoles;
+
+public class EPUserAppCatalogRolesTest {
+
+ public EPUserAppCatalogRoles mockEPUserAppCatalogRoles(){
+ EPUserAppCatalogRoles epUserAppCatalogRoles = new EPUserAppCatalogRoles();
+
+ epUserAppCatalogRoles.setRequestedRoleId((long)1);
+ epUserAppCatalogRoles.setRolename("test");
+ epUserAppCatalogRoles.setRequestStatus("status");
+ epUserAppCatalogRoles.setAppId((long)1);
+
+ return epUserAppCatalogRoles;
+ }
+
+ @Test
+ public void epUserAppCatalogRolesTest(){
+ EPUserAppCatalogRoles epUserAppCatalogRoles = mockEPUserAppCatalogRoles();
+
+ assertEquals(epUserAppCatalogRoles.getRequestedRoleId(), new Long(1));
+ assertEquals(epUserAppCatalogRoles.getRolename(), "test");
+ assertEquals(epUserAppCatalogRoles.getRequestStatus(), "status");
+ assertEquals(epUserAppCatalogRoles.getAppId(), new Long(1));
+
+ assertEquals("EPUserAppCatalogRoles [requestedRoleId=1, rolename=test, requestStatus=status, appId=1]", epUserAppCatalogRoles.toString());
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPUserAppRolesRequestDetailTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPUserAppRolesRequestDetailTest.java
new file mode 100644
index 00000000..c9147bbe
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPUserAppRolesRequestDetailTest.java
@@ -0,0 +1,54 @@
+package org.openecomp.portalapp.portal.test.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.Date;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.EPUserAppRolesRequest;
+import org.openecomp.portalapp.portal.domain.EPUserAppRolesRequestDetail;
+
+public class EPUserAppRolesRequestDetailTest {
+
+ public EPUserAppRolesRequestDetail mockEPUserAppRolesRequestDetail(){
+
+ EPUserAppRolesRequest epUserAppRolesRequest = new EPUserAppRolesRequest();
+ epUserAppRolesRequest.setUserId((long)1);
+ epUserAppRolesRequest.setAppId((long)1);
+ epUserAppRolesRequest.setCreated(new Date());
+ epUserAppRolesRequest.setUpdatedDate(new Date());
+ epUserAppRolesRequest.setRequestStatus("test");
+
+ EPUserAppRolesRequestDetail epUserAppRolesRequestDetail = new EPUserAppRolesRequestDetail();
+ epUserAppRolesRequestDetail.setReqRoleId((long)1);
+ epUserAppRolesRequestDetail.setReqType("test");
+ epUserAppRolesRequestDetail.setEpRequestIdData(epUserAppRolesRequest);
+
+ return epUserAppRolesRequestDetail;
+ }
+
+ @Test
+ public void epUserAppRolesRequestDetailTest(){
+
+ EPUserAppRolesRequest epUserAppRolesRequest = new EPUserAppRolesRequest();
+ epUserAppRolesRequest.setUserId((long)1);
+ epUserAppRolesRequest.setAppId((long)1);
+ epUserAppRolesRequest.setCreated(new Date());
+ epUserAppRolesRequest.setUpdatedDate(new Date());
+ epUserAppRolesRequest.setRequestStatus("test");
+
+ EPUserAppRolesRequestDetail epUserAppRolesRequestDetail = mockEPUserAppRolesRequestDetail();
+
+ EPUserAppRolesRequestDetail epUserAppRolesRequestDetail1 = new EPUserAppRolesRequestDetail();
+ epUserAppRolesRequestDetail1.setReqRoleId((long)1);
+ epUserAppRolesRequestDetail1.setReqType("test");
+ epUserAppRolesRequestDetail1.setEpRequestIdData(epUserAppRolesRequest);
+
+ assertEquals(epUserAppRolesRequestDetail.getReqRoleId(), new Long(1));
+ assertEquals(epUserAppRolesRequestDetail.getReqType(), "test");
+ assertEquals(epUserAppRolesRequestDetail.getEpRequestIdData(), epUserAppRolesRequest);
+ assertEquals(epUserAppRolesRequestDetail.hashCode(), epUserAppRolesRequestDetail1.hashCode());
+
+ }
+
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPUserAppRolesTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPUserAppRolesTest.java
new file mode 100644
index 00000000..540c63e9
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPUserAppRolesTest.java
@@ -0,0 +1,28 @@
+package org.openecomp.portalapp.portal.test.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.EPUserAppRoles;
+
+public class EPUserAppRolesTest {
+
+ public EPUserAppRoles mockEPUserAppRoles(){
+ EPUserAppRoles epUserAppRoles = new EPUserAppRoles();
+
+ epUserAppRoles.setRoleId((long)1);
+ epUserAppRoles.setAppId((long)1);
+
+ return epUserAppRoles;
+ }
+
+ @Test
+ public void epUserAppRolesTest(){
+ EPUserAppRoles epUserAppRoles = mockEPUserAppRoles();
+
+ assertEquals(epUserAppRoles.getRoleId(), new Long(1));
+ assertEquals(epUserAppRoles.getAppId(), new Long(1));
+ assertEquals("EpUserAppRoles [roleId=1, appId=1]", epUserAppRoles.toString());
+ }
+}
+
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPUserAppTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPUserAppTest.java
new file mode 100644
index 00000000..0c450ebb
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPUserAppTest.java
@@ -0,0 +1,85 @@
+package org.openecomp.portalapp.portal.test.domain;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.EPApp;
+import org.openecomp.portalapp.portal.domain.EPRole;
+import org.openecomp.portalapp.portal.domain.EPUserApp;
+
+public class EPUserAppTest {
+
+ public EPUserApp mockEPUserApp(){
+
+ EPApp epApp = new EPApp();
+ epApp.setName("test");
+ epApp.setImageUrl("test");
+ epApp.setDescription("test");
+ epApp.setNotes("test");
+ epApp.setUrl("test");
+ epApp.setAlternateUrl("test");
+ epApp.setAppRestEndpoint("test");
+ epApp.setMlAppName("test");
+ epApp.setMlAppAdminId("test");
+ epApp.setMotsId((long)1);
+ epApp.setUsername("test");
+ epApp.setAppPassword("test");
+
+
+ //Role
+ EPRole epRole = new EPRole();
+ epRole.setName("test");
+ epRole.setActive(false);
+ epRole.setPriority(1);
+ epRole.setAppId((long)1);
+ epRole.setAppRoleId((long)1);
+
+ EPUserApp user = new EPUserApp();
+ user.setUserId((long)1);
+ user.setApp(epApp);
+ user.setRole(epRole);
+ user.setPriority((short)32767);
+
+
+ return user;
+ }
+
+ @Test
+ public void userTest(){
+ EPUserApp user = mockEPUserApp();
+
+ EPApp epApp = new EPApp();
+ epApp.setName("test");
+ epApp.setImageUrl("test");
+ epApp.setDescription("test");
+ epApp.setNotes("test");
+ epApp.setUrl("test");
+ epApp.setAlternateUrl("test");
+ epApp.setAppRestEndpoint("test");
+ epApp.setMlAppName("test");
+ epApp.setMlAppAdminId("test");
+ epApp.setMotsId((long)1);
+ epApp.setUsername("test");
+ epApp.setAppPassword("test");
+ user.setApp(epApp);
+
+ //Role
+ EPRole epRole = new EPRole();
+ epRole.setName("test");
+ epRole.setActive(false);
+ epRole.setPriority(1);
+ epRole.setAppId((long)1);
+ epRole.setAppRoleId((long)1);
+
+
+ assertEquals(user.getUserId(),Long.valueOf(1));
+ assertEquals(user.getApp(), epApp);
+ assertEquals(user.getPriority().getClass(), Short.class);
+
+ assertEquals(user.toString(), "[u: 1; a: null, r: null; appRoleId: 1]");
+
+ assertEquals(user.hashCode(), user.hashCode());
+
+
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPUserAppsManualSortPreferenceTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPUserAppsManualSortPreferenceTest.java
new file mode 100644
index 00000000..afad6f63
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPUserAppsManualSortPreferenceTest.java
@@ -0,0 +1,29 @@
+package org.openecomp.portalapp.portal.test.domain;
+
+import static org.junit.Assert.assertEquals;
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.EPUserAppsManualSortPreference;
+
+public class EPUserAppsManualSortPreferenceTest {
+
+ public EPUserAppsManualSortPreference mockEPUserAppsManualSortPreference(){
+
+ EPUserAppsManualSortPreference epUserAppsManualSortPreference = new EPUserAppsManualSortPreference();
+ epUserAppsManualSortPreference.setUserId(1);
+ epUserAppsManualSortPreference.setAppId((long)1);
+ epUserAppsManualSortPreference.setAppManualSortOrder(1);
+
+ return epUserAppsManualSortPreference;
+ }
+
+ @Test
+ public void epUserAppsManualSortPreferenceTest(){
+
+ EPUserAppsManualSortPreference epUserAppsManualSortPreference = mockEPUserAppsManualSortPreference();
+
+ assertEquals(epUserAppsManualSortPreference.getUserId(), 1);
+ assertEquals(epUserAppsManualSortPreference.getAppId(), new Long(1));
+ assertEquals(epUserAppsManualSortPreference.getAppManualSortOrder(), 1);
+
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPUserAppsSortPreferenceTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPUserAppsSortPreferenceTest.java
new file mode 100644
index 00000000..545c16d5
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPUserAppsSortPreferenceTest.java
@@ -0,0 +1,43 @@
+package org.openecomp.portalapp.portal.test.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.Date;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.EPUserAppsSortPreference;
+
+public class EPUserAppsSortPreferenceTest {
+
+ public EPUserAppsSortPreference mockEPUserAppsSortPreferenceTest(){
+
+ EPUserAppsSortPreference epUserAppsSortPreference = new EPUserAppsSortPreference();
+ epUserAppsSortPreference.setUserId(1);
+ epUserAppsSortPreference.setSortPref("test");
+ epUserAppsSortPreference.setId((long)1);
+ epUserAppsSortPreference.setCreated(new Date());
+ epUserAppsSortPreference.setModified(new Date());
+ epUserAppsSortPreference.setModifiedId((long)1);
+ epUserAppsSortPreference.setRowNum((long)1);
+ epUserAppsSortPreference.setAuditTrail(null);
+
+ return epUserAppsSortPreference;
+ }
+
+ @Test
+ public void epUserAppsSortPreferenceTest() {
+ EPUserAppsSortPreference epUserAppsSortPreference = mockEPUserAppsSortPreferenceTest();
+
+ assertEquals(epUserAppsSortPreference.getUserId(), 1);
+ assertEquals(epUserAppsSortPreference.getSortPref(), "test");
+ assertEquals(epUserAppsSortPreference.getId(), new Long(1));
+ assertEquals(epUserAppsSortPreference.getCreated(), new Date());
+ assertEquals(epUserAppsSortPreference.getModified(), new Date());
+ assertEquals(epUserAppsSortPreference.getModifiedId(), new Long(1));
+ assertEquals(epUserAppsSortPreference.getRowNum(), new Long(1));
+ assertEquals(epUserAppsSortPreference.getAuditTrail(), null);
+
+
+ }
+
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPUserNotificationTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPUserNotificationTest.java
new file mode 100644
index 00000000..64313e52
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPUserNotificationTest.java
@@ -0,0 +1,34 @@
+package org.openecomp.portalapp.portal.test.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.Date;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.EPUserNotification;
+
+public class EPUserNotificationTest {
+
+ public EPUserNotification mockEPUserNotification(){
+
+ EPUserNotification epUserNotification = new EPUserNotification();
+
+ epUserNotification.setUserId((long)1);
+ epUserNotification.setNotificationId((long)1);
+ epUserNotification.setViewed("test");
+ epUserNotification.setUpdateTime(new Date());
+
+ return epUserNotification;
+ }
+
+ @Test
+ public void epUserNotificationTest(){
+ EPUserNotification epUserNotification = mockEPUserNotification();
+
+ assertEquals(epUserNotification.getUserId(), new Long(1));
+ assertEquals(epUserNotification.getNotificationId(), new Long(1));
+ assertEquals(epUserNotification.getViewed(), "test");
+ // assertEquals(epUserNotification.getUpdateTime(), new Date());
+
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPUserTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPUserTest.java
new file mode 100644
index 00000000..54e6193d
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPUserTest.java
@@ -0,0 +1,114 @@
+package org.openecomp.portalapp.portal.test.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.Date;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.EPUser;
+
+public class EPUserTest {
+
+ public EPUser mockEPUser(){
+
+ EPUser epUser = new EPUser();
+
+ epUser.setId((long)1);
+ epUser.setManagerId((long) 1234);
+ epUser.setFirstName("test");
+ epUser.setLastName("test");
+ epUser.setMiddleInitial("test");
+ epUser.setPhone("test");
+ epUser.setFax("test");
+ epUser.setCellular("test");
+ epUser.setEmail("test");
+ epUser.setAddressId((long) 123);
+ epUser.setAlertMethodCd("test");
+ epUser.setHrid("test");
+ epUser.setOrgUserId("test");
+ epUser.setOrgCode("test");
+ epUser.setAddress1("test");
+ epUser.setAddress2("test");
+ epUser.setCity("test");
+ epUser.setState("test");
+ epUser.setZipCode("test");
+ epUser.setCountry("test");
+ epUser.setOrgManagerUserId("test");
+ epUser.setLocationClli("test");
+ epUser.setBusinessCountryCode("test");
+ epUser.setBusinessCountryName("test");
+ epUser.setBusinessUnit("test");
+ epUser.setBusinessUnitName("test");
+ epUser.setDepartment("test");
+ epUser.setDepartmentName("test");
+ epUser.setCompanyCode("test");
+ epUser.setCompany("test");
+ epUser.setZipCodeSuffix("test");
+ epUser.setJobTitle("test");
+ epUser.setCommandChain("test");
+ epUser.setSiloStatus("test");
+ epUser.setCostCenter("test");
+ epUser.setFinancialLocCode("test");
+ epUser.setLoginId("test");
+ epUser.setLoginPwd("test");
+ epUser.setLastLoginDate(new Date());
+ epUser.setActive(false);
+ epUser.setInternal(false);
+ epUser.setSelectedProfileId((long) 12345);
+ epUser.setTimeZoneId((long) 12345);
+ epUser.setOnline(false);
+ epUser.setChatId("test");
+ return epUser;
+
+ }
+
+ @Test
+ public void userTest(){
+ EPUser user = mockEPUser();
+
+ assertEquals(user.getId(), new Long(1));
+ assertEquals(user.getManagerId(), new Long(1234));
+ assertEquals(user.getFirstName(), "test");
+ assertEquals(user.getLastName(), "test");
+ assertEquals(user.getMiddleInitial(), "test");
+ assertEquals(user.getPhone(), "test");
+ assertEquals(user.getFax(), "test");
+ assertEquals(user.getCellular(), "test");
+ assertEquals(user.getEmail(), "test");
+ assertEquals(user.getAddressId(), new Long(123) );
+ assertEquals(user.getAlertMethodCd(), "test");
+ assertEquals(user.getHrid(), "test");
+ assertEquals(user.getOrgUserId(), "test");
+ assertEquals(user.getOrgCode(), "test");
+ assertEquals(user.getAddress1(), "test");
+ assertEquals(user.getAddress2(), "test");
+ assertEquals(user.getState(), "test");
+ assertEquals(user.getZipCode(), "test");
+ assertEquals(user.getCountry(), "test");
+ assertEquals(user.getOrgManagerUserId(), "test");
+ assertEquals(user.getLocationClli(), "test");
+ assertEquals(user.getBusinessCountryCode(), "test");
+ assertEquals(user.getBusinessCountryName(), "test");
+ assertEquals(user.getBusinessUnit(), "test");
+ assertEquals(user.getBusinessUnitName(), "test");
+ assertEquals(user.getDepartment(), "test");
+ assertEquals(user.getDepartmentName(), "test");
+ assertEquals(user.getCompanyCode(), "test");
+ assertEquals(user.getCompany(), "test");
+ assertEquals(user.getZipCodeSuffix(), "test");
+ assertEquals(user.getJobTitle(), "test");
+ assertEquals(user.getCommandChain(), "test");
+ assertEquals(user.getSiloStatus(), "test");
+ assertEquals(user.getFinancialLocCode(), "test");
+ assertEquals(user.getLoginId(), "test");
+ assertEquals(user.getLoginPwd(), "test");
+ assertEquals(user.getActive(), false);
+ assertEquals(user.getInternal(), false);
+ assertEquals(user.getSelectedProfileId(), new Long (12345));
+ assertEquals(user.getTimeZoneId(), new Long (12345));
+ assertEquals(user.getChatId(), "test");
+
+ //assertEquals(user.toString(), "EPUser [orgId=null, managerId=1234, firstName=test, middleInitial=test, lastName=test, phone=test, fax=test, cellular=test, email=test, addressId=123, alertMethodCd=test, hrid=test, orgUserId=test, orgCode=test, address1=test, address2=test, city=test, state=test, zipCode=test, country=test, orgManagerUserId=test, locationClli=test, businessCountryCode=test, businessCountryName=test, businessUnit=test, businessUnitName=test, department=test, departmentName=test, companyCode=test, company=test, zipCodeSuffix=test, jobTitle=test, commandChain=test, siloStatus=test, costCenter=test, financialLocCode=test, loginId=test, loginPwd=test, lastLoginDate=Tue Sep 05 11:04:49 EDT 2017, active=false, internal=false, selectedProfileId=12345, timeZoneId=12345, online=false, chatId=test, isGuest=false, userApps=[], pseudoRoles=[]]");
+ }
+
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPWidgetsManualSortPreferenceTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPWidgetsManualSortPreferenceTest.java
new file mode 100644
index 00000000..69aa3db0
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EPWidgetsManualSortPreferenceTest.java
@@ -0,0 +1,36 @@
+package org.openecomp.portalapp.portal.test.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.EPWidgetsManualSortPreference;
+
+public class EPWidgetsManualSortPreferenceTest {
+
+ public EPWidgetsManualSortPreference mockEPWidgetsManualSortPreference(){
+ EPWidgetsManualSortPreference epWidgetsManualSortPreference = new EPWidgetsManualSortPreference();
+
+ epWidgetsManualSortPreference.setUserId(1);
+ epWidgetsManualSortPreference.setWidgetId((long)1);
+ epWidgetsManualSortPreference.setWidgetRow(1);
+ epWidgetsManualSortPreference.setWidgetCol(1);
+ epWidgetsManualSortPreference.setWidgetWidth(1);
+ epWidgetsManualSortPreference.setWidgetHeight(1);
+
+ return epWidgetsManualSortPreference;
+ }
+
+ @Test
+ public void epWidgetsManualSortPreferenceTest(){
+ EPWidgetsManualSortPreference epWidgetsManualSortPreference = mockEPWidgetsManualSortPreference();
+
+ assertEquals(epWidgetsManualSortPreference.getWidgetId(), new Long(1));
+ assertEquals(epWidgetsManualSortPreference.getUserId(), 1);
+ assertEquals(epWidgetsManualSortPreference.getWidgetRow(), 1);
+ assertEquals(epWidgetsManualSortPreference.getWidgetCol(), 1);
+ assertEquals(epWidgetsManualSortPreference.getWidgetHeight(), 1);
+ assertEquals(epWidgetsManualSortPreference.getWidgetWidth(), 1);
+
+
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EcompAppRoleIdTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EcompAppRoleIdTest.java
new file mode 100644
index 00000000..ca2bdfb3
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EcompAppRoleIdTest.java
@@ -0,0 +1,33 @@
+package org.openecomp.portalapp.portal.test.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.EcompAppRoleId;
+
+public class EcompAppRoleIdTest {
+
+ public EcompAppRoleId mockEcompAppRoleId(){
+
+ EcompAppRoleId ecompAppRoleId = new EcompAppRoleId();
+
+ ecompAppRoleId.setAppId((long)1);
+ ecompAppRoleId.setAppName("test");
+ ecompAppRoleId.setRoleId(1);
+ ecompAppRoleId.setRoleName("test");
+
+ return ecompAppRoleId;
+ }
+
+ @Test
+ public void ecompAppRoleIdTest(){
+
+ EcompAppRoleId ecompAppRoleId = mockEcompAppRoleId();
+
+ assertEquals(ecompAppRoleId.getAppId(), new Long(1));
+ assertEquals(ecompAppRoleId.getAppName(), "test");
+ assertEquals(ecompAppRoleId.getRoleId().toString(), "1");
+ assertEquals(ecompAppRoleId.getRoleName(), "test");
+ }
+
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EcompAppRoleTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EcompAppRoleTest.java
new file mode 100644
index 00000000..4ba244b7
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/EcompAppRoleTest.java
@@ -0,0 +1,31 @@
+package org.openecomp.portalapp.portal.test.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.EcompAppRole;
+
+public class EcompAppRoleTest {
+
+ public EcompAppRole mockEcompAppRole(){
+ EcompAppRole ecompAppRole = new EcompAppRole();
+
+ ecompAppRole.setAppId((long)1);
+ ecompAppRole.setAppName("test");
+ ecompAppRole.setRoleId(1);
+ ecompAppRole.setRoleName("test");
+
+ return ecompAppRole;
+ }
+
+ @Test
+ public void ecompAppRoleTest(){
+ EcompAppRole ecompAppRole = mockEcompAppRole();
+
+ assertEquals(ecompAppRole.getAppId(), new Long(1));
+ assertEquals(ecompAppRole.getAppName(), "test");
+ assertEquals(ecompAppRole.getRoleId().toString(), "1");
+ assertEquals(ecompAppRole.getRoleName(), "test");
+
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/ExternalRoleDetailsTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/ExternalRoleDetailsTest.java
new file mode 100644
index 00000000..e007102c
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/ExternalRoleDetailsTest.java
@@ -0,0 +1,59 @@
+package org.openecomp.portalapp.portal.test.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.EPAppRoleFunction;
+import org.openecomp.portalapp.portal.domain.ExternalRoleDetails;
+
+public class ExternalRoleDetailsTest {
+
+ public ExternalRoleDetails mockExternalRoleDetails(){
+
+ List<EPAppRoleFunction> epAppRoleFunctionList = new ArrayList<EPAppRoleFunction>();
+
+ EPAppRoleFunction epAppRoleFunction = new EPAppRoleFunction();
+ epAppRoleFunction.setRoleId((long)1);
+ epAppRoleFunction.setAppId((long)1);
+ epAppRoleFunction.setCode("test");
+
+ epAppRoleFunctionList.add(epAppRoleFunction);
+
+ ExternalRoleDetails externalRoleDetails = new ExternalRoleDetails();
+
+ externalRoleDetails.setName("test");
+ externalRoleDetails.setActive(false);
+ externalRoleDetails.setPriority(1);
+ externalRoleDetails.setAppId((long)1);
+ externalRoleDetails.setAppRoleId((long)1);
+ externalRoleDetails.setPerms(epAppRoleFunctionList);
+
+ return externalRoleDetails;
+ }
+
+ @Test
+ public void externalRoleDetailsTest(){
+
+ List<EPAppRoleFunction> epAppRoleFunctionList = new ArrayList<EPAppRoleFunction>();
+
+ EPAppRoleFunction epAppRoleFunction = new EPAppRoleFunction();
+ epAppRoleFunction.setRoleId((long)1);
+ epAppRoleFunction.setAppId((long)1);
+ epAppRoleFunction.setCode("test");
+
+ epAppRoleFunctionList.add(epAppRoleFunction);
+
+ ExternalRoleDetails externalRoleDetails = mockExternalRoleDetails();
+
+ assertEquals(externalRoleDetails.getAppId(), new Long(1));
+ assertEquals(externalRoleDetails.getAppRoleId(), new Long(1));
+ assertEquals(externalRoleDetails.getPriority().toString(), "1");
+ assertEquals(externalRoleDetails.getName(), "test");
+ assertEquals(externalRoleDetails.getPriority().toString(), "1");
+ assertEquals(externalRoleDetails.getPerms().size(), epAppRoleFunctionList.size());
+
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/ExternalSystemAccessTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/ExternalSystemAccessTest.java
new file mode 100644
index 00000000..ea884578
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/ExternalSystemAccessTest.java
@@ -0,0 +1,27 @@
+package org.openecomp.portalapp.portal.test.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.ExternalSystemAccess;
+
+public class ExternalSystemAccessTest {
+
+ public ExternalSystemAccess mockExternalSystemAccess(){
+ ExternalSystemAccess externalSystemAccess = new ExternalSystemAccess("test", false);
+
+ externalSystemAccess.setKey("test");
+ externalSystemAccess.setAccessValue(false);
+
+ return externalSystemAccess;
+ }
+
+ @Test
+ public void externalSystemAccessTest(){
+ ExternalSystemAccess externalSystemAccess = mockExternalSystemAccess();
+
+ assertEquals(externalSystemAccess.getKey(), "test");
+ assertEquals(externalSystemAccess.getAccessValue(), false);
+ }
+}
+
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/ExternalSystemRoleApprovalTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/ExternalSystemRoleApprovalTest.java
new file mode 100644
index 00000000..2c47ed5a
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/ExternalSystemRoleApprovalTest.java
@@ -0,0 +1,23 @@
+package org.openecomp.portalapp.portal.test.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.externalsystemapproval.model.ExternalSystemRoleApproval;
+
+public class ExternalSystemRoleApprovalTest {
+
+ public ExternalSystemRoleApproval mockExternalSystemRoleApproval(){
+ ExternalSystemRoleApproval externalSystemRoleApproval = new ExternalSystemRoleApproval();
+ externalSystemRoleApproval.setRoleName("test");
+
+ return externalSystemRoleApproval;
+ }
+
+ @Test
+ public void externalSystemRoleApprovalTest(){
+ ExternalSystemRoleApproval externalSystemRoleApproval = mockExternalSystemRoleApproval();
+
+ assertEquals(externalSystemRoleApproval.getRoleName(), "test");
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/FunctionalMenuItemWithAppIDTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/FunctionalMenuItemWithAppIDTest.java
new file mode 100644
index 00000000..abec873b
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/FunctionalMenuItemWithAppIDTest.java
@@ -0,0 +1,28 @@
+package org.openecomp.portalapp.portal.test.domain;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.FunctionalMenuItemWithAppID;
+
+public class FunctionalMenuItemWithAppIDTest {
+
+ public FunctionalMenuItemWithAppID mockFunctionalMenuItemWithAppID(){
+ FunctionalMenuItemWithAppID functionalMenuItemWithAppID = new FunctionalMenuItemWithAppID();
+
+ functionalMenuItemWithAppID.setRestrictedApp(false);
+ functionalMenuItemWithAppID.setUrl("test");
+
+
+ return functionalMenuItemWithAppID;
+ }
+
+ @Test
+ public void functionalMenuItemWithAppIDTest(){
+ FunctionalMenuItemWithAppID functionalMenuItemWithAppID = mockFunctionalMenuItemWithAppID();
+
+ assertEquals(functionalMenuItemWithAppID.toString(), "FunctionalMenuItem [menuId=null, column=null, text=null, parentMenuId=null, url=test, active_yn=null, appid=null, roles=null, restrictedApp=false]");
+
+ }
+
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/GetAccessResultIdTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/GetAccessResultIdTest.java
new file mode 100644
index 00000000..90a65eb8
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/GetAccessResultIdTest.java
@@ -0,0 +1,29 @@
+package org.openecomp.portalapp.portal.test.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.GetAccessResultId;
+
+public class GetAccessResultIdTest {
+
+ public GetAccessResultId mockGetAccessResultId(){
+
+ GetAccessResultId getAccessResultIdObj = new GetAccessResultId();
+ getAccessResultIdObj.setEcompFunction("test");
+ getAccessResultIdObj.setAppName("test");
+ getAccessResultIdObj.setRoleName("test");
+
+ return getAccessResultIdObj;
+ }
+
+ @Test
+ public void getAccessResultIdObjTest(){
+ GetAccessResultId getAccessResultIdObj = mockGetAccessResultId();
+
+ assertEquals(getAccessResultIdObj.getEcompFunction(), "test");
+ assertEquals(getAccessResultIdObj.getAppName(), "test");
+ assertEquals(getAccessResultIdObj.getRoleName(), "test");
+
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/MicroserviceDataTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/MicroserviceDataTest.java
new file mode 100644
index 00000000..d7e4ca29
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/MicroserviceDataTest.java
@@ -0,0 +1,57 @@
+package org.openecomp.portalapp.portal.test.domain;
+
+import java.util.ArrayList;
+import java.util.List;
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.MicroserviceData;
+import org.openecomp.portalapp.portal.domain.MicroserviceParameter;
+
+public class MicroserviceDataTest {
+
+ public MicroserviceData mockMicroserviceData(){
+
+ MicroserviceData microserviceData= new MicroserviceData();
+
+ List<MicroserviceParameter> parameterList = new ArrayList<MicroserviceParameter>();
+
+ MicroserviceParameter microserviceParameter = new MicroserviceParameter();
+ microserviceParameter.setId((long)1);
+ microserviceParameter.setServiceId((long)1);
+ microserviceParameter.setPara_key("test");
+ microserviceParameter.setPara_value("test");
+ parameterList.add(microserviceParameter);
+
+ microserviceData.setId((long)1);
+ microserviceData.setName("test");
+ microserviceData.setActive("test");
+ microserviceData.setDesc("test");
+ microserviceData.setAppId((long)1);
+ microserviceData.setUrl("test");
+ microserviceData.setSecurityType("test");
+ microserviceData.setUsername("test");
+ microserviceData.setPassword("test");
+
+
+ return microserviceData;
+ }
+
+ @Test
+ public void microserviceDataTest(){
+ MicroserviceData microserviceData= mockMicroserviceData();
+
+ assertEquals(microserviceData.getId(), new Long(1));
+ assertEquals(microserviceData.getName(), "test");
+ assertEquals(microserviceData.getActive(), "test");
+ assertEquals(microserviceData.getDesc(), "test");
+ // assertEquals(microserviceData.getAppId(), new long(1));
+ assertEquals(microserviceData.getUrl(), "test");
+ assertEquals(microserviceData.getSecurityType(), "test");
+ assertEquals(microserviceData.getUsername(), "test");
+ assertEquals(microserviceData.getPassword(), "test");
+
+ assertEquals(microserviceData.toString(), "MicroserviceData [id=1, name=test, desc=test, appId=1, "
+ + "url=test, securityType=test, username=test, password=test, parameterList=null]");
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/MicroserviceParameterTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/MicroserviceParameterTest.java
new file mode 100644
index 00000000..e15f2267
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/MicroserviceParameterTest.java
@@ -0,0 +1,31 @@
+package org.openecomp.portalapp.portal.test.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.MicroserviceParameter;
+
+public class MicroserviceParameterTest {
+
+ public MicroserviceParameter mockMicroserviceParameter(){
+ MicroserviceParameter microserviceParameter = new MicroserviceParameter();
+
+ microserviceParameter.setId((long)1);
+ microserviceParameter.setServiceId((long)1);
+ microserviceParameter.setPara_key("test");
+ microserviceParameter.setPara_value("test");
+
+ return microserviceParameter;
+ }
+
+ @Test
+ public void microserviceParameterTest(){
+ MicroserviceParameter microserviceParameter = mockMicroserviceParameter();
+ assertEquals(microserviceParameter.getId(), new Long(1));
+ assertEquals(microserviceParameter.getServiceId(),(long)1);
+ assertEquals(microserviceParameter.getPara_key(), "test");
+ assertEquals(microserviceParameter.getPara_value(), "test");
+
+ assertEquals(microserviceParameter.toString(), "MicroserviceParameter [id=1, serviceId=1, para_key=test, para_value=test]");
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/PersUserAppSelectionTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/PersUserAppSelectionTest.java
new file mode 100644
index 00000000..7f4bdc1b
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/PersUserAppSelectionTest.java
@@ -0,0 +1,35 @@
+package org.openecomp.portalapp.portal.test.domain;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.PersUserAppSelection;
+
+public class PersUserAppSelectionTest {
+
+ public PersUserAppSelection mockPersUserAppSelection(){
+
+ PersUserAppSelection persUserAppSelection = new PersUserAppSelection();
+ persUserAppSelection.setUserId((long)1);
+ persUserAppSelection.setAppId((long)1);
+ persUserAppSelection.setStatusCode("test");
+
+ return persUserAppSelection;
+ }
+
+ @Test
+ public void persUserAppSelectionTest(){
+
+ PersUserAppSelection persUserAppSelection1 = new PersUserAppSelection((long)1, (long)1, (long)1,"test");
+
+ PersUserAppSelection persUserAppSelection = mockPersUserAppSelection();
+
+ assertEquals(persUserAppSelection.getUserId(), new Long(1));
+ assertEquals(persUserAppSelection.getAppId(), new Long(1));
+ assertEquals(persUserAppSelection.getStatusCode(), "test");
+ assertEquals(persUserAppSelection1.hashCode(), new PersUserAppSelection((long)1, (long)1, (long)1,"test").hashCode());
+ assertEquals(persUserAppSelection1, new PersUserAppSelection((long)1, (long)1, (long)1,"test"));
+ assertTrue(persUserAppSelection1.equals(new PersUserAppSelection((long)1, (long)1, (long)1,"test")));
+ }
+
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/PersUserWidgetSelectionTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/PersUserWidgetSelectionTest.java
new file mode 100644
index 00000000..55e1bd64
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/PersUserWidgetSelectionTest.java
@@ -0,0 +1,36 @@
+package org.openecomp.portalapp.portal.test.domain;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.PersUserWidgetSelection;
+
+public class PersUserWidgetSelectionTest {
+
+ public PersUserWidgetSelection mockPersUserWidgetSelection(){
+
+ PersUserWidgetSelection persUserWidgetSelection = new PersUserWidgetSelection();
+
+ persUserWidgetSelection.setUserId((long)1);
+ persUserWidgetSelection.setWidgetId((long)1);
+ persUserWidgetSelection.setStatusCode("test");
+
+ return persUserWidgetSelection;
+ }
+
+ @Test
+ public void persUserWidgetSelectionTest(){
+ PersUserWidgetSelection persUserWidgetSelection = mockPersUserWidgetSelection();
+
+ PersUserWidgetSelection persUserWidgetSelection1 = new PersUserWidgetSelection((long)1, (long)1, (long)1, "test");
+
+ assertEquals(persUserWidgetSelection.getUserId(), new Long(1));
+ assertEquals(persUserWidgetSelection.getWidgetId(), new Long(1));
+ assertEquals(persUserWidgetSelection.getStatusCode(), "test");
+ assertEquals(persUserWidgetSelection1, new PersUserWidgetSelection((long)1, (long)1, (long)1, "test"));
+ assertTrue(persUserWidgetSelection1.equals(new PersUserWidgetSelection((long)1, (long)1, (long)1,"test")));
+ assertEquals(persUserWidgetSelection.hashCode(), persUserWidgetSelection1.hashCode());
+ }
+
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/ResultTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/ResultTest.java
new file mode 100644
index 00000000..6763cc0b
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/ResultTest.java
@@ -0,0 +1,29 @@
+package org.openecomp.portalapp.portal.test.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.model.Result;
+
+public class ResultTest {
+
+ public Result mockResult(){
+
+ Result result= new Result("test");
+
+ result.setResult("test");
+ return result;
+ }
+
+ @Test
+ public void resultTest(){
+
+ Result result = mockResult();
+ result.setResult("test");
+
+ assertEquals(result.getResult(), "test");
+
+ }
+
+
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/SharedContextTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/SharedContextTest.java
new file mode 100644
index 00000000..239080d2
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/SharedContextTest.java
@@ -0,0 +1,36 @@
+package org.openecomp.portalapp.portal.test.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.Date;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.SharedContext;
+
+public class SharedContextTest {
+
+ public SharedContext mockSharedContext(){
+
+ SharedContext sharedContext = new SharedContext();
+ sharedContext.setId((long)1);
+ sharedContext.setCreate_time(new Date());
+ sharedContext.setContext_id("test");
+ sharedContext.setCkey("test");
+ sharedContext.setCvalue("test");
+
+ return sharedContext;
+ }
+
+ @Test
+ public void sharedContextTest(){
+ SharedContext sharedContext = mockSharedContext();
+
+ assertEquals(sharedContext.getId(), new Long(1));
+ // assertEquals(sharedContext.getCreate_time(), new Date());
+ assertEquals(sharedContext.getContext_id(), "test");
+ assertEquals(sharedContext.getCkey(), "test");
+ assertEquals(sharedContext.getCvalue(), "test");
+
+
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/UserIdRoleIdTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/UserIdRoleIdTest.java
new file mode 100644
index 00000000..169d8798
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/UserIdRoleIdTest.java
@@ -0,0 +1,29 @@
+package org.openecomp.portalapp.portal.test.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.UserIdRoleId;
+
+public class UserIdRoleIdTest {
+
+ public UserIdRoleId mockUserIdRoleId(){
+ UserIdRoleId userIdRoleId = new UserIdRoleId();
+ userIdRoleId.setUser_Id("test");
+ userIdRoleId.setRoleId("test");
+ userIdRoleId.setOrgUserId("test");
+ userIdRoleId.setAppId("test");
+
+ return userIdRoleId;
+ }
+
+ @Test
+ public void userIdRoleIdTest(){
+ UserIdRoleId userIdRoleId = mockUserIdRoleId();
+
+ assertEquals(userIdRoleId.getUser_Id(), "test");
+ assertEquals(userIdRoleId.getRoleId(), "test");
+ assertEquals(userIdRoleId.getOrgUserId(), "test");
+ assertEquals(userIdRoleId.getAppId(), "test");
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/WidgetCatalogParameterTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/WidgetCatalogParameterTest.java
new file mode 100644
index 00000000..fe525d7b
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/WidgetCatalogParameterTest.java
@@ -0,0 +1,33 @@
+package org.openecomp.portalapp.portal.test.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.WidgetCatalogParameter;
+
+public class WidgetCatalogParameterTest {
+
+ public WidgetCatalogParameter mockWidgetCatalogParameter(){
+ WidgetCatalogParameter widgetCatalogParameter = new WidgetCatalogParameter();
+
+ widgetCatalogParameter.setId((long)1);
+ widgetCatalogParameter.setWidgetId((long)1);
+ widgetCatalogParameter.setUserId((long)1);
+ widgetCatalogParameter.setParamId((long)1);
+ widgetCatalogParameter.setUser_value("test");
+
+ return widgetCatalogParameter;
+ }
+
+ @Test
+ public void widgetCatalogParameterTest(){
+ WidgetCatalogParameter widgetCatalogParameter = mockWidgetCatalogParameter();
+
+ assertEquals(widgetCatalogParameter.getId(), new Long(1));
+ assertEquals(widgetCatalogParameter.getWidgetId(), new Long(1));
+ assertEquals(widgetCatalogParameter.getUserId(), new Long(1));
+ assertEquals(widgetCatalogParameter.getParamId(), new Long(1));
+ assertEquals(widgetCatalogParameter.getUser_value(), "test");
+ assertEquals(widgetCatalogParameter.toString(), "WidgetCatalogParameter [id=1, widgetId=1, userId=1, paramId=1, user_value=test]");
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/WidgetCatalogTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/WidgetCatalogTest.java
new file mode 100644
index 00000000..3b7aa764
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/WidgetCatalogTest.java
@@ -0,0 +1,84 @@
+package org.openecomp.portalapp.portal.test.domain;
+
+import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.App;
+import org.openecomp.portalapp.portal.domain.RoleApp;
+import org.openecomp.portalapp.portal.domain.WidgetCatalog;
+
+public class WidgetCatalogTest {
+
+ public WidgetCatalog mockWidgetCatalog() {
+
+ WidgetCatalog widgetCatalog = new WidgetCatalog();
+
+ Set<RoleApp> roleAppSet = new HashSet<RoleApp>();
+ // App
+ App app = new App();
+ app.setAppId((long) 1);
+ app.setAppName("test");
+
+ // RoleApp
+ RoleApp roleApp = new RoleApp();
+ roleApp.setRoleId((long) 1);
+ roleApp.setRoleName("test");
+ roleApp.setApp(app);
+ roleApp.setWidgets(null);
+
+ roleAppSet.add(roleApp);
+
+ widgetCatalog.setId((long) 1);
+ widgetCatalog.setName("test");
+ widgetCatalog.setDesc("test");
+ widgetCatalog.setFileLocation("test");
+ widgetCatalog.setAllowAllUser("test");
+ widgetCatalog.setServiceId((long) 1);
+ widgetCatalog.setSortOrder("test");
+ widgetCatalog.setStatusCode("test");
+
+ widgetCatalog.setWidgetRoles(roleAppSet);
+
+ return widgetCatalog;
+
+ }
+
+ @Test
+ public void widgetCatalogTest() {
+
+ // App
+ App app = new App();
+ app.setAppId((long) 1);
+ app.setAppName("test");
+
+ Set<RoleApp> roleAppSet = new HashSet<RoleApp>();
+ // RoleApp
+ RoleApp roleApp = new RoleApp();
+ roleApp.setRoleId((long) 1);
+ roleApp.setRoleName("test");
+ roleApp.setApp(app);
+ roleApp.setWidgets(null);
+
+ roleAppSet.add(roleApp);
+
+ WidgetCatalog widgetCatalog = mockWidgetCatalog();
+
+
+ assertEquals(widgetCatalog.getId(), (long)1);
+ assertEquals(widgetCatalog.getName(), "test");
+ assertEquals(widgetCatalog.getDesc(), "test");
+ assertEquals(widgetCatalog.getFileLocation(), "test");
+ assertEquals(widgetCatalog.getAllowAllUser(), "test");
+ assertEquals(widgetCatalog.getServiceId(), new Long (1));
+ assertEquals(widgetCatalog.getSortOrder(), "test");
+ assertEquals(widgetCatalog.getStatusCode(), "test");
+ assertEquals(widgetCatalog.getWidgetRoles().size(),1);
+
+ assertEquals("WidgetCatalog [id=1, name=test, desc=test, fileLocation=test, allowAllUser=test]", widgetCatalog.toString());
+ }
+
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/WidgetParameterResultTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/WidgetParameterResultTest.java
new file mode 100644
index 00000000..75b3d606
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/WidgetParameterResultTest.java
@@ -0,0 +1,33 @@
+package org.openecomp.portalapp.portal.test.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.WidgetParameterResult;
+
+public class WidgetParameterResultTest {
+
+ public WidgetParameterResult mockWidgetParameterResult(){
+
+ WidgetParameterResult widgetParameterResult = new WidgetParameterResult();
+ widgetParameterResult.setParam_id((long)1);
+ widgetParameterResult.setParam_key("test");
+ widgetParameterResult.setUser_value("test");
+ widgetParameterResult.setDefault_value("test");
+
+ return widgetParameterResult;
+ }
+
+ @Test
+ public void widgetParameterResultTest(){
+
+ WidgetParameterResult widgetParameterResult = mockWidgetParameterResult();
+
+ assertEquals(widgetParameterResult.getParam_key(), "test");
+ assertEquals(widgetParameterResult.getParam_id(), new Long(1));
+ assertEquals(widgetParameterResult.getUser_value(), "test");
+ assertEquals(widgetParameterResult.getDefault_value(), "test");
+
+ assertEquals("WidgetParameterResult [param_id=1, param_key=test, user_value=test, default_value=test]", widgetParameterResult.toString());
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/WidgetTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/WidgetTest.java
new file mode 100644
index 00000000..a7597982
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/domain/WidgetTest.java
@@ -0,0 +1,34 @@
+package org.openecomp.portalapp.portal.test.domain;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.Widget;
+
+public class WidgetTest {
+
+ public Widget mockWidget(){
+
+ Widget widget = new Widget();
+ widget.setName("test");
+ widget.setWidth(100);
+ widget.setHeight(100);
+ widget.setUrl("test");
+ widget.setAppId((long)1);
+
+ return widget;
+ }
+
+ @Test
+ public void widgetTest(){
+ Widget widget = mockWidget();
+
+ assertEquals(widget.getName(), "test");
+ assertTrue(widget.getWidth() == 100);
+ assertTrue(widget.getHeight() == 100);
+ assertEquals(widget.getUrl(), "test");
+ assertEquals(widget.getAppId(), new Long(1));
+
+
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/service/AppContactUsServiceImplTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/service/AppContactUsServiceImplTest.java
new file mode 100644
index 00000000..bb74cc6a
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/service/AppContactUsServiceImplTest.java
@@ -0,0 +1,147 @@
+package org.openecomp.portalapp.portal.test.service;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.domain.AppContactUs;
+import org.openecomp.portalapp.portal.domain.EPApp;
+import org.openecomp.portalapp.portal.ecomp.model.AppCategoryFunctionsItem;
+import org.openecomp.portalapp.portal.ecomp.model.AppContactUsItem;
+import org.openecomp.portalapp.portal.service.AppContactUsService;
+import org.openecomp.portalapp.portal.service.AppContactUsServiceImpl;
+import org.openecomp.portalapp.test.framework.MockitoTestSuite;
+import org.openecomp.portalsdk.core.service.DataAccessService;
+import org.openecomp.portalsdk.core.service.DataAccessServiceImpl;
+
+public class AppContactUsServiceImplTest {
+
+
+ @Mock
+ DataAccessService dataAccessService = new DataAccessServiceImpl();
+
+ @Mock
+ AppContactUsService AppContactUsService = new AppContactUsServiceImpl();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ @InjectMocks
+ AppContactUsServiceImpl appContactUsServiceImpl = new AppContactUsServiceImpl();
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+ NullPointerException nullPointerException = new NullPointerException();
+
+
+ public EPApp getApp() {
+ EPApp app = new EPApp();
+ app.setName("Test");
+ app.setImageUrl("test");
+ app.setDescription("test");
+ app.setNotes("test");
+ app.setUrl("test");
+ app.setId((long) 1);
+ app.setAppRestEndpoint("test");
+ app.setAlternateUrl("test");
+ app.setName("test");
+ app.setMlAppName("test");
+ app.setMlAppAdminId("test");
+ app.setUsername("test");
+ app.setAppPassword("test");
+ app.setOpen(true);
+ app.setEnabled(false);
+ app.setUebKey("test");
+ app.setUebSecret("test");
+ app.setUebTopicName("test");
+ app.setAppType(1);
+ return app;
+ }
+ @Test
+ public void getAppContactUsTest() throws Exception
+ {
+
+ List<AppContactUsItem> contactUsItemList = new ArrayList<>();
+ AppContactUsItem appContactUsItem= new AppContactUsItem();
+ appContactUsItem.setAppName("testNew");
+ contactUsItemList.add(appContactUsItem);
+ AppContactUsItem appContactUsItem1= new AppContactUsItem();
+ appContactUsItem1.setAppName("test");
+ contactUsItemList.add(appContactUsItem1);
+ Mockito.when(dataAccessService.executeNamedQuery("getAppContactUsItems", null, null)).thenReturn(contactUsItemList);
+ List<AppContactUsItem> expectedcontactUsItemList = appContactUsServiceImpl.getAppContactUs();
+ assertEquals(expectedcontactUsItemList, contactUsItemList);
+ }
+
+ @Test
+ public void getAppsAndContactsTest() throws Exception
+ {
+ List<AppContactUsItem> contactUsItemList = new ArrayList<>();
+ AppContactUsItem appContactUsItem= new AppContactUsItem();
+ appContactUsItem.setAppName("testNew");
+ contactUsItemList.add(appContactUsItem);
+ AppContactUsItem appContactUsItem1= new AppContactUsItem();
+ appContactUsItem1.setAppName("test");
+ contactUsItemList.add(appContactUsItem1);
+ Mockito.when(dataAccessService.executeNamedQuery("getAppsAndContacts", null, null)).thenReturn(contactUsItemList);
+ List<AppContactUsItem> expectedcontactUsItemList = appContactUsServiceImpl.getAppsAndContacts();
+ assertEquals(expectedcontactUsItemList, contactUsItemList);
+ }
+
+ @Test
+ public void getAppCategoryFunctionsTest() throws Exception
+ {
+ List<AppCategoryFunctionsItem> list = new ArrayList<>();
+ Mockito.when(dataAccessService.executeNamedQuery("getAppCategoryFunctions", null, null)).thenReturn(list);
+ List<AppCategoryFunctionsItem> expectedlist = appContactUsServiceImpl.getAppCategoryFunctions();
+ assertEquals(list, expectedlist);
+ }
+
+ @Test(expected = java.lang.Exception.class)
+ public void saveAppContactUsTest() throws Exception
+ {
+ HashMap<String, Object> map = new HashMap<String, Object>();
+ List<AppContactUsItem> contactUsModelList = new ArrayList<>();
+ AppContactUsItem appContactUsItem= new AppContactUsItem();
+ appContactUsItem.setAppId((long) 1);
+ contactUsModelList.add(appContactUsItem);
+ AppContactUs appContact = new AppContactUs();
+ Mockito.when(dataAccessService.getDomainObject(AppContactUs.class, 1, map)).thenReturn(appContact);
+ EPApp app = getApp();
+ Mockito.when(dataAccessService.getDomainObject(EPApp.class, 1, new HashMap<String, Object>())).thenReturn(app);
+ AppContactUs contactUs = new AppContactUs();
+ contactUs.setApp(app);
+ contactUs.setDescription(appContactUsItem.getDescription());
+ contactUs.setContactName(appContactUsItem.getContactName());
+ contactUs.setContactEmail(appContactUsItem.getContactEmail());
+ contactUs.setActiveYN(appContactUsItem.getActiveYN());
+ contactUs.setUrl(appContactUsItem.getUrl());
+ Mockito.doNothing().when(dataAccessService).saveDomainObject(contactUs,map);
+ appContactUsServiceImpl.saveAppContactUs(contactUsModelList);
+ }
+
+ @Test(expected = java.lang.NullPointerException.class)
+ public void deleteContactUsTest() throws Exception
+ {
+ HashMap<String, Object> map = new HashMap<String, Object>();
+ AppContactUs contactUs = new AppContactUs();
+ Mockito.when((AppContactUs) dataAccessService.getDomainObject(AppContactUs.class, 1, map)).thenReturn(contactUs);
+ appContactUsServiceImpl.deleteContactUs((long) 1);
+ }
+
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/service/DashboardSearchServiceImplTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/service/DashboardSearchServiceImplTest.java
new file mode 100644
index 00000000..ab380ba5
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/service/DashboardSearchServiceImplTest.java
@@ -0,0 +1,114 @@
+package org.openecomp.portalapp.portal.test.service;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.ecomp.model.SearchResultItem;
+import org.openecomp.portalapp.portal.service.DashboardSearchServiceImpl;
+import org.openecomp.portalapp.portal.test.core.MockEPUser;
+import org.openecomp.portalapp.portal.transport.CommonWidget;
+import org.openecomp.portalapp.portal.transport.CommonWidgetMeta;
+import org.openecomp.portalapp.test.framework.MockitoTestSuite;
+import org.openecomp.portalsdk.core.service.DataAccessService;
+
+public class DashboardSearchServiceImplTest {
+
+ @Mock
+ DataAccessService dataAccessService;
+
+ @InjectMocks
+ DashboardSearchServiceImpl dashboardSearchServiceImpl = new DashboardSearchServiceImpl();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ NullPointerException nullPointerException = new NullPointerException();
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+ MockEPUser mockUser = new MockEPUser();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+
+ @Test
+ public void searchResultsTest()
+ {
+ Map<String, String> params = new HashMap<>();
+ params.put("userId", "guestT");
+ params.put("searchQuery", "test");
+
+ List<SearchResultItem> list = new ArrayList<>();
+ SearchResultItem searchResultItem= new SearchResultItem();
+ searchResultItem.setCategory("test");
+ list.add(searchResultItem);
+ Mockito.when(dataAccessService.executeNamedQuery("searchPortal", params, null)).thenReturn(list);
+ Map<String, List<SearchResultItem>> result = dashboardSearchServiceImpl.searchResults("guestT", "test");
+ assertTrue(result.keySet().contains("test"));
+ }
+
+ @Test
+ public void getRelatedUsersTest()
+ {
+ List<String> activeUsers = new ArrayList<>();
+ Map<String, String> params = new HashMap<>();
+ params.put("userId", "guestT");
+ Mockito.when(dataAccessService.executeNamedQuery("relatedUsers", params, null)).thenReturn(activeUsers);
+ List<String> expectedActiveUsers = dashboardSearchServiceImpl.getRelatedUsers("guestT");
+ assertEquals(expectedActiveUsers,activeUsers);
+ }
+ @Test
+ public void getWidgetDataTest()
+ {
+ CommonWidgetMeta CommonWidgetMeta = null;
+ Map<String, String> params = new HashMap<>();
+ params.put("cat", "test");
+ @SuppressWarnings("unchecked")
+ List<CommonWidget> widgetItems = new ArrayList<>();
+ CommonWidget commonWidget = new CommonWidget();
+ widgetItems.add(commonWidget);
+ Mockito.when(dataAccessService.executeNamedQuery("getCommonWidgetItem", params, null)).thenReturn(widgetItems);
+ CommonWidgetMeta expectedCommonWidgetMeta =dashboardSearchServiceImpl.getWidgetData("test");
+ assertEquals(expectedCommonWidgetMeta.getCategory(), "test");
+ }
+
+ @Test
+ public void saveWidgetDataBulkTest()
+ {
+ CommonWidgetMeta CommonWidgetMeta = new CommonWidgetMeta();
+ List<CommonWidget> widgetList = new ArrayList<>();
+ CommonWidget commonWidget = new CommonWidget();
+ widgetList.add(commonWidget);
+ CommonWidgetMeta.setItems(widgetList);
+ Mockito.doNothing().when(dataAccessService).saveDomainObject(commonWidget, null);
+ assertEquals(dashboardSearchServiceImpl.saveWidgetDataBulk(CommonWidgetMeta), "success");
+ }
+
+ @Test
+ public void saveWidgetDataTest()
+ {
+ CommonWidget commonWidget = new CommonWidget();
+ Mockito.doNothing().when(dataAccessService).saveDomainObject(commonWidget, null);
+ assertEquals(dashboardSearchServiceImpl.saveWidgetData(commonWidget), "success");
+ }
+
+ @Test
+ public void deleteWidgetDataTest()
+ {
+ CommonWidget commonWidget = new CommonWidget();
+ Mockito.doNothing().when(dataAccessService).deleteDomainObject(commonWidget, null);
+ assertEquals(dashboardSearchServiceImpl.deleteWidgetData(commonWidget), "success");
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/service/EPRoleFunctionServiceCentralizedImplTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/service/EPRoleFunctionServiceCentralizedImplTest.java
new file mode 100644
index 00000000..7db06a52
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/service/EPRoleFunctionServiceCentralizedImplTest.java
@@ -0,0 +1,89 @@
+package org.openecomp.portalapp.portal.test.service;
+
+import static org.junit.Assert.*;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+
+import org.hibernate.SessionFactory;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.domain.CentralRoleFunction;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.service.EPRoleFunctionServiceCentralizedImpl;
+import org.openecomp.portalapp.portal.test.core.MockEPUser;
+import org.openecomp.portalapp.test.framework.MockitoTestSuite;
+import org.openecomp.portalsdk.core.domain.RoleFunction;
+import org.openecomp.portalsdk.core.service.DataAccessService;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest(SystemProperties.class)
+public class EPRoleFunctionServiceCentralizedImplTest {
+
+
+ @Mock
+ DataAccessService dataAccessService;
+
+ @Mock
+ SessionFactory sessionFactory;
+
+ @InjectMocks
+ EPRoleFunctionServiceCentralizedImpl ePRoleFunctionServiceCentralizedImpl = new EPRoleFunctionServiceCentralizedImpl();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ NullPointerException nullPointerException = new NullPointerException();
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+ MockEPUser mockUser = new MockEPUser();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+
+ @Test
+ public void getRoleFunctions()
+ {
+ List<CentralRoleFunction> getRoleFuncList = new ArrayList<>();
+ CentralRoleFunction centralRoleFunction = new CentralRoleFunction();
+ getRoleFuncList.add(centralRoleFunction);
+ List<RoleFunction> getRoleFuncListOfPortal = new ArrayList<>();
+ RoleFunction roleFunction = new RoleFunction();
+ getRoleFuncListOfPortal.add(roleFunction);
+ final Map<String, Long> params = new HashMap<>();
+ params.put("appId", (long) 1);
+ Mockito.when(dataAccessService.executeNamedQuery("getAllRoleFunctions", params, null)).thenReturn(getRoleFuncList);
+ List<RoleFunction> expectedGetRoleFuncListOfPortal = ePRoleFunctionServiceCentralizedImpl.getRoleFunctions();
+ assertEquals(expectedGetRoleFuncListOfPortal.size(),getRoleFuncListOfPortal.size());
+ }
+
+ @Test
+ public void getRoleFunctionsNewTest()
+ {
+ HttpSession session = mockedRequest.getSession();
+ EPUser user = mockUser.mockEPUser();
+ user.setId((long) 1);
+ String userId = user.getId().toString();
+ final Map<String, String> params = new HashMap<>();
+ params.put("userId", userId);
+ @SuppressWarnings("unused")
+ List getRoleFuncListOfPortal = new ArrayList<>();
+ Mockito.when(dataAccessService.executeNamedQuery("getRoleFunctionsOfUser", params, null)).thenReturn(getRoleFuncListOfPortal);
+ Set<String> getRoleFuncListOfPortalSet = ePRoleFunctionServiceCentralizedImpl.getRoleFunctions(mockedRequest, user);
+ assertTrue(getRoleFuncListOfPortalSet.size() == 0);
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/service/EPRoleFunctionServiceImplTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/service/EPRoleFunctionServiceImplTest.java
new file mode 100644
index 00000000..c8cd8d28
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/service/EPRoleFunctionServiceImplTest.java
@@ -0,0 +1,98 @@
+package org.openecomp.portalapp.portal.test.service;
+
+import static org.junit.Assert.*;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.SortedSet;
+import java.util.TreeSet;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.domain.EPRole;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.service.EPRoleFunctionServiceImpl;
+import org.openecomp.portalapp.portal.test.core.MockEPUser;
+import org.openecomp.portalapp.test.framework.MockitoTestSuite;
+import org.openecomp.portalapp.util.EPUserUtils;
+import org.openecomp.portalsdk.core.domain.RoleFunction;
+import org.openecomp.portalsdk.core.service.DataAccessService;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest({ SystemProperties.class, EPUserUtils.class })
+public class EPRoleFunctionServiceImplTest {
+
+ @Mock
+ DataAccessService dataAccessService;
+
+ @InjectMocks
+ EPRoleFunctionServiceImpl ePRoleFunctionServiceImpl = new EPRoleFunctionServiceImpl();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ NullPointerException nullPointerException = new NullPointerException();
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+ MockEPUser mockUser = new MockEPUser();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+
+ @Test
+ public void getRoleFunctionsTest() {
+ List<RoleFunction> functions = new ArrayList<>();
+ Mockito.when(dataAccessService.getList(RoleFunction.class, null)).thenReturn(functions);
+ List<RoleFunction> expectedFunctions = ePRoleFunctionServiceImpl.getRoleFunctions();
+ assertEquals(expectedFunctions, functions);
+ }
+
+ @Test
+ public void getRoleFunctionsRequestTest() {
+ EPUser user = mockUser.mockEPUser();
+ HashSet roleFunctions = new HashSet<>();
+ PowerMockito.mockStatic(SystemProperties.class);
+ HttpSession session = mockedRequest.getSession();
+ Mockito.when(session.getAttribute(SystemProperties.getProperty(SystemProperties.ROLE_FUNCTIONS_ATTRIBUTE_NAME)))
+ .thenReturn(roleFunctions);
+ HashSet expectedRoleFunctions = (HashSet) ePRoleFunctionServiceImpl.getRoleFunctions(mockedRequest, user);
+ assertEquals(expectedRoleFunctions, roleFunctions);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Test
+ public void getRoleFunctionsRequestIfNullTest() {
+ EPUser user = mockUser.mockEPUser();
+ HashSet roleFunctions = null;
+ PowerMockito.mockStatic(SystemProperties.class);
+ PowerMockito.mockStatic(EPUserUtils.class);
+ HttpSession session = mockedRequest.getSession();
+ Mockito.when(session.getAttribute(SystemProperties.getProperty(SystemProperties.ROLE_FUNCTIONS_ATTRIBUTE_NAME)))
+ .thenReturn(roleFunctions);
+ HashMap roles = new HashMap<>();
+ EPRole role = new EPRole();
+ SortedSet<RoleFunction> roleFunctionSet = new TreeSet<RoleFunction>();
+ RoleFunction rolefun = new RoleFunction();
+ roleFunctionSet.add(rolefun);
+ role.setRoleFunctions(roleFunctionSet);
+ roles.put((long) 1, role);
+ Mockito.when(EPUserUtils.getRoles(mockedRequest)).thenReturn(roles);
+ HashSet expectedRoleFunctions = (HashSet) ePRoleFunctionServiceImpl.getRoleFunctions(mockedRequest, user);
+ assertTrue(expectedRoleFunctions.size() == 1);
+
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/service/EPRoleServiceImplTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/service/EPRoleServiceImplTest.java
new file mode 100644
index 00000000..10060350
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/service/EPRoleServiceImplTest.java
@@ -0,0 +1,208 @@
+package org.openecomp.portalapp.portal.test.service;
+
+import static org.junit.Assert.*;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.domain.EPRole;
+import org.openecomp.portalapp.portal.service.EPRoleServiceImpl;
+import org.openecomp.portalapp.portal.test.core.MockEPUser;
+import org.openecomp.portalapp.test.framework.MockitoTestSuite;
+import org.openecomp.portalsdk.core.domain.RoleFunction;
+import org.openecomp.portalsdk.core.service.DataAccessService;
+
+public class EPRoleServiceImplTest {
+
+ @Mock
+ DataAccessService dataAccessService;
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ @InjectMocks
+ EPRoleServiceImpl ePRoleServiceImpl = new EPRoleServiceImpl();
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+ NullPointerException nullPointerException = new NullPointerException();
+ MockEPUser mockUser = new MockEPUser();
+
+ @Test
+ public void getRoleFunctionsTest() {
+ List<RoleFunction> roleFunctionList = new ArrayList<>();
+ Mockito.when(dataAccessService.getList(RoleFunction.class, null)).thenReturn(roleFunctionList);
+ List<RoleFunction> expectedRoleFunctionList = ePRoleServiceImpl.getRoleFunctions();
+ assertEquals(roleFunctionList, expectedRoleFunctionList);
+ }
+
+ @Test
+ public void getAvailableChildRolesIfRoleIdIsNullTest() {
+ List<EPRole> roleList = new ArrayList<>();
+ EPRole role = new EPRole();
+ EPRole role1 = new EPRole();
+ role.addChildRole(role1);
+ roleList.add(role);
+ Mockito.when(dataAccessService.getList(EPRole.class, null)).thenReturn(roleList);
+ List<EPRole> expectedRoleList = ePRoleServiceImpl.getAvailableChildRoles(null);
+ assertEquals(roleList, expectedRoleList);
+ }
+
+ // @Test
+ // public void getAvailableChildRolesIfRoleIdNotNullTest()
+ // {
+ // List<EPRole> roleList = new ArrayList<>();
+ // EPRole role = new EPRole();
+ // EPRole role1= new EPRole();
+ // role.addChildRole(role1);
+ // roleList.add(role);
+ // Mockito.when(dataAccessService.getDomainObject(EPRole.class, 1,
+ // null)).thenReturn(role);
+ // Mockito.when(dataAccessService.getList(EPRole.class,
+ // null)).thenReturn(roleList);
+ //
+ // List<EPRole> expectedRoleList =
+ // ePRoleServiceImpl.getAvailableChildRoles((long) 1);
+ // System.out.println(expectedRoleList);
+ // assertEquals(roleList,expectedRoleList);
+ // }
+ //
+ @Test
+ public void getRoleFunctionTest() {
+ RoleFunction roleFunction = new RoleFunction();
+ Mockito.when(dataAccessService.getDomainObject(RoleFunction.class, "test", null)).thenReturn(roleFunction);
+ RoleFunction expectedRoleFunction = ePRoleServiceImpl.getRoleFunction("test");
+ assertEquals(expectedRoleFunction, roleFunction);
+ }
+
+ @Test
+ public void saveRoleFunctionTest() {
+ EPRole role = new EPRole();
+ Mockito.doNothing().when(dataAccessService).saveDomainObject(role, null);
+ ePRoleServiceImpl.saveRole(role);
+ }
+
+ @Test
+ public void deleteRoleFunctionTest() {
+ RoleFunction roleFunction = new RoleFunction();
+ Mockito.doNothing().when(dataAccessService).deleteDomainObject(roleFunction, null);
+ ePRoleServiceImpl.deleteRoleFunction(roleFunction);
+ }
+
+ @Test
+ public void getRoleTest() {
+ EPRole role = null;
+ Mockito.when(dataAccessService.getDomainObject(EPRole.class, 1, null)).thenReturn(role);
+ EPRole expectedRole = ePRoleServiceImpl.getRole((long) 1);
+ assertEquals(expectedRole, role);
+ }
+
+ @Test
+ public void getRoleIfappIdNullTest() {
+ assertNull(ePRoleServiceImpl.getRole(null, null));
+
+ }
+
+ @Test
+ public void getRoleIfappIdNotNullTest() {
+ List<EPRole> roles = new ArrayList<>();
+ EPRole role = new EPRole();
+ roles.add(role);
+ String sql = "SELECT * FROM fn_role where APP_ID = 1 AND APP_ROLE_ID = 1";
+ Mockito.when(dataAccessService.executeSQLQuery(sql, EPRole.class, null)).thenReturn(roles);
+ EPRole expectedRole = ePRoleServiceImpl.getRole((long) 1, (long) 1);
+ assertEquals(expectedRole, role);
+
+ }
+
+ @Test
+ public void getRoleIfListSizeIsMoreThan1Test() {
+ List<EPRole> roles = new ArrayList<>();
+ EPRole role = new EPRole();
+ EPRole role1 = new EPRole();
+ roles.add(role);
+ roles.add(role1);
+ String sql = "SELECT * FROM fn_role where APP_ID = 1 AND APP_ROLE_ID = 1";
+ Mockito.when(dataAccessService.executeSQLQuery(sql, EPRole.class, null)).thenReturn(roles);
+ EPRole expectedRole = ePRoleServiceImpl.getRole((long) 1, (long) 1);
+ assertEquals(expectedRole, role);
+
+ }
+
+ @Test
+ public void getRoleIfListSizeIsEmptyTest() {
+ List<EPRole> roles = new ArrayList<>();
+ String sql = "SELECT * FROM fn_role where APP_ID = 1 AND APP_ROLE_ID = 1";
+ Mockito.when(dataAccessService.executeSQLQuery(sql, EPRole.class, null)).thenReturn(roles);
+ assertNull(ePRoleServiceImpl.getRole((long) 1, (long) 1));
+
+ }
+
+ @Test
+ public void saveRoleTest() {
+ EPRole role = new EPRole();
+ Mockito.doNothing().when(dataAccessService).saveDomainObject(role, null);
+ ePRoleServiceImpl.saveRole(role);
+ }
+
+ @Test
+ public void deleteRoleTest() {
+ EPRole role = new EPRole();
+ Mockito.doNothing().when(dataAccessService).deleteDomainObject(role, null);
+ ePRoleServiceImpl.deleteRole(role);
+ }
+
+ @Test
+ public void getAvailableRolesTest() {
+ List<EPRole> roleList = new ArrayList<>();
+ Mockito.when(dataAccessService.getList(EPRole.class, null)).thenReturn(roleList);
+ List<EPRole> expectedRoleList = ePRoleServiceImpl.getAvailableRoles();
+ assertEquals(expectedRoleList, roleList);
+ }
+
+ @Test
+ public void getAppRolesTest() {
+ final Map<String, String> portalParams = null;
+ List<EPRole> roleList = new ArrayList<>();
+ Mockito.when(dataAccessService.executeNamedQuery("getPortalAppRoles", portalParams, null)).thenReturn(roleList);
+ assertNull(ePRoleServiceImpl.getAppRole("test", (long) 1));
+
+ }
+
+ @SuppressWarnings("unchecked")
+ @Test
+ public void getAppRolesIfNotPortalTest() {
+ final Map<String, String> params = null;
+ List<EPRole> roleList = new ArrayList<>();
+ EPRole role = new EPRole();
+ EPRole role1 = new EPRole();
+ roleList.add(role);
+ roleList.add(role1);
+ Mockito.when((List<EPRole>) dataAccessService.executeNamedQuery("getAppRoles", params, null))
+ .thenReturn(roleList);
+ List<EPRole> expectedRoleList = (List<EPRole>) ePRoleServiceImpl.getAppRole("test", (long) 10);
+ System.out.println(expectedRoleList);
+
+ }
+
+ @Test
+ public void saveRoleFunction() {
+ RoleFunction domainRoleFunction = new RoleFunction();
+ Mockito.doNothing().when(dataAccessService).saveDomainObject(domainRoleFunction, null);
+ ePRoleServiceImpl.saveRoleFunction(domainRoleFunction);
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/service/ExternalAccessRolesServiceImplTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/service/ExternalAccessRolesServiceImplTest.java
new file mode 100644
index 00000000..d8cd6425
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/service/ExternalAccessRolesServiceImplTest.java
@@ -0,0 +1,346 @@
+package org.openecomp.portalapp.portal.test.service;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Matchers;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.domain.CentralRoleFunction;
+import org.openecomp.portalapp.portal.domain.EPApp;
+import org.openecomp.portalapp.portal.domain.EPAppRoleFunction;
+import org.openecomp.portalapp.portal.domain.EPRole;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.service.ExternalAccessRolesServiceImpl;
+import org.openecomp.portalapp.portal.test.core.MockEPUser;
+import org.openecomp.portalapp.portal.transport.ExternalAccessPerms;
+import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;
+import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
+import org.openecomp.portalapp.test.framework.MockitoTestSuite;
+import org.openecomp.portalsdk.core.domain.Role;
+import org.openecomp.portalsdk.core.service.DataAccessService;
+import org.openecomp.portalsdk.core.service.DataAccessServiceImpl;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.client.HttpClientErrorException;
+import org.springframework.web.client.RestTemplate;
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest({ EcompPortalUtils.class, SystemProperties.class, EPCommonSystemProperties.class })
+public class ExternalAccessRolesServiceImplTest {
+ @Mock
+ DataAccessService dataAccessService1 = new DataAccessServiceImpl();
+
+ @Mock
+ RestTemplate template = new RestTemplate();
+
+ @InjectMocks
+ ExternalAccessRolesServiceImpl externalAccessRolesServiceImpl = new ExternalAccessRolesServiceImpl();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+ NullPointerException nullPointerException = new NullPointerException();
+ MockEPUser mockUser = new MockEPUser();
+
+ public EPApp mockApp() {
+ EPApp app = new EPApp();
+ app.setName("Test");
+ app.setImageUrl("test");
+ app.setDescription("test");
+ app.setNotes("test");
+ app.setUrl("test");
+ app.setId((long) 10);
+ app.setAppRestEndpoint("test");
+ app.setAlternateUrl("test");
+ app.setName("test");
+ app.setMlAppName("test");
+ app.setMlAppAdminId("test");
+ app.setUsername("test");
+ app.setAppPassword("test");
+ app.setOpen(false);
+ app.setEnabled(false);
+ app.setUebKey("test");
+ app.setUebSecret("test");
+ app.setUebTopicName("test");
+ app.setAppType(1);
+ return app;
+ }
+
+ @Test
+ public void getAppRolesIfAppIsPortalTest() throws Exception {
+ List<EPRole> applicationRoles = new ArrayList<>();
+ Mockito.when(dataAccessService1.getList(EPRole.class, "test", null, null)).thenReturn(applicationRoles);
+ List<EPRole> expectedApplicationRoles = externalAccessRolesServiceImpl.getAppRoles((long) 1);
+ assertEquals(expectedApplicationRoles, applicationRoles);
+ }
+
+ @Test
+ public void getAppRolesTest() throws Exception {
+ List<EPRole> applicationRoles = new ArrayList<>();
+ Mockito.when(dataAccessService1.getList(EPRole.class, "test", null, null)).thenReturn(applicationRoles);
+ List<EPRole> expectedApplicationRoles = externalAccessRolesServiceImpl.getAppRoles((long) 10);
+ assertEquals(expectedApplicationRoles, applicationRoles);
+ }
+
+ // @SuppressWarnings("null")
+ // @Test(expected = java.lang.Exception.class)
+ // public void getAppRolesExceptionTest() throws Exception{
+ // List<EPRole> applicationRoles = new ArrayList<>();
+ // DataAccessService dataAccessService = null ;
+ // Mockito.when(dataAccessService.getList(EPRole.class, "where app_id = 10",
+ // null, null)).thenThrow(nullPointerException);
+ // List<EPRole> expectedApplicationRoles =
+ // externalAccessRolesServiceImpl.getAppRoles((long) 10);
+ // assertEquals(expectedApplicationRoles,applicationRoles);
+ // }
+
+ @Test(expected = java.lang.Exception.class)
+ public void getAppExceptionTest() throws Exception {
+ List<EPApp> app = new ArrayList<>();
+ String uebKey = "test-ueb-key";
+ Mockito.when(dataAccessService1.getList(EPApp.class, " where ueb_key = '" + uebKey + "'", null, null))
+ .thenReturn(app);
+ List<EPApp> expectedapp = externalAccessRolesServiceImpl.getApp(uebKey);
+ assertEquals(app, expectedapp);
+ }
+
+ @Test(expected = java.lang.Exception.class)
+ public void getAppTest() throws Exception {
+ List<EPApp> appList = new ArrayList<>();
+ EPApp app = mockApp();
+ appList.add(app);
+ String uebKey = "test-ueb-key";
+ Mockito.when(dataAccessService1.getList(EPApp.class, " where ueb_key = '" + uebKey + "'", null, null))
+ .thenReturn(appList);
+ List<EPApp> expectedapp = externalAccessRolesServiceImpl.getApp(uebKey);
+ }
+
+ @Test
+ public void getAppErrorTest() throws Exception {
+ List<EPApp> appList = new ArrayList<>();
+ EPApp app = mockApp();
+ app.setId((long) 1);
+ appList.add(app);
+ String uebKey = "test-ueb-key";
+ Mockito.when(dataAccessService1.getList(EPApp.class, " where ueb_key = '" + uebKey + "'", null, null))
+ .thenReturn(appList);
+ List<EPApp> expectedapp = externalAccessRolesServiceImpl.getApp(uebKey);
+ assertEquals(appList, expectedapp);
+ }
+
+ @Test
+ public void addRoleTest() throws Exception {
+ HttpHeaders headers = new HttpHeaders();
+ PowerMockito.mockStatic(EcompPortalUtils.class);
+ PowerMockito.mockStatic(SystemProperties.class);
+ PowerMockito.mockStatic(EPCommonSystemProperties.class);
+ String uebKey = "test-ueb-key";
+ Role role = new Role();
+ role.setId((long) 25);
+ EPApp app = mockApp();
+ app.setEnabled(true);
+ app.setId((long) 10);
+ app.setNameSpace("test_namesapce");
+ Mockito.when(EcompPortalUtils.base64encodeKeyForAAFBasicAuth()).thenReturn(headers);
+ List<EPApp> appList = new ArrayList<>();
+ appList.add(app);
+ List<EPRole> roleList = new ArrayList<>();
+ EPRole ePRole = new EPRole();
+ role.setName("Test Role");
+ roleList.add(ePRole);
+ Mockito.when(dataAccessService1.getList(EPApp.class, " where ueb_key = '" + uebKey + "'", null, null))
+ .thenReturn(appList);
+ Mockito.when(dataAccessService1.getList(EPRole.class, " where app_role_id = " + role.getId(), null, null))
+ .thenReturn(roleList);
+ Mockito.when(SystemProperties.getProperty(EPCommonSystemProperties.EXTERNAL_CENTRAL_ACCESS_URL))
+ .thenReturn("Testurl");
+ ResponseEntity<String> addResponse = new ResponseEntity<>(HttpStatus.CREATED);
+ Mockito.when(template.exchange(Matchers.anyString(), Matchers.eq(HttpMethod.POST),
+ Matchers.<HttpEntity<String>>any(), Matchers.eq(String.class))).thenReturn(addResponse);
+
+ assertTrue(externalAccessRolesServiceImpl.addRole(role, uebKey));
+ }
+
+ @Test
+ public void addRoleMethodNotAllowedTest() throws Exception {
+ HttpHeaders headers = new HttpHeaders();
+ PowerMockito.mockStatic(EcompPortalUtils.class);
+ PowerMockito.mockStatic(SystemProperties.class);
+ PowerMockito.mockStatic(EPCommonSystemProperties.class);
+ String uebKey = "test-ueb-key";
+ Role role = new Role();
+ role.setId((long) 25);
+ EPApp app = mockApp();
+ app.setEnabled(true);
+ app.setId((long) 10);
+ app.setNameSpace("test_namesapce");
+ Mockito.when(EcompPortalUtils.base64encodeKeyForAAFBasicAuth()).thenReturn(headers);
+ List<EPApp> appList = new ArrayList<>();
+ appList.add(app);
+ List<EPRole> roleList = new ArrayList<>();
+ EPRole ePRole = new EPRole();
+ role.setName("Test Role");
+ roleList.add(ePRole);
+ Mockito.when(dataAccessService1.getList(EPApp.class, " where ueb_key = '" + uebKey + "'", null, null))
+ .thenReturn(appList);
+ Mockito.when(dataAccessService1.getList(EPRole.class, " where app_role_id = " + role.getId(), null, null))
+ .thenReturn(roleList);
+ Mockito.when(SystemProperties.getProperty(EPCommonSystemProperties.EXTERNAL_CENTRAL_ACCESS_URL))
+ .thenReturn("Testurl");
+ ResponseEntity<String> addResponse = new ResponseEntity<>(HttpStatus.METHOD_NOT_ALLOWED);
+ Mockito.when(template.exchange(Matchers.anyString(), Matchers.eq(HttpMethod.POST),
+ Matchers.<HttpEntity<String>>any(), Matchers.eq(String.class))).thenReturn(addResponse);
+
+ assertFalse(externalAccessRolesServiceImpl.addRole(role, uebKey));
+ }
+
+ public EPApp getApp() {
+ EPApp app = new EPApp();
+ app.setName("Test");
+ app.setImageUrl("test");
+ app.setDescription("test");
+ app.setNotes("test");
+ app.setUrl("test");
+ app.setId((long) 1);
+ app.setAppRestEndpoint("test");
+ app.setAlternateUrl("test");
+ app.setName("test");
+ app.setMlAppName("test");
+ app.setMlAppAdminId("test");
+ app.setUsername("test");
+ app.setAppPassword("test");
+ app.setOpen(true);
+ app.setEnabled(false);
+ app.setUebKey("test");
+ app.setUebSecret("test");
+ app.setUebTopicName("test");
+ app.setAppType(1);
+ return app;
+ }
+
+ @Test
+ public void deleteCentralRoleFunctionTest() throws Exception {
+ final Map<String, String> params = new HashMap<>();
+ EPApp app = mockApp();
+ params.put("functionCd", "menu_fun_code");
+ params.put("appId", String.valueOf(10));
+ List<CentralRoleFunction> centralRoleFunctionList = new ArrayList<>();
+ CentralRoleFunction domainCentralRoleFunction = new CentralRoleFunction();
+ domainCentralRoleFunction.setCode("menu_fun_code");
+ centralRoleFunctionList.add(domainCentralRoleFunction);
+ Mockito.when(dataAccessService1.executeNamedQuery("getAppFunctionDetails", params, null))
+ .thenReturn(centralRoleFunctionList);
+ ResponseEntity<String> addResponse = new ResponseEntity<>(HttpStatus.OK);
+ Mockito.when(template.exchange(Matchers.anyString(), Matchers.eq(HttpMethod.DELETE),
+ Matchers.<HttpEntity<String>>any(), Matchers.eq(String.class))).thenReturn(addResponse);
+ HttpHeaders headers = new HttpHeaders();
+ PowerMockito.mockStatic(EcompPortalUtils.class);
+ Mockito.when(EcompPortalUtils.base64encodeKeyForAAFBasicAuth()).thenReturn(headers);
+
+ Mockito.doNothing().when(dataAccessService1).deleteDomainObjects(EPAppRoleFunction.class,
+ "app_id = " + app.getId() + " and function_cd = '" + "menu_fun_code" + "'", null);
+
+ assertTrue(externalAccessRolesServiceImpl.deleteCentralRoleFunction("menu_fun_code", app));
+ }
+
+ @Test
+ public void deleteCentralRoleFunctionFailTest() throws Exception {
+ final Map<String, String> params = new HashMap<>();
+ EPApp app = mockApp();
+ params.put("functionCd", "menu_fun_code");
+ params.put("appId", String.valueOf(10));
+ List<CentralRoleFunction> centralRoleFunctionList = new ArrayList<>();
+ CentralRoleFunction domainCentralRoleFunction = new CentralRoleFunction();
+ domainCentralRoleFunction.setCode("menu_fun_code");
+ centralRoleFunctionList.add(domainCentralRoleFunction);
+ HttpClientErrorException httpClientErrorException = new HttpClientErrorException(HttpStatus.NOT_FOUND);
+ Mockito.when(dataAccessService1.executeNamedQuery("getAppFunctionDetails", params, null))
+ .thenReturn(centralRoleFunctionList);
+ ResponseEntity<String> addResponse = new ResponseEntity<>(HttpStatus.NOT_FOUND);
+ Mockito.when(template.exchange(Matchers.anyString(), Matchers.eq(HttpMethod.DELETE),
+ Matchers.<HttpEntity<String>>any(), Matchers.eq(String.class))).thenThrow(httpClientErrorException);
+ HttpHeaders headers = new HttpHeaders();
+ PowerMockito.mockStatic(EcompPortalUtils.class);
+ Mockito.when(EcompPortalUtils.base64encodeKeyForAAFBasicAuth()).thenReturn(headers);
+
+ Mockito.doNothing().when(dataAccessService1).deleteDomainObjects(EPAppRoleFunction.class,
+ "app_id = " + app.getId() + " and function_cd = '" + "menu_fun_code" + "'", null);
+
+ assertTrue(externalAccessRolesServiceImpl.deleteCentralRoleFunction("menu_fun_code", app));
+ }
+
+ @Test
+ public void deleteCentralRoleFunctionExceptionTest() {
+ final Map<String, String> params = new HashMap<>();
+ EPApp app = mockApp();
+ params.put("functionCd", "menu_fun_code");
+ params.put("appId", String.valueOf(10));
+ List<CentralRoleFunction> centralRoleFunctionList = new ArrayList<>();
+ CentralRoleFunction domainCentralRoleFunction = new CentralRoleFunction();
+ domainCentralRoleFunction.setCode("menu_fun_code");
+ centralRoleFunctionList.add(domainCentralRoleFunction);
+ Mockito.when(dataAccessService1.executeNamedQuery("getAppFunctionDetails", params, null))
+ .thenThrow(nullPointerException);
+ assertFalse(externalAccessRolesServiceImpl.deleteCentralRoleFunction("menu_fun_code", app));
+ }
+
+ @Test
+ public void getUserTest() {
+ List<EPUser> userList = new ArrayList<>();
+ EPUser user = mockUser.mockEPUser();
+ userList.add(user);
+ Mockito.when(dataAccessService1.getList(EPUser.class, " where org_user_id = '" + "guestT" + "'", null, null))
+ .thenReturn(userList);
+ List<EPUser> expectedUserList = externalAccessRolesServiceImpl.getUser("guestT");
+ assertEquals(expectedUserList, userList);
+ }
+
+ public void saveCentralRoleFunctionTest() throws Exception {
+ CentralRoleFunction centralRoleFunction = new CentralRoleFunction();
+ centralRoleFunction.setCode("menu_test");
+ EPApp app = mockApp();
+ app.setId((long) 1);
+ final Map<String, String> params = new HashMap<>();
+ params.put("functionCd", "menu_test");
+ params.put("appId", String.valueOf(1));
+ ExternalAccessPerms extPerms = new ExternalAccessPerms();
+ PowerMockito.mockStatic(EcompPortalUtils.class);
+ HttpHeaders headers = new HttpHeaders();
+ Mockito.when(EcompPortalUtils.base64encodeKeyForAAFBasicAuth()).thenReturn(headers);
+ List<CentralRoleFunction> appRoleFunc = new ArrayList<>();
+ appRoleFunc.add(centralRoleFunction);
+ Mockito.when(dataAccessService1.executeNamedQuery("getAppFunctionDetails", params,
+ null)).thenReturn(appRoleFunc);
+ ResponseEntity<String> addResponse = new ResponseEntity<>(HttpStatus.OK);
+ Mockito.when(template.exchange(Matchers.anyString(), Matchers.eq(HttpMethod.GET),
+ Matchers.<HttpEntity<String>>any(), Matchers.eq(String.class))).thenReturn(addResponse);
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/service/FunctionalMenuMockServiceImplTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/service/FunctionalMenuMockServiceImplTest.java
new file mode 100644
index 00000000..51802c13
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/service/FunctionalMenuMockServiceImplTest.java
@@ -0,0 +1,205 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.test.service;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.domain.FunctionalMenuItemWithAppID;
+import org.openecomp.portalapp.portal.service.FunctionalMenuService;
+import org.openecomp.portalapp.portal.service.FunctionalMenuServiceImpl;
+import org.openecomp.portalapp.portal.transport.FavoritesFunctionalMenuItemJson;
+import org.openecomp.portalapp.portal.transport.FunctionalMenuItem;
+import org.openecomp.portalapp.portal.transport.FunctionalMenuRole;
+import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;
+import org.openecomp.portalapp.test.framework.ApplicationCommonContextTestSuite;
+import org.openecomp.portalsdk.core.service.DataAccessService;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest({SystemProperties.class, EPCommonSystemProperties.class})
+public class FunctionalMenuMockServiceImplTest extends ApplicationCommonContextTestSuite {
+
+ @Mock
+ FunctionalMenuService functionalMenuService;
+
+ @Mock
+ DataAccessService dataAccessService;
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ @InjectMocks
+ FunctionalMenuServiceImpl functionalMenuServiceImpl= new FunctionalMenuServiceImpl();
+
+ @Test
+ public void assignHelpURLsTest(){
+ List<FunctionalMenuItem> menuItems = new ArrayList<FunctionalMenuItem>();
+ FunctionalMenuItem functionalMenuItem1 = new FunctionalMenuItem();
+ functionalMenuItem1.text = "Contact Us";
+ FunctionalMenuItem functionalMenuItem2 = new FunctionalMenuItem();
+ functionalMenuItem2.text = "Get Access";
+ FunctionalMenuItem functionalMenuItem3 = new FunctionalMenuItem();
+ functionalMenuItem3.text = "User Guide";
+ menuItems.add(functionalMenuItem1);
+ menuItems.add(functionalMenuItem2);
+ menuItems.add(functionalMenuItem3);
+
+ PowerMockito.mockStatic(SystemProperties.class);
+ Mockito.when(SystemProperties.getProperty(EPCommonSystemProperties.USER_GUIDE_URL)).thenReturn("http://todo_enter_user_guide_link");
+// Mockito.doNothing().when(functionalMenuServiceImpl).assignHelpURLs(menuItems);
+ functionalMenuServiceImpl.assignHelpURLs(menuItems);
+ }
+
+ @Test
+ public void getFunctionalMenuItemsTest(){
+ String sql = "SELECT m.menu_id, m.column_num, m.text, m.parent_menu_id, m.url, m.active_yn, r.app_id FROM fn_menu_functional m, "
+ + "fn_menu_functional_roles r WHERE m.menu_id = r.menu_id AND UPPER(m.active_yn) = 'Y' AND r.role_id != '900' "
+ + "UNION SELECT m.menu_id, m.column_num, m.text, m.parent_menu_id, m.url, m.active_yn,-1 app_id FROM fn_menu_functional m "
+ + "WHERE m.url='' AND UPPER(m.active_yn) = 'Y'";
+ List<FunctionalMenuItem> actualResult = new ArrayList<FunctionalMenuItem>();
+ List<FunctionalMenuItem> expectedResult = new ArrayList<FunctionalMenuItem>();
+
+ Mockito.when(dataAccessService.executeSQLQuery(sql, FunctionalMenuItemWithAppID.class, null)).thenReturn(expectedResult);
+
+ actualResult = functionalMenuServiceImpl.getFunctionalMenuItems(true);
+ assertEquals(actualResult, expectedResult);
+ }
+
+ @Test
+ public void getFunctionalMenuItemsNegativeTest(){
+ String sql = "SELECT m.menu_id, m.column_num, m.text, m.parent_menu_id, m.url, m.active_yn, r.app_id FROM fn_menu_functional m, "
+ + "fn_menu_functional_roles r WHERE m.menu_id = r.menu_id AND UPPER(m.active_yn) = 'Y' AND r.role_id != '900' "
+ + "UNION SELECT m.menu_id, m.column_num, m.text, m.parent_menu_id, m.url, m.active_yn,-1 app_id FROM fn_menu_functional m "
+ + "WHERE m.url='' AND UPPER(m.active_yn) = 'Y'";
+ List<FunctionalMenuItem> actualResult = new ArrayList<FunctionalMenuItem>();
+ List<FunctionalMenuItem> expectedResult = new ArrayList<FunctionalMenuItem>();
+
+ Mockito.when(dataAccessService.executeSQLQuery(sql, FunctionalMenuItemWithAppID.class, null)).thenReturn(expectedResult);
+
+ actualResult = functionalMenuServiceImpl.getFunctionalMenuItems(false);
+ assertEquals(actualResult, expectedResult);
+ }
+
+ @Test
+ public void getFunctionalMenuItemsForNotificationTreeTest(){
+ String sql = "SELECT m.menu_id, m.column_num, m.text, m.parent_menu_id, m.url, m.active_yn, r.app_id FROM fn_menu_functional m, fn_menu_functional_roles r "
+ + "WHERE m.menu_id = r.menu_id AND UPPER(m.active_yn) = 'Y' AND r.role_id != '900' UNION SELECT m.menu_id, m.column_num, m.text, m.parent_menu_id,"
+ + " m.url, m.active_yn,-1 app_id FROM fn_menu_functional m WHERE m.url='' AND UPPER(m.active_yn) = 'Y'";
+ List<FunctionalMenuItem> actualResult = new ArrayList<FunctionalMenuItem>();
+ List<FunctionalMenuItem> expectedResult = new ArrayList<FunctionalMenuItem>();
+
+ Mockito.when(dataAccessService.executeSQLQuery(sql, FunctionalMenuItemWithAppID.class, null)).thenReturn(expectedResult);
+
+ actualResult = functionalMenuServiceImpl.getFunctionalMenuItemsForNotificationTree(true);
+ assertEquals(actualResult, expectedResult);
+
+ }
+
+ @Test
+ public void getFunctionalMenuItemsForNotificationNegativeTreeTest(){
+ String sql = "SELECT m.menu_id, m.column_num, m.text, m.parent_menu_id, m.url, m.active_yn, r.app_id FROM fn_menu_functional m, fn_menu_functional_roles r "
+ + "WHERE m.menu_id = r.menu_id AND UPPER(m.active_yn) = 'Y' AND r.role_id != '900' UNION SELECT m.menu_id, m.column_num, m.text, m.parent_menu_id,"
+ + " m.url, m.active_yn,-1 app_id FROM fn_menu_functional m WHERE m.url='' AND UPPER(m.active_yn) = 'Y'";
+ List<FunctionalMenuItem> actualResult = new ArrayList<FunctionalMenuItem>();
+ List<FunctionalMenuItem> expectedResult = new ArrayList<FunctionalMenuItem>();
+
+ Mockito.when(dataAccessService.executeSQLQuery(sql, FunctionalMenuItemWithAppID.class, null)).thenReturn(expectedResult);
+
+ actualResult = functionalMenuServiceImpl.getFunctionalMenuItemsForNotificationTree(false);
+ assertEquals(actualResult, expectedResult);
+ }
+
+ @Test
+ public void getFunctionalMenuItemsForAppTest(){
+ String sql = "SELECT DISTINCT m1.menu_id, m1.column_num, m1.text, m1.parent_menu_id, m1.url, m.active_yn "
+ + "FROM fn_menu_functional m, fn_menu_functional m1, fn_menu_functional_ancestors a, fn_menu_functional_roles mr "
+ + "WHERE mr.app_id='1' AND mr.menu_id = m.menu_id AND UPPER(m.active_yn) = 'Y' AND UPPER(m1.active_yn) ='Y' AND a.menu_id = m.menu_id "
+ + "AND a.ancestor_menu_id = m1.menu_id";
+ Integer appId = 1;
+ List<FunctionalMenuItem> actualResult = new ArrayList<FunctionalMenuItem>();
+ List<FunctionalMenuItem> expectedResult = new ArrayList<FunctionalMenuItem>();
+
+ Mockito.when(dataAccessService.executeSQLQuery(sql, FunctionalMenuItemWithAppID.class, null)).thenReturn(expectedResult);
+
+ actualResult = functionalMenuServiceImpl.getFunctionalMenuItemsForApp(appId);
+ assertEquals(actualResult, expectedResult);
+ }
+
+ @Test
+ public void getFunctionalMenuItemsForUserTest(){
+ String orgUserId = "test";
+ String sql = "SELECT DISTINCT m1.menu_id, m1.column_num, m1.text, m1.parent_menu_id, m1.url, m.active_yn "
+ + "FROM fn_menu_functional m, fn_menu_functional m1, fn_menu_functional_ancestors a, fn_menu_functional_roles mr, fn_user u , fn_user_role ur "
+ + "WHERE u.org_user_id='test' AND u.user_id = ur.user_id AND ur.app_id = mr.app_id AND (ur.role_id = mr.role_id OR ur.role_id = '999') "
+ + "AND m.menu_id = mr.menu_id AND UPPER(m.active_yn) = 'Y' AND UPPER(m1.active_yn) ='Y' AND a.menu_id = m.menu_id "
+ + "AND a.ancestor_menu_id = m1.menu_id UNION select m1.menu_id, m1.column_num, m1.text, m1.parent_menu_id, m1.url, m1.active_yn "
+ + "FROM fn_menu_functional m, fn_menu_functional_roles mr, fn_menu_functional m1, fn_menu_functional_ancestors a where a.menu_id = m.menu_id AND a.ancestor_menu_id = m1.menu_id AND m.menu_id != m1.menu_id AND m.menu_id = mr.menu_id AND mr.role_id = '900' AND UPPER(m.active_yn) = 'Y' AND UPPER(m1.active_yn) ='Y' UNION SELECT m.menu_id, m.column_num, m.text, m.parent_menu_id, m.url, m.active_yn FROM fn_menu_functional m WHERE m.text in ('Favorites','Get Access','Contact Us','Support','User Guide','Help')";
+ List<FunctionalMenuItem> actualResult = new ArrayList<FunctionalMenuItem>();
+ List<FunctionalMenuItem> expectedResult = new ArrayList<FunctionalMenuItem>();
+
+ Mockito.when(dataAccessService.executeSQLQuery(sql, FunctionalMenuItemWithAppID.class, null)).thenReturn(expectedResult);
+
+ actualResult = functionalMenuServiceImpl.getFunctionalMenuItemsForUser(orgUserId);
+ assertEquals(actualResult, expectedResult);
+ }
+
+ @Test
+ public void getFunctionalMenuItemDetailsTest(){
+ Integer menuid = 1;
+ String sql = "SELECT * FROM fn_menu_functional_roles WHERE menu_id = '1'";
+ FunctionalMenuItem actualResult = null;
+ FunctionalMenuItem expectedResult = null;
+ List<FunctionalMenuRole> roleItems = new ArrayList<FunctionalMenuRole>();
+ Mockito.when(dataAccessService.executeSQLQuery(sql, FunctionalMenuItemWithAppID.class, null)).thenReturn(roleItems);
+
+ actualResult = functionalMenuServiceImpl.getFunctionalMenuItemDetails(menuid);
+ assertEquals(actualResult, expectedResult);
+ }
+
+ @Test
+ public void getFavoriteItemsTest(){
+ Long userId = (long)1;
+ String sql = "SELECT DISTINCT f.user_id,f.menu_id,m.text,m.url "
+ + "FROM fn_menu_favorites f, fn_menu_functional m, fn_menu_functional_roles mr "
+ + "WHERE f.user_id='1' AND f.menu_id = m.menu_id AND f.menu_id = mr.menu_id AND mr.role_id != '900' ";
+ List<FavoritesFunctionalMenuItemJson> actualResult = new ArrayList<FavoritesFunctionalMenuItemJson>();
+ List<FavoritesFunctionalMenuItemJson> expectedResult = new ArrayList<FavoritesFunctionalMenuItemJson>();
+
+ Mockito.when(dataAccessService.executeSQLQuery(sql, FavoritesFunctionalMenuItemJson.class, null)).thenReturn(expectedResult);
+
+ actualResult = functionalMenuServiceImpl.getFavoriteItems(userId);
+ assertEquals(actualResult, expectedResult);
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/service/GetAccessServiceImplTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/service/GetAccessServiceImplTest.java
new file mode 100644
index 00000000..e689fab7
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/service/GetAccessServiceImplTest.java
@@ -0,0 +1,50 @@
+package org.openecomp.portalapp.portal.test.service;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.domain.GetAccessResult;
+import org.openecomp.portalapp.portal.service.GetAccessServiceImpl;
+import org.openecomp.portalapp.portal.test.core.MockEPUser;
+import org.openecomp.portalsdk.core.service.DataAccessService;
+import org.openecomp.portalsdk.core.service.DataAccessServiceImpl;
+
+public class GetAccessServiceImplTest {
+
+
+ @Mock
+ DataAccessService dataAccessService = new DataAccessServiceImpl();
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ @InjectMocks
+ GetAccessServiceImpl getAccessServiceImpl = new GetAccessServiceImpl();
+
+ MockEPUser mockUser = new MockEPUser();
+
+ @Test
+ public void getAppAccessListTest()
+ {
+ EPUser user = mockUser.mockEPUser();
+ Map<String, Long> params = new HashMap<>();
+ params.put("userId", user.getId());
+ List<GetAccessResult> appAccessList = new ArrayList<>();
+ Mockito.when(dataAccessService.executeNamedQuery("getAppAccessFunctionRole", params, null)).thenReturn(appAccessList);
+
+ List<GetAccessResult> expectedAppAccessList = getAccessServiceImpl.getAppAccessList(user);
+ assertEquals(expectedAppAccessList, appAccessList);
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/service/LicenseableClassImplTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/service/LicenseableClassImplTest.java
new file mode 100644
index 00000000..5c4cb5b4
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/service/LicenseableClassImplTest.java
@@ -0,0 +1,61 @@
+package org.openecomp.portalapp.portal.test.service;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
+import java.io.IOException;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.lm.LicenseableClassImpl;
+
+public class LicenseableClassImplTest {
+
+ @InjectMocks
+ LicenseableClassImpl licenseableClassImpl= new LicenseableClassImpl();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ @Test
+ public void getApplicationNameTest()
+ {
+ assertEquals(licenseableClassImpl.getApplicationName(), "");
+ }
+ @Test
+ public void getPublicKeystoreAsInputStreamTest() throws IOException
+ {
+ assertNull(licenseableClassImpl.getPublicKeystoreAsInputStream());
+ }
+ @Test
+ public void getAliasTest()
+ {
+ assertEquals(licenseableClassImpl.getAlias(), "");
+ }
+ @Test
+ public void getKeyPasswdTest()
+ {
+ assertEquals(licenseableClassImpl.getKeyPasswd(), "");
+ }
+ @Test
+ public void getPublicKeystorePasswordTest()
+ {
+ assertEquals(licenseableClassImpl.getPublicKeystorePassword(), "");
+ }
+ @Test
+ public void getCipherParamPasswordTest()
+ {
+ assertEquals(licenseableClassImpl.getPublicKeystorePassword(), "");
+ }
+ @Test
+ public void getClassToLicenseTest()
+ {
+ assertEquals(licenseableClassImpl.getClassToLicense(), LicenseableClassImpl.class);
+ }
+
+
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/service/ManifestServiceImplTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/service/ManifestServiceImplTest.java
new file mode 100644
index 00000000..f2b6036e
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/service/ManifestServiceImplTest.java
@@ -0,0 +1,55 @@
+package org.openecomp.portalapp.portal.test.service;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.jar.Attributes;
+
+import javax.servlet.ServletContext;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.service.ManifestServiceImpl;
+
+public class ManifestServiceImplTest {
+
+ @Mock
+ ServletContext context;
+
+ @Mock
+ ServletContext context1 = null;
+
+ @InjectMocks
+ ManifestServiceImpl manifestServiceImpl = new ManifestServiceImpl();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ NullPointerException nullPointerException = new NullPointerException();
+
+ @Test
+ public void getWebappManifestTest() throws IOException {
+ final String MANIFEST_RESOURCE_PATH = "/META-INF/MANIFEST.MF";
+ InputStream inputStream = new ByteArrayInputStream("test data".getBytes());
+ Mockito.when(context.getResourceAsStream(MANIFEST_RESOURCE_PATH)).thenReturn(inputStream);
+ Attributes attributes = manifestServiceImpl.getWebappManifest();
+ assertTrue(attributes.size() == 0);
+ }
+
+ @Test(expected = java.lang.NullPointerException.class)
+ public void getWebappManifestExceptionTest() throws IOException {
+ final String MANIFEST_RESOURCE_PATH = "/META-INF/MANIFEST.MF";
+ InputStream inputStream = new ByteArrayInputStream("test data".getBytes());
+ Mockito.when(context1.getResourceAsStream(MANIFEST_RESOURCE_PATH)).thenThrow(nullPointerException);
+ Attributes attributes = manifestServiceImpl.getWebappManifest();
+ assertTrue(attributes.size() == 0);
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/service/PersUserAppServiceImplTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/service/PersUserAppServiceImplTest.java
new file mode 100644
index 00000000..bdd6cbd1
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/test/service/PersUserAppServiceImplTest.java
@@ -0,0 +1,181 @@
+package org.openecomp.portalapp.portal.test.service;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.domain.EPApp;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.domain.EPUserApp;
+import org.openecomp.portalapp.portal.domain.PersUserAppSelection;
+import org.openecomp.portalapp.portal.service.AdminRolesService;
+import org.openecomp.portalapp.portal.service.PersUserAppServiceImpl;
+import org.openecomp.portalapp.portal.service.UserRolesService;
+import org.openecomp.portalapp.portal.test.core.MockEPUser;
+import org.openecomp.portalapp.test.framework.MockitoTestSuite;
+import org.openecomp.portalsdk.core.service.DataAccessService;
+
+public class PersUserAppServiceImplTest {
+
+ @Mock
+ DataAccessService dataAccessService;
+ @Mock
+ AdminRolesService adminRolesService;
+ @Mock
+ UserRolesService userRolesService;
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ @InjectMocks
+ PersUserAppServiceImpl persUserAppServiceImpl = new PersUserAppServiceImpl();
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+ NullPointerException nullPointerException = new NullPointerException();
+ MockEPUser mockUser = new MockEPUser();
+
+ public EPApp getApp() {
+ EPApp app = new EPApp();
+ app.setName("Test");
+ app.setImageUrl("test");
+ app.setDescription("test");
+ app.setNotes("test");
+ app.setUrl("test");
+ app.setId((long) 1);
+ app.setAppRestEndpoint("test");
+ app.setAlternateUrl("test");
+ app.setName("test");
+ app.setMlAppName("test");
+ app.setMlAppAdminId("test");
+ app.setUsername("test");
+ app.setAppPassword("test");
+ app.setOpen(true);
+ app.setEnabled(false);
+ app.setUebKey("test");
+ app.setUebSecret("test");
+ app.setUebTopicName("test");
+ app.setAppType(1);
+ return app;
+ }
+
+ @Test(expected = IllegalArgumentException.class)
+ public void setPersUserAppValueIfUserNull() {
+ persUserAppServiceImpl.setPersUserAppValue(null, null, false, false);
+ }
+
+ @Test
+ public void setPersUserAppValueTest() {
+ EPApp app = getApp();
+ EPUser user = mockUser.mockEPUser();
+ List<PersUserAppSelection> persUserAppSelectionList = new ArrayList<>();
+ PersUserAppSelection persUserAppSelection = new PersUserAppSelection();
+ persUserAppSelection.setId((long) 1);
+ persUserAppSelectionList.add(persUserAppSelection);
+ Mockito.when(dataAccessService.getList(PersUserAppSelection.class, "test", null, null))
+ .thenReturn(persUserAppSelectionList);
+ Mockito.doNothing().when(dataAccessService).deleteDomainObject(persUserAppSelection, null);
+ persUserAppServiceImpl.setPersUserAppValue(user, app, false, true);
+ }
+
+ @Test
+ public void setPersUserAppValueIfSelectTest() {
+ EPApp app = getApp();
+ EPUser user = mockUser.mockEPUser();
+ List<PersUserAppSelection> persUserAppSelectionList = new ArrayList<>();
+ PersUserAppSelection persUserAppSelection = new PersUserAppSelection();
+ persUserAppSelection.setId((long) 1);
+ persUserAppSelectionList.add(persUserAppSelection);
+ Mockito.when(dataAccessService.getList(PersUserAppSelection.class, "test", null, null))
+ .thenReturn(persUserAppSelectionList);
+ Mockito.doNothing().when(dataAccessService).saveDomainObject(persUserAppSelection, null);
+ persUserAppServiceImpl.setPersUserAppValue(user, app, true, true);
+ }
+
+ @Test
+ public void setPersUserAppValueIfOpenTest() {
+ EPApp app = getApp();
+ app.setOpen(false);
+ EPUser user = mockUser.mockEPUser();
+ List<PersUserAppSelection> persUserAppSelectionList = new ArrayList<>();
+ PersUserAppSelection persUserAppSelection = new PersUserAppSelection();
+ persUserAppSelection.setId((long) 1);
+ persUserAppSelectionList.add(persUserAppSelection);
+ Mockito.when(dataAccessService.getList(PersUserAppSelection.class, "test", null, null))
+ .thenReturn(persUserAppSelectionList);
+ Mockito.doNothing().when(dataAccessService).saveDomainObject(persUserAppSelection, null);
+ persUserAppServiceImpl.setPersUserAppValue(user, app, true, true);
+ }
+
+ @Test
+ public void setPersUserAppValueIfAppNotOpenTest() {
+ EPApp app = getApp();
+ app.setOpen(false);
+ EPUser user = mockUser.mockEPUser();
+ List<PersUserAppSelection> persUserAppSelectionList = new ArrayList<>();
+ PersUserAppSelection persUserAppSelection = new PersUserAppSelection();
+ persUserAppSelection.setId((long) 1);
+ persUserAppSelectionList.add(persUserAppSelection);
+ Mockito.when(dataAccessService.getList(PersUserAppSelection.class, "test", null, null))
+ .thenReturn(persUserAppSelectionList);
+ Mockito.doNothing().when(dataAccessService).saveDomainObject(persUserAppSelection, null);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ List<EPUserApp> roles = new ArrayList<>();
+ EPUserApp epUserApp = new EPUserApp();
+ roles.add(epUserApp);
+ Mockito.when(userRolesService.getCachedAppRolesForUser(app.getId(), user.getId())).thenReturn(roles);
+ persUserAppServiceImpl.setPersUserAppValue(user, app, true, false);
+ }
+
+ @Test
+ public void setPersUserAppValueIfNotPortalAdminTest() {
+ EPApp app = getApp();
+ app.setOpen(false);
+ EPUser user = mockUser.mockEPUser();
+ List<PersUserAppSelection> persUserAppSelectionList = new ArrayList<>();
+ PersUserAppSelection persUserAppSelection = new PersUserAppSelection();
+ persUserAppSelection.setId((long) 1);
+ persUserAppSelectionList.add(persUserAppSelection);
+ Mockito.when(dataAccessService.getList(PersUserAppSelection.class, "test", null, null))
+ .thenReturn(persUserAppSelectionList);
+ Mockito.doNothing().when(dataAccessService).deleteDomainObject(persUserAppSelection, null);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+ List<EPUserApp> roles = new ArrayList<>();
+ EPUserApp epUserApp = new EPUserApp();
+ roles.add(epUserApp);
+ Mockito.when(userRolesService.getCachedAppRolesForUser(app.getId(), user.getId())).thenReturn(roles);
+ persUserAppServiceImpl.setPersUserAppValue(user, app, true, false);
+ }
+
+ @Test
+ public void setPersUserAppValueNewTest() {
+ EPApp app = getApp();
+ app.setOpen(false);
+ EPUser user = mockUser.mockEPUser();
+ List<PersUserAppSelection> persUserAppSelectionList = new ArrayList<>();
+ PersUserAppSelection persUserAppSelection = new PersUserAppSelection();
+ persUserAppSelection.setId((long) 1);
+ persUserAppSelectionList.add(persUserAppSelection);
+ Mockito.when(dataAccessService.getList(PersUserAppSelection.class, "test", null, null))
+ .thenReturn(persUserAppSelectionList);
+ Mockito.doNothing().when(dataAccessService).saveDomainObject(persUserAppSelection, null);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ List<EPUserApp> roles = new ArrayList<>();
+ EPUserApp epUserApp = new EPUserApp();
+ roles.add(epUserApp);
+ Mockito.when(userRolesService.getCachedAppRolesForUser(app.getId(), user.getId())).thenReturn(roles);
+ persUserAppServiceImpl.setPersUserAppValue(user, app, false, false);
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/AnalyticsTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/AnalyticsTest.java
new file mode 100644
index 00000000..7fd3c03f
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/AnalyticsTest.java
@@ -0,0 +1,33 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.Analytics;
+
+public class AnalyticsTest {
+
+ public Analytics mockAnalytics(){
+ Analytics analytics = new Analytics();
+
+ analytics.setAction("test");
+ analytics.setPage("test");
+ analytics.setFunction("test");
+ analytics.setUserid("test");
+ analytics.setType("test");
+
+ return analytics;
+ }
+
+ @Test
+ public void analyticsTest(){
+ Analytics analytics = mockAnalytics();
+
+ assertEquals(analytics.getAction(), "test");
+ assertEquals(analytics.getPage(), "test");
+ assertEquals(analytics.getFunction(), "test");
+ assertEquals(analytics.getUserid(), "test");
+ assertEquals(analytics.getType(), "test");
+
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/AppCatalogPersonalizationTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/AppCatalogPersonalizationTest.java
new file mode 100644
index 00000000..c583c9cd
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/AppCatalogPersonalizationTest.java
@@ -0,0 +1,25 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+public class AppCatalogPersonalizationTest {
+
+ public AppCatalogPersonalization mockAppCatalogPersonalization(){
+ AppCatalogPersonalization appCatalogPersonalization = new AppCatalogPersonalization();
+
+ return appCatalogPersonalization;
+ }
+
+ @Test
+ public void appCatalogPersonalizationTest(){
+ AppCatalogPersonalization appCatalogPersonalization = mockAppCatalogPersonalization();
+
+ AppCatalogPersonalization appCatalogPersonalization1 = new AppCatalogPersonalization();
+
+ assertEquals(appCatalogPersonalization.hashCode(), appCatalogPersonalization1.hashCode());
+ assertTrue(appCatalogPersonalization.equals(appCatalogPersonalization1));
+ }
+
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/AppNameIdIsAdminTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/AppNameIdIsAdminTest.java
new file mode 100644
index 00000000..a1dffd28
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/AppNameIdIsAdminTest.java
@@ -0,0 +1,38 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.AppNameIdIsAdmin;
+
+public class AppNameIdIsAdminTest {
+
+ public AppNameIdIsAdmin mockAppNameIdIsAdmin(){
+ AppNameIdIsAdmin appNameIdIsAdmin = new AppNameIdIsAdmin();
+ appNameIdIsAdmin.setId((long)1);
+ appNameIdIsAdmin.setAppName("test");
+ appNameIdIsAdmin.setRestrictedApp(false);
+ appNameIdIsAdmin.setIsAdmin(false);
+ return appNameIdIsAdmin;
+ }
+
+ @Test
+ public void appNameIdIsAdminTest(){
+ AppNameIdIsAdmin appNameIdIsAdmin = mockAppNameIdIsAdmin();
+
+ AppNameIdIsAdmin appNameIdIsAdmin1 = new AppNameIdIsAdmin();
+ appNameIdIsAdmin1.setId((long)1);
+ appNameIdIsAdmin1.setAppName("test");
+ appNameIdIsAdmin1.setRestrictedApp(false);
+ appNameIdIsAdmin1.setIsAdmin(false);
+
+ assertEquals(appNameIdIsAdmin.getId(), new Long(1));
+ assertEquals(appNameIdIsAdmin.getAppName(), "test");
+ assertEquals(appNameIdIsAdmin.getRestrictedApp(), false);
+ assertEquals(appNameIdIsAdmin.getIsAdmin(), false);
+
+ assertEquals(appNameIdIsAdmin.toString(), "AppNameIdIsAdmin [id=1, appName=test, isAdmin=false, restrictedApp=false]");
+ assertEquals(appNameIdIsAdmin.hashCode(), appNameIdIsAdmin1.hashCode());
+ assertTrue(appNameIdIsAdmin.equals(appNameIdIsAdmin1));
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/AppWithRolesForUserTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/AppWithRolesForUserTest.java
new file mode 100644
index 00000000..2a7c343c
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/AppWithRolesForUserTest.java
@@ -0,0 +1,32 @@
+package org.openecomp.portalapp.portal.transport;
+
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import org.openecomp.portalapp.portal.transport.AppWithRolesForUser;
+
+public class AppWithRolesForUserTest {
+
+ public AppWithRolesForUser mockAppWithRolesForUser(){
+ AppWithRolesForUser appWithRolesForUser = new AppWithRolesForUser();
+
+ // List<RoleInAppForUser> appRoles = new ArrayList<RoleInAppForUser>();
+
+ appWithRolesForUser.setOrgUserId("test");
+ appWithRolesForUser.setAppId((long)1);
+ appWithRolesForUser.setAppName("test");
+ appWithRolesForUser.setAppRoles(null);
+
+ return appWithRolesForUser;
+ }
+
+ @Test
+ public void roleInAppForUserTest(){
+ AppWithRolesForUser appWithRolesForUser = mockAppWithRolesForUser();
+
+ assertEquals(appWithRolesForUser.getOrgUserId(), "test");
+ assertEquals(appWithRolesForUser.getAppId(), new Long(1));
+ assertEquals(appWithRolesForUser.getAppName(), "test");
+ assertEquals(appWithRolesForUser.getAppRoles(), null);
+ assertEquals(appWithRolesForUser.toString(), "AppWithRolesForUser [orgUserId=test, appId=1, appName=test, appRoles=null]");
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/AppsListWithAdminRoleTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/AppsListWithAdminRoleTest.java
new file mode 100644
index 00000000..2c601d3c
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/AppsListWithAdminRoleTest.java
@@ -0,0 +1,46 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.*;
+
+import java.util.ArrayList;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.AppNameIdIsAdmin;
+import org.openecomp.portalapp.portal.transport.AppsListWithAdminRole;
+
+public class AppsListWithAdminRoleTest {
+
+ public AppsListWithAdminRole mockAppsListWithAdminRole(){
+ AppsListWithAdminRole appsListWithAdminRole = new AppsListWithAdminRole();
+
+ ArrayList<AppNameIdIsAdmin> appsRoles = new ArrayList<AppNameIdIsAdmin>();
+ AppNameIdIsAdmin appNameIdIsAdmin = new AppNameIdIsAdmin();
+ appsRoles.add(appNameIdIsAdmin);
+
+ appsListWithAdminRole.setOrgUserId("test");
+ appsListWithAdminRole.setAppsRoles(appsRoles);
+
+ return appsListWithAdminRole;
+ }
+
+ @Test
+ public void appsListWithAdminRoleTest(){
+ AppsListWithAdminRole appsListWithAdminRole = mockAppsListWithAdminRole();
+
+ AppsListWithAdminRole appsListWithAdminRole1 = new AppsListWithAdminRole();
+
+ ArrayList<AppNameIdIsAdmin> appsRoles = new ArrayList<AppNameIdIsAdmin>();
+ AppNameIdIsAdmin appNameIdIsAdmin = new AppNameIdIsAdmin();
+ appsRoles.add(appNameIdIsAdmin);
+
+ appsListWithAdminRole1.setOrgUserId("test");
+ appsListWithAdminRole1.setAppsRoles(appsRoles);
+
+ assertEquals(appsListWithAdminRole.getOrgUserId(), "test");
+ assertEquals(appsListWithAdminRole.getAppsRoles(), appsRoles);
+
+ assertTrue(appsListWithAdminRole.equals(appsListWithAdminRole1));
+ assertEquals(appsListWithAdminRole.hashCode(), appsListWithAdminRole1.hashCode());
+ assertEquals(appsListWithAdminRole.toString(), "AppsListWithAdminRole [orgUserId=test, appsRoles=[AppNameIdIsAdmin [id=null, appName=null, isAdmin=null, restrictedApp=null]]]");
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/BulkUploadRoleFunctionTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/BulkUploadRoleFunctionTest.java
new file mode 100644
index 00000000..854afccc
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/BulkUploadRoleFunctionTest.java
@@ -0,0 +1,35 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.BulkUploadRoleFunction;
+
+public class BulkUploadRoleFunctionTest {
+
+ public BulkUploadRoleFunction mockBulkUploadRoleFunction(){
+
+ BulkUploadRoleFunction bulkUploadRoleFunction = new BulkUploadRoleFunction();
+
+ bulkUploadRoleFunction.setFunctionName("test");
+ bulkUploadRoleFunction.setFunctionCd("test");
+
+ return bulkUploadRoleFunction;
+ }
+
+ @Test
+ public void bulkUploadRoleFunctionTest(){
+ BulkUploadRoleFunction bulkUploadRoleFunction = mockBulkUploadRoleFunction();
+
+ BulkUploadRoleFunction bulkUploadRoleFunction1 = new BulkUploadRoleFunction();
+
+ bulkUploadRoleFunction1.setFunctionName("test");
+ bulkUploadRoleFunction1.setFunctionCd("test");
+
+ assertEquals(bulkUploadRoleFunction.getFunctionCd(), "test");
+ assertEquals(bulkUploadRoleFunction.getFunctionName(), "test");
+ assertEquals(bulkUploadRoleFunction.hashCode(), bulkUploadRoleFunction1.hashCode());
+ assertTrue(bulkUploadRoleFunction.equals(bulkUploadRoleFunction1));
+
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/BulkUploadUserRolesTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/BulkUploadUserRolesTest.java
new file mode 100644
index 00000000..b2bbba68
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/BulkUploadUserRolesTest.java
@@ -0,0 +1,37 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.BulkUploadUserRoles;
+
+public class BulkUploadUserRolesTest {
+
+ public BulkUploadUserRoles mockBulkUploadUserRoles(){
+ BulkUploadUserRoles bulkUploadUserRoles = new BulkUploadUserRoles();
+
+ bulkUploadUserRoles.setRoleName("test");
+ bulkUploadUserRoles.setOrgUserId("test");
+ bulkUploadUserRoles.setAppNameSpace("test");
+
+ return bulkUploadUserRoles;
+ }
+
+ @Test
+ public void bulkUploadUserRolesTest(){
+ BulkUploadUserRoles bulkUploadUserRoles = mockBulkUploadUserRoles();
+
+ BulkUploadUserRoles bulkUploadUserRoles1 = new BulkUploadUserRoles();
+
+ bulkUploadUserRoles1.setRoleName("test");
+ bulkUploadUserRoles1.setOrgUserId("test");
+ bulkUploadUserRoles1.setAppNameSpace("test");
+
+ assertEquals(bulkUploadUserRoles.getRoleName(), "test");
+ assertEquals(bulkUploadUserRoles.getOrgUserId(), "test");
+ assertEquals(bulkUploadUserRoles.getAppNameSpace(), "test");
+
+ assertEquals(bulkUploadUserRoles.hashCode(), bulkUploadUserRoles1.hashCode());
+ assertTrue(bulkUploadUserRoles.equals(bulkUploadUserRoles1));
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/BusinessCardApplicationRoleTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/BusinessCardApplicationRoleTest.java
new file mode 100644
index 00000000..0ed06b12
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/BusinessCardApplicationRoleTest.java
@@ -0,0 +1,26 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+public class BusinessCardApplicationRoleTest {
+
+ public BusinessCardApplicationRole mockBusinessCardApplicationRole(){
+ BusinessCardApplicationRole businessCardApplicationRole = new BusinessCardApplicationRole();
+
+ return businessCardApplicationRole;
+ }
+
+ @Test
+ public void businessCardApplicationRoleTest(){
+ BusinessCardApplicationRole businessCardApplicationRole = mockBusinessCardApplicationRole();
+
+ BusinessCardApplicationRole businessCardApplicationRole1 = new BusinessCardApplicationRole();
+
+ assertEquals(businessCardApplicationRole.hashCode(), businessCardApplicationRole1.hashCode());
+ assertTrue(businessCardApplicationRole.equals(businessCardApplicationRole1));
+ assertEquals(businessCardApplicationRole.toString(), "BusinessCardUserApplicationRoles [appName=null, roleName=null]");
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/BusinessCardApplicationRolesListTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/BusinessCardApplicationRolesListTest.java
new file mode 100644
index 00000000..9f5e6785
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/BusinessCardApplicationRolesListTest.java
@@ -0,0 +1,26 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+public class BusinessCardApplicationRolesListTest {
+
+ public BusinessCardApplicationRolesList mockBusinessCardApplicationRolesList(){
+ BusinessCardApplicationRolesList businessCardApplicationRolesList = new BusinessCardApplicationRolesList();
+
+ return businessCardApplicationRolesList;
+ }
+
+ @Test
+ public void businessCardApplicationRolesListTest(){
+ BusinessCardApplicationRolesList businessCardApplicationRolesList = mockBusinessCardApplicationRolesList();
+
+ BusinessCardApplicationRolesList businessCardApplicationRolesList1 = new BusinessCardApplicationRolesList();
+
+ assertEquals(businessCardApplicationRolesList.hashCode(), businessCardApplicationRolesList1.hashCode());
+ assertTrue(businessCardApplicationRolesList.equals(businessCardApplicationRolesList1));
+ assertEquals(businessCardApplicationRolesList.toString(), "BusinessCardUserAppRoles [appName=null, roleNames=null]");
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/CentralAppTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/CentralAppTest.java
new file mode 100644
index 00000000..97c9c59f
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/CentralAppTest.java
@@ -0,0 +1,102 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.CentralApp;
+
+public class CentralAppTest {
+
+ public CentralApp mockCentralApp(){
+ CentralApp centralApp = new CentralApp((long)1, null, null, (long)1, (long)1, (long)1, "test", "test", "test", "test", "test", "test", "test", "test", "test",
+ "test", "test", "test", "test", null, "test", "test", "test", "test");
+
+
+ /* public CentralApp(Long id, Date created, Date modified, Long createdId, Long modifiedId, Long rowNum, String name,
+ String imageUrl, String description, String notes, String url, String alternateUrl, String restEndpoint,
+ String mlAppName, String mlAppAdminId, String motsId, String appPassword, String open, String enabled,
+ byte[] thumbnail, String username, String uebKey, String uebSecret, String uebTopicName)*/
+
+ centralApp.setId((long)1);
+ centralApp.setCreatedId((long)1);
+ centralApp.setModifiedId((long)1);
+ centralApp.setRowNum((long)1);
+ centralApp.setName("test");
+ centralApp.setImageUrl("test");
+ centralApp.setDescription("test");
+ centralApp.setNotes("test");
+ centralApp.setUrl("test");
+ centralApp.setAlternateUrl("test");
+ centralApp.setRestEndpoint("test");
+ centralApp.setMlAppName("test");
+ centralApp.setMlAppAdminId("test");
+ centralApp.setMotsId("test");
+ centralApp.setAppPassword("test");
+ centralApp.setOpen("test");
+ centralApp.setEnabled("test");
+ centralApp.setUsername("test");
+ centralApp.setUebKey("test");
+ centralApp.setUebSecret("test");
+ centralApp.setUebTopicName("test");
+
+ return centralApp;
+ }
+
+ @Test
+ public void centralAppTest(){
+ CentralApp centralApp = mockCentralApp();
+
+ CentralApp centralApp1 = new CentralApp((long)1, null, null, (long)1, (long)1, (long)1, "test", "test", "test", "test", "test", "test", "test", "test", "test",
+ "test", "test", "test", "test", null, "test", "test", "test", "test");
+
+ /*centralApp1.setId((long)1);
+ centralApp1.setCreatedId((long)1);
+ centralApp1.setModifiedId((long)1);
+ centralApp1.setRowNum((long)1);
+ centralApp1.setName("test");
+ centralApp1.setImageUrl("test");
+ centralApp1.setDescription("test");
+ centralApp1.setNotes("test");
+ centralApp1.setUrl("test");
+ centralApp1.setAlternateUrl("test");
+ centralApp1.setRestEndpoint("test");
+ centralApp1.setMlAppName("test");
+ centralApp1.setMlAppAdminId("test");
+ centralApp1.setMotsId("test");
+ centralApp1.setAppPassword("test");
+ centralApp1.setOpen("test");
+ centralApp1.setEnabled("test");
+ centralApp1.setUsername("test");
+ centralApp1.setUebKey("test");
+ centralApp1.setUebSecret("test");
+ centralApp1.setUebTopicName("test");*/
+
+ assertEquals(centralApp.getId(), new Long(1));
+ assertEquals(centralApp.getCreatedId(), new Long(1));
+ assertEquals(centralApp.getModifiedId(), new Long(1));
+ assertEquals(centralApp.getRowNum(), new Long(1));
+ assertEquals(centralApp.getName(), "test");
+ assertEquals(centralApp.getImageUrl(), "test");
+ assertEquals(centralApp.getDescription(), "test");
+ assertEquals(centralApp.getNotes(), "test");
+ assertEquals(centralApp.getUrl(), "test");
+ assertEquals(centralApp.getAlternateUrl(), "test");
+ assertEquals(centralApp.getRestEndpoint(), "test");
+ assertEquals(centralApp.getMlAppName(), "test");
+ assertEquals(centralApp.getMlAppAdminId(), "test");
+ assertEquals(centralApp.getMotsId(), "test");
+ assertEquals(centralApp.getAppPassword(), "test");
+ assertEquals(centralApp.getOpen(), "test");
+ assertEquals(centralApp.getEnabled(), "test");
+ assertEquals(centralApp.getUsername(), "test");
+ assertEquals(centralApp.getUebKey(), "test");
+ assertEquals(centralApp.getUebSecret(), "test");
+ assertEquals(centralApp.getUebTopicName(), "test");
+
+ assertTrue(centralApp.equals(centralApp1));
+ assertEquals(centralApp.hashCode(), centralApp1.hashCode());
+ /* assertTrue(centralApp.equals(new CentralApp((long)1, null, null, (long)1, (long)1, (long)1, "test", "test", "test", "test", "test", "test", "test", "test", "test",
+ "test", "test", "test", "test", null, "test", "test", "test", "test")));*/
+ }
+
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/CentralRoleTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/CentralRoleTest.java
new file mode 100644
index 00000000..6ba0a444
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/CentralRoleTest.java
@@ -0,0 +1,63 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.*;
+
+import java.util.Date;
+import java.util.SortedSet;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.CentralRoleFunction;
+import org.openecomp.portalapp.portal.transport.CentralRole;
+
+public class CentralRoleTest {
+
+ public CentralRole mockCentralRole(){
+ CentralRole centralRole = new CentralRole((long)1, null, null, (long)1, (long)1, (long)1,
+ "test", false, 1, null, null, null);
+
+ centralRole.setId((long)1);
+ centralRole.setCreatedId((long)1);
+ centralRole.setModifiedId((long)1);
+ centralRole.setRowNum((long)1);
+ centralRole.setName("test");
+ centralRole.setActive(false);
+ centralRole.setPriority(1);
+
+ centralRole.setCreated(null);
+ centralRole.setModified(null);
+ centralRole.setRoleFunctions(null);
+ centralRole.setChildRoles(null);
+ centralRole.setParentRoles(null);
+
+ return centralRole;
+ }
+
+ @Test
+ public void centralRoleTest(){
+ CentralRole centralRole = mockCentralRole();
+
+ CentralRole centralRole1 = new CentralRole((long)1, null, null, (long)1, (long)1, (long)1,
+ "test", false, 1, null, null, null);
+
+ CentralRole centralRole2 = new CentralRole((long)1, "test");
+
+ assertEquals(centralRole.getId(), new Long(1));
+ assertEquals(centralRole.getCreatedId(), new Long(1));
+ assertEquals(centralRole.getModifiedId(), new Long(1));
+ assertEquals(centralRole.getRowNum(), new Long(1));
+ assertEquals(centralRole.getName(), "test");
+ assertEquals(centralRole.isActive(), false);
+ assertEquals(centralRole.getCreated(), null);
+ assertEquals(centralRole.getModified(), null);
+ assertEquals(centralRole.getRoleFunctions(), null);
+ assertEquals(centralRole.getChildRoles(), null);
+ assertEquals(centralRole.getParentRoles(), null);
+ assertEquals(centralRole.getPriority().toString(), "1");
+ assertEquals(centralRole.hashCode(), centralRole1.hashCode());
+ assertTrue(centralRole.equals(centralRole1));
+ assertEquals(centralRole, centralRole1);
+ assertEquals(centralRole2, new CentralRole((long)1, "test"));
+ }
+
+
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/CentralUserAppTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/CentralUserAppTest.java
new file mode 100644
index 00000000..f3582647
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/CentralUserAppTest.java
@@ -0,0 +1,41 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.assertEquals;
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.CentralApp;
+import org.openecomp.portalapp.portal.transport.CentralRole;
+import org.openecomp.portalapp.portal.transport.CentralUserApp;
+
+public class CentralUserAppTest {
+
+ public CentralUserApp mockCentralUserApp(){
+ CentralUserApp centralUserApp = new CentralUserApp();
+
+ CentralApp app = new CentralApp((long)1, null, null, (long)1, (long)1, (long)1, "test", "test", "test", "test", "test", "test", "test", "test", "test",
+ "test", "test", "test", "test", null, "test", "test", "test", "test");
+
+ CentralRole role = new CentralRole();
+
+ centralUserApp.setUserId((long)1);
+ centralUserApp.setApp(app);
+ centralUserApp.setRole(role);
+ centralUserApp.setPriority((short) 123);
+
+ return centralUserApp;
+ }
+
+ @Test
+ public void centralUserAppTest(){
+ CentralUserApp centralUserApp = mockCentralUserApp();
+
+ CentralApp app1 = new CentralApp((long)1, null, null, (long)1, (long)1, (long)1, "test", "test", "test", "test", "test", "test", "test", "test", "test",
+ "test", "test", "test", "test", null, "test", "test", "test", "test");
+
+ CentralRole role1 = new CentralRole();
+
+ assertEquals(centralUserApp.getUserId(), new Long(1));
+ assertEquals(centralUserApp.getPriority(), new Short((short) 123));
+ assertEquals(centralUserApp.getApp(), app1);
+ assertEquals(centralUserApp.getRole(), role1);
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/CentralUserTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/CentralUserTest.java
new file mode 100644
index 00000000..9df86bc9
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/CentralUserTest.java
@@ -0,0 +1,52 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.*;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.CentralRole;
+import org.openecomp.portalapp.portal.transport.CentralUser;
+import org.openecomp.portalapp.portal.transport.CentralUserApp;
+
+public class CentralUserTest {
+
+ public CentralUser mockCentralUser(){
+ Set<CentralUserApp> userApps = new HashSet<CentralUserApp>();
+ Set<CentralRole> pseudoRoles = new HashSet<CentralRole>();
+ CentralUser centralUser = new CentralUser((long)1, null, null, (long)1, (long)1, (long)1, (long)1,
+ (long)1, "test", "test", "test", "test", "test",
+ "test", "test", (long)1, "test", "test", "test",
+ "test", "test", "test", "test", "test", "test", "test",
+ "test", "test", "test", "test",
+ "test", "test", "test", "test", "test",
+ "test", "test", "test", "test", "test",
+ "test", "test", "test", "test", null,
+ false, false, (long)1, (long)1, false, "test", userApps, pseudoRoles);
+
+ return centralUser;
+ }
+
+ @Test
+ public void centralRoleTest(){
+ CentralUser centralUser = mockCentralUser();
+
+ Set<CentralUserApp> userApps = new HashSet<CentralUserApp>();
+ Set<CentralRole> pseudoRoles = new HashSet<CentralRole>();
+ CentralUser centralUser1 = new CentralUser((long)1, null, null, (long)1, (long)1, (long)1, (long)1,
+ (long)1, "test", "test", "test", "test", "test",
+ "test", "test", (long)1, "test", "test", "test",
+ "test", "test", "test", "test", "test", "test", "test",
+ "test", "test", "test", "test",
+ "test", "test", "test", "test", "test",
+ "test", "test", "test", "test", "test",
+ "test", "test", "test", "test", null,
+ false, false, (long)1, (long)1, false, "test", userApps, pseudoRoles);
+
+
+ assertEquals(centralUser, centralUser1);
+ assertEquals(centralUser.hashCode(), centralUser1.hashCode());
+ assertTrue(centralUser.equals(centralUser1));
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/EPAppsManualPreferenceTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/EPAppsManualPreferenceTest.java
new file mode 100644
index 00000000..6e8b4018
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/EPAppsManualPreferenceTest.java
@@ -0,0 +1,47 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.EPAppsManualPreference;
+
+public class EPAppsManualPreferenceTest {
+
+ public EPAppsManualPreference mockEPAppsManualPreference(){
+ EPAppsManualPreference epAppsManualPreference = new EPAppsManualPreference();
+
+ epAppsManualPreference.setAppid((long)1);
+ epAppsManualPreference.setCol(1);
+ epAppsManualPreference.setHeaderText("test");
+ epAppsManualPreference.setImageLink("test");
+ epAppsManualPreference.setOrder(1);
+ epAppsManualPreference.setRestrictedApp(false);
+ epAppsManualPreference.setRow(1);
+ epAppsManualPreference.setSizeX(1);
+ epAppsManualPreference.setSizeY(1);
+ epAppsManualPreference.setSubHeaderText("test");
+ epAppsManualPreference.setUrl("test");
+ epAppsManualPreference.setAddRemoveApps(false);
+
+ return epAppsManualPreference;
+ }
+
+ @Test
+ public void epAppsManualPreferenceTest(){
+
+ EPAppsManualPreference epAppsManualPreference = mockEPAppsManualPreference();
+
+ assertEquals(epAppsManualPreference.getAppid(), new Long(1));
+ assertEquals(epAppsManualPreference.getCol(), 1);
+ assertEquals(epAppsManualPreference.getHeaderText(), "test");
+ assertEquals(epAppsManualPreference.getImageLink(), "test");
+ assertEquals(epAppsManualPreference.getOrder(), 1);
+ assertEquals(epAppsManualPreference.isRestrictedApp(), false);
+ assertEquals(epAppsManualPreference.getRow(), 1);
+ assertEquals(epAppsManualPreference.getSizeX(), 1);
+ assertEquals(epAppsManualPreference.getSizeY(), 1);
+ assertEquals(epAppsManualPreference.getSubHeaderText(), "test");
+ assertEquals(epAppsManualPreference.getUrl(), "test");
+ assertEquals(epAppsManualPreference.isAddRemoveApps(), false);
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/EPAppsSortPreferenceTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/EPAppsSortPreferenceTest.java
new file mode 100644
index 00000000..6c67424a
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/EPAppsSortPreferenceTest.java
@@ -0,0 +1,29 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.EPAppsSortPreference;
+
+public class EPAppsSortPreferenceTest {
+
+ public EPAppsSortPreference mockEPAppsSortPreference(){
+ EPAppsSortPreference epAppsSortPreference = new EPAppsSortPreference();
+
+ epAppsSortPreference.setIndex(1);
+ epAppsSortPreference.setValue("test");
+ epAppsSortPreference.setTitle("test");
+
+ return epAppsSortPreference;
+ }
+
+ @Test
+ public void epAppsSortPreferenceTest(){
+ EPAppsSortPreference epAppsSortPreference = mockEPAppsSortPreference();
+
+ assertEquals(epAppsSortPreference.getIndex(), 1);
+ assertEquals(epAppsSortPreference.getValue(), "test");
+ assertEquals(epAppsSortPreference.getTitle(), "test");
+
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/EPDeleteAppsManualSortPrefTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/EPDeleteAppsManualSortPrefTest.java
new file mode 100644
index 00000000..78bb8474
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/EPDeleteAppsManualSortPrefTest.java
@@ -0,0 +1,29 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.EPDeleteAppsManualSortPref;
+
+public class EPDeleteAppsManualSortPrefTest {
+
+ public EPDeleteAppsManualSortPref mockEPDeleteAppsManualSortPref(){
+ EPDeleteAppsManualSortPref epDeleteAppsManualSortPref = new EPDeleteAppsManualSortPref();
+
+ epDeleteAppsManualSortPref.setAppId((long)1);
+ epDeleteAppsManualSortPref.setSelect(false);
+ epDeleteAppsManualSortPref.setPending(false);
+
+ return epDeleteAppsManualSortPref;
+ }
+
+ @Test
+ public void epDeleteAppsManualSortPrefTest(){
+ EPDeleteAppsManualSortPref epDeleteAppsManualSortPref = mockEPDeleteAppsManualSortPref();
+
+ assertEquals(epDeleteAppsManualSortPref.getAppId(), new Long(1));
+ assertEquals(epDeleteAppsManualSortPref.isSelect(), false);
+ assertEquals(epDeleteAppsManualSortPref.isPending(), false);
+
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/EPUserAppCurrentRolesTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/EPUserAppCurrentRolesTest.java
new file mode 100644
index 00000000..9c82ad37
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/EPUserAppCurrentRolesTest.java
@@ -0,0 +1,41 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.EPUserAppCurrentRoles;
+
+public class EPUserAppCurrentRolesTest {
+
+ public EPUserAppCurrentRoles mockEPUserAppCurrentRoles(){
+ EPUserAppCurrentRoles epUserAppCurrentRoles = new EPUserAppCurrentRoles();
+
+ epUserAppCurrentRoles.setRoleName("test");
+ epUserAppCurrentRoles.setUserId((long)1);
+ epUserAppCurrentRoles.setPriority("test");
+ epUserAppCurrentRoles.setRoleId((long)1);
+
+ return epUserAppCurrentRoles;
+ }
+
+ @Test
+ public void epUserAppCurrentRolesTest(){
+ EPUserAppCurrentRoles epUserAppCurrentRoles = mockEPUserAppCurrentRoles();
+
+ EPUserAppCurrentRoles epUserAppCurrentRoles1 = new EPUserAppCurrentRoles();
+
+ epUserAppCurrentRoles1.setRoleName("test");
+ epUserAppCurrentRoles1.setUserId((long)1);
+ epUserAppCurrentRoles1.setPriority("test");
+ epUserAppCurrentRoles1.setRoleId((long)1);
+
+ assertEquals(epUserAppCurrentRoles.getRoleName(), "test");
+ assertEquals(epUserAppCurrentRoles.getUserId(), new Long(1));
+ assertEquals(epUserAppCurrentRoles.getRoleId(), new Long(1));
+ assertEquals(epUserAppCurrentRoles.getPriority(), "test");
+ assertEquals(epUserAppCurrentRoles.hashCode(), epUserAppCurrentRoles1.hashCode());
+ assertTrue(epUserAppCurrentRoles.equals(epUserAppCurrentRoles1));
+
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/EPWidgetsSortPreferenceTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/EPWidgetsSortPreferenceTest.java
new file mode 100644
index 00000000..d466d91c
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/EPWidgetsSortPreferenceTest.java
@@ -0,0 +1,41 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.EPWidgetsSortPreference;
+
+public class EPWidgetsSortPreferenceTest {
+
+ public EPWidgetsSortPreference mockEPWidgetsSortPreference(){
+ EPWidgetsSortPreference epWidgetsSortPreference = new EPWidgetsSortPreference();
+
+ epWidgetsSortPreference.setSizeX(1);
+ epWidgetsSortPreference.setSizeY(1);
+ epWidgetsSortPreference.setHeaderText("test");
+ epWidgetsSortPreference.setUrl("test");
+ epWidgetsSortPreference.setWidgetid((long)1);
+ epWidgetsSortPreference.setWidgetIdentifier("test");
+ epWidgetsSortPreference.setRow(1);
+ epWidgetsSortPreference.setCol(1);
+
+ return epWidgetsSortPreference;
+ }
+
+ @Test
+ public void epWidgetsSortPreferenceTest(){
+ EPWidgetsSortPreference epWidgetsSortPreference = mockEPWidgetsSortPreference();
+
+ assertEquals(epWidgetsSortPreference.getSizeX(), 1);
+ assertEquals(epWidgetsSortPreference.getSizeY(), 1);
+ assertEquals(epWidgetsSortPreference.getHeaderText(), "test");
+ assertEquals(epWidgetsSortPreference.getUrl(), "test");
+ assertEquals(epWidgetsSortPreference.getWidgetid(), new Long(1));
+ assertEquals(epWidgetsSortPreference.getWidgetIdentifier(), "test");
+ assertEquals(epWidgetsSortPreference.getRow(), 1);
+ assertEquals(epWidgetsSortPreference.getRow(), 1);
+
+ }
+
+
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/EcompUserAppRolesTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/EcompUserAppRolesTest.java
new file mode 100644
index 00000000..928c3737
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/EcompUserAppRolesTest.java
@@ -0,0 +1,33 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.EcompUserAppRoles;
+
+public class EcompUserAppRolesTest {
+
+ public EcompUserAppRoles mockEcompUserAppRoles(){
+ EcompUserAppRoles ecompUserAppRoles = new EcompUserAppRoles();
+
+ ecompUserAppRoles.setAppId("test");
+ ecompUserAppRoles.setUserId((long)1);
+ ecompUserAppRoles.setPriority("test");
+ ecompUserAppRoles.setRoleId((long)1);
+ ecompUserAppRoles.setRoleName("test");
+
+ return ecompUserAppRoles;
+ }
+
+ @Test
+ public void ecompUserAppRolesTest(){
+
+ EcompUserAppRoles ecompUserAppRoles = mockEcompUserAppRoles();
+
+ assertEquals(ecompUserAppRoles.getAppId(), "test");
+ assertEquals(ecompUserAppRoles.getPriority(), "test");
+ assertEquals(ecompUserAppRoles.getRoleName(), "test");
+ assertEquals(ecompUserAppRoles.getUserId(), new Long(1));
+ assertEquals(ecompUserAppRoles.getRoleId(), new Long(1));
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/EpNotificationItemExtVOTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/EpNotificationItemExtVOTest.java
new file mode 100644
index 00000000..11fe2cf7
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/EpNotificationItemExtVOTest.java
@@ -0,0 +1,33 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.EpNotificationItemExtVO;
+
+public class EpNotificationItemExtVOTest {
+
+ public EpNotificationItemExtVO mockEpNotificationItemExtVO(){
+ EpNotificationItemExtVO epNotificationItemExtVO = new EpNotificationItemExtVO();
+
+ //epNotificationItemExtVO.setActiveYn("abc");
+ epNotificationItemExtVO.setMsgHeader("test");
+ epNotificationItemExtVO.setMsgDescription("test");
+ epNotificationItemExtVO.setPriority(1);
+ epNotificationItemExtVO.setCreatorId(1);
+ epNotificationItemExtVO.setLoginId("test");
+
+ return epNotificationItemExtVO;
+ }
+
+ @Test
+ public void epNotificationItemExtVOTest(){
+ EpNotificationItemExtVO epNotificationItemExtVO = mockEpNotificationItemExtVO();
+
+ assertEquals(epNotificationItemExtVO.getMsgHeader(), "test");
+ assertEquals(epNotificationItemExtVO.getMsgDescription(), "test");
+ assertEquals(epNotificationItemExtVO.getPriority().toString(), "1");
+ assertEquals(epNotificationItemExtVO.getCreatorId().toString(), "1");
+ assertEquals(epNotificationItemExtVO.getLoginId(), "test");
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/EpNotificationItemTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/EpNotificationItemTest.java
new file mode 100644
index 00000000..6e1e48c6
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/EpNotificationItemTest.java
@@ -0,0 +1,64 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.EpNotificationItem;
+
+public class EpNotificationItemTest {
+
+ public EpNotificationItem mockEpNotificationItem(){
+ EpNotificationItem epNotificationItem = new EpNotificationItem();
+
+ epNotificationItem.setNotificationId((long)1);
+ epNotificationItem.setIsForOnlineUsers("test");
+ epNotificationItem.setIsForAllRoles("test");
+ epNotificationItem.setActiveYn("test");
+ epNotificationItem.setMsgHeader("test");
+ epNotificationItem.setMsgDescription("test");
+ epNotificationItem.setMsgSource("test");
+
+ epNotificationItem.setPriority((long)1);
+ epNotificationItem.setCreatedId((long)1);
+ epNotificationItem.setNotificationHyperlink("test");
+
+ return epNotificationItem;
+ }
+
+ @Test
+ public void epNotificationItemTest(){
+ EpNotificationItem epNotificationItem = mockEpNotificationItem();
+
+ EpNotificationItem epNotificationItem1 = new EpNotificationItem();
+ epNotificationItem1.setNotificationId((long)1);
+ epNotificationItem1.setIsForOnlineUsers("test");
+ epNotificationItem1.setIsForAllRoles("test");
+ epNotificationItem1.setActiveYn("test");
+ epNotificationItem1.setMsgHeader("test");
+ epNotificationItem1.setMsgDescription("test");
+ epNotificationItem1.setMsgSource("test");
+
+ epNotificationItem1.setPriority((long)1);
+ epNotificationItem1.setCreatedId((long)1);
+ epNotificationItem1.setNotificationHyperlink("test");
+
+ assertEquals(epNotificationItem.getNotificationId(), new Long(1));
+ assertEquals(epNotificationItem.getIsForOnlineUsers(), "test");
+ assertEquals(epNotificationItem.getIsForAllRoles(), "test");
+ assertEquals(epNotificationItem.getActiveYn(), "test");
+ assertEquals(epNotificationItem.getMsgHeader(), "test");
+ assertEquals(epNotificationItem.getMsgDescription(), "test");
+ assertEquals(epNotificationItem.getMsgSource(), "test");
+ assertEquals(epNotificationItem.getPriority(), new Long(1));
+ assertEquals(epNotificationItem.getCreatedId(), new Long(1));
+ assertEquals(epNotificationItem.getNotificationHyperlink(), "test");
+
+ assertEquals(epNotificationItem.toString(), "EpNotificationItem [notificationId=1, isForOnlineUsers=test, isForAllRoles=test, activeYn=test, msgHeader=test, msgDescription=test, msgSource=test, startTime=null, endTime=null, priority=1, creatorId=null, createdDate=null, roles=null, roleIds=null]");
+ assertEquals(epNotificationItem.hashCode(), epNotificationItem1.hashCode());
+ assertTrue(epNotificationItem.equals(epNotificationItem1));
+
+ }
+
+}
+
+
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/EpNotificationItemVOTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/EpNotificationItemVOTest.java
new file mode 100644
index 00000000..35a11833
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/EpNotificationItemVOTest.java
@@ -0,0 +1,46 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.Date;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.EpNotificationItemVO;
+
+public class EpNotificationItemVOTest {
+
+ public EpNotificationItemVO mockEpNotificationItemVO(){
+ EpNotificationItemVO epNotificationItemVO = new EpNotificationItemVO();
+
+ epNotificationItemVO.setNotificationId(1);
+ epNotificationItemVO.setIsForOnlineUsers('a');
+ epNotificationItemVO.setIsForAllRoles('a');
+ epNotificationItemVO.setActiveYn('a');
+ epNotificationItemVO.setMsgHeader("test");
+ epNotificationItemVO.setMsgDescription("test");
+ epNotificationItemVO.setMsgSource("test");
+ epNotificationItemVO.setPriority(1);
+ epNotificationItemVO.setCreatorId(1);
+ epNotificationItemVO.setLoginId("test");
+ epNotificationItemVO.setNotificationHyperlink("test");
+
+ return epNotificationItemVO;
+ }
+
+ @Test
+ public void epNotificationItemVOTest(){
+ EpNotificationItemVO epNotificationItemVO = mockEpNotificationItemVO();
+
+ assertEquals(epNotificationItemVO.getNotificationId().toString(), "1");
+ /*assertEquals(epNotificationItemVO.getIsForOnlineUsers(), 'a');
+ assertEquals(epNotificationItemVO.getIsForAllRoles(), 'a');
+ assertEquals(epNotificationItemVO.getActiveYn(), 'a');*/
+ assertEquals(epNotificationItemVO.getMsgHeader(), "test");
+ assertEquals(epNotificationItemVO.getMsgDescription(), "test");
+ assertEquals(epNotificationItemVO.getMsgSource(), "test");
+ assertEquals(epNotificationItemVO.getPriority().toString(), "1");
+ assertEquals(epNotificationItemVO.getCreatorId().toString(), "1");
+ assertEquals(epNotificationItemVO.getLoginId(), "test");
+ assertEquals(epNotificationItemVO.getNotificationHyperlink(), "test");
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/EpRoleNotificationItemTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/EpRoleNotificationItemTest.java
new file mode 100644
index 00000000..beb67ba9
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/EpRoleNotificationItemTest.java
@@ -0,0 +1,31 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.EpRoleNotificationItem;
+
+public class EpRoleNotificationItemTest {
+
+ public EpRoleNotificationItem mockEpRoleNotificationItem(){
+ EpRoleNotificationItem epRoleNotificationItem = new EpRoleNotificationItem();
+
+ epRoleNotificationItem.setId((long)1);
+ epRoleNotificationItem.setNotificationId((long)1);
+ epRoleNotificationItem.setRoleId(1);
+ epRoleNotificationItem.setRecvUserId(1);
+
+ return epRoleNotificationItem;
+ }
+
+ @Test
+ public void epRoleNotificationItemTest(){
+ EpRoleNotificationItem epRoleNotificationItem = mockEpRoleNotificationItem();
+
+ assertEquals(epRoleNotificationItem.getId(), new Long(1));
+ assertEquals(epRoleNotificationItem.getNotificationId(), new Long(1));
+ assertEquals(epRoleNotificationItem.getRoleId().toString(), "1");
+ assertEquals(epRoleNotificationItem.getRecvUserId().toString(), "1");
+ }
+
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/ExternalAccessPermsDetailTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/ExternalAccessPermsDetailTest.java
new file mode 100644
index 00000000..f490973a
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/ExternalAccessPermsDetailTest.java
@@ -0,0 +1,39 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.ExternalAccessPermsDetail;
+
+public class ExternalAccessPermsDetailTest {
+
+ public ExternalAccessPermsDetail mockExternalAccessPermsDetail(){
+ ExternalAccessPermsDetail externalAccessPermsDetail = new ExternalAccessPermsDetail();
+
+ List<String> roles = new ArrayList<String>();
+
+ externalAccessPermsDetail.setType("test");
+ externalAccessPermsDetail.setInstance("test");
+ externalAccessPermsDetail.setAction("test");
+ externalAccessPermsDetail.setDescription("test");
+ externalAccessPermsDetail.setRoles(roles);
+
+ return externalAccessPermsDetail;
+ }
+
+ @Test
+ public void externalAccessPermsDetailTest(){
+ ExternalAccessPermsDetail externalAccessPermsDetail = mockExternalAccessPermsDetail();
+
+ List<String> roles = new ArrayList<String>();
+
+ assertEquals(externalAccessPermsDetail.getType(), "test");
+ assertEquals(externalAccessPermsDetail.getInstance(), "test");
+ assertEquals(externalAccessPermsDetail.getAction(), "test");
+ assertEquals(externalAccessPermsDetail.getDescription(), "test");
+ assertEquals(externalAccessPermsDetail.getRoles(), roles);
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/ExternalAccessPermsTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/ExternalAccessPermsTest.java
new file mode 100644
index 00000000..dfae6042
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/ExternalAccessPermsTest.java
@@ -0,0 +1,42 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.ExternalAccessPerms;
+
+public class ExternalAccessPermsTest {
+
+ public ExternalAccessPerms mockExternalAccessPerms(){
+ ExternalAccessPerms externalAccessPerms = new ExternalAccessPerms();
+
+ externalAccessPerms.setType("test");
+ externalAccessPerms.setInstance("test");
+ externalAccessPerms.setAction("test");
+ externalAccessPerms.setDescription("test");
+
+ return externalAccessPerms;
+ }
+
+ @Test
+ public void externalAccessPermsTest(){
+ ExternalAccessPerms externalAccessPerms = mockExternalAccessPerms();
+
+ ExternalAccessPerms externalAccessPerms1 = new ExternalAccessPerms("test", "test", "test");
+ ExternalAccessPerms externalAccessPerms2 = new ExternalAccessPerms("test", "test", "test", "test");
+ ExternalAccessPerms externalAccessPerms3 = new ExternalAccessPerms();
+ externalAccessPerms3.setType("test");
+ externalAccessPerms3.setInstance("test");
+ externalAccessPerms3.setAction("test");
+ externalAccessPerms3.setDescription("test");
+
+ assertEquals(externalAccessPerms.getType(), "test");
+ assertEquals(externalAccessPerms.getInstance(), "test");
+ assertEquals(externalAccessPerms.getAction(), "test");
+ assertEquals(externalAccessPerms.getDescription(), "test");
+ assertEquals(externalAccessPerms.hashCode(), externalAccessPerms3.hashCode());
+
+ assertTrue(externalAccessPerms1.equals(new ExternalAccessPerms("test", "test", "test")));
+ assertTrue(externalAccessPerms2.equals(new ExternalAccessPerms("test", "test", "test", "test")));
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/ExternalAccessRolePermsTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/ExternalAccessRolePermsTest.java
new file mode 100644
index 00000000..4e736eba
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/ExternalAccessRolePermsTest.java
@@ -0,0 +1,35 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.ExternalAccessPerms;
+import org.openecomp.portalapp.portal.transport.ExternalAccessRolePerms;
+
+public class ExternalAccessRolePermsTest {
+
+ public ExternalAccessRolePerms mockExternalAccessRolePerms(){
+ ExternalAccessPerms externalAccessPerms = new ExternalAccessPerms();
+ externalAccessPerms.setAction("test");
+ externalAccessPerms.setDescription("test");
+ externalAccessPerms.setInstance("test");
+ externalAccessPerms.setType("test");
+ ExternalAccessRolePerms ExternalAccessRolePerms = new ExternalAccessRolePerms(externalAccessPerms, "test");
+
+ return ExternalAccessRolePerms;
+ }
+
+ @Test
+ public void externalAccessRolePermsTest(){
+ ExternalAccessPerms externalAccessPerms = new ExternalAccessPerms();
+ externalAccessPerms.setAction("test");
+ externalAccessPerms.setDescription("test");
+ externalAccessPerms.setInstance("test");
+ externalAccessPerms.setType("test");
+
+ ExternalAccessRolePerms ExternalAccessRolePerms = mockExternalAccessRolePerms();
+
+ assertEquals(ExternalAccessRolePerms.getRole(), "test");
+ assertEquals(ExternalAccessRolePerms.getPerm(), externalAccessPerms);
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/ExternalAccessRoleTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/ExternalAccessRoleTest.java
new file mode 100644
index 00000000..19dee193
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/ExternalAccessRoleTest.java
@@ -0,0 +1,26 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.ExternalAccessRole;
+
+public class ExternalAccessRoleTest {
+
+ public ExternalAccessRole mockExternalAccessRole(){
+ ExternalAccessRole externalAccessRole = new ExternalAccessRole();
+
+ externalAccessRole.setName("test");
+ externalAccessRole.setDescription("test");
+
+ return externalAccessRole;
+ }
+
+ @Test
+ public void externalAccessRoleTest(){
+ ExternalAccessRole externalAccessRole = mockExternalAccessRole();
+
+ assertEquals(externalAccessRole.getName(), "test");
+ assertEquals(externalAccessRole.getDescription(), "test");
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/ExternalAccessUserRoleDetailTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/ExternalAccessUserRoleDetailTest.java
new file mode 100644
index 00000000..6ffab981
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/ExternalAccessUserRoleDetailTest.java
@@ -0,0 +1,47 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.ExternalAccessUserRoleDetail;
+import org.openecomp.portalapp.portal.transport.ExternalRoleDescription;
+
+public class ExternalAccessUserRoleDetailTest {
+
+ public ExternalAccessUserRoleDetail mockExternalAccessUserRoleDetail(){
+
+ ExternalRoleDescription externalRoleDescription = new ExternalRoleDescription();
+ externalRoleDescription.setId("test");
+ externalRoleDescription.setName("test");
+ externalRoleDescription.setActive("test");
+ externalRoleDescription.setPriority("test");
+ externalRoleDescription.setAppId("test");
+ externalRoleDescription.setAppRoleId("test");
+
+ ExternalAccessUserRoleDetail externalAccessUserRoleDetail = new ExternalAccessUserRoleDetail("test", externalRoleDescription);
+
+ externalAccessUserRoleDetail.setName("test");
+ externalAccessUserRoleDetail.setDescription(externalRoleDescription);
+ return externalAccessUserRoleDetail;
+ }
+
+ @Test
+ public void externalAccessUserRoleDetailTest(){
+ ExternalAccessUserRoleDetail externalAccessUserRoleDetail = mockExternalAccessUserRoleDetail();
+
+ ExternalRoleDescription externalRoleDescription1 = new ExternalRoleDescription();
+ externalRoleDescription1.setId("test");
+ externalRoleDescription1.setName("test");
+ externalRoleDescription1.setActive("test");
+ externalRoleDescription1.setPriority("test");
+ externalRoleDescription1.setAppId("test");
+ externalRoleDescription1.setAppRoleId("test");
+
+ ExternalAccessUserRoleDetail externalAccessUserRoleDetail1 = new ExternalAccessUserRoleDetail("test", externalRoleDescription1);
+
+ assertEquals(externalAccessUserRoleDetail.getName(), externalAccessUserRoleDetail1.getName());
+ assertEquals(externalAccessUserRoleDetail.getDescription(), externalAccessUserRoleDetail1.getDescription());
+ assertEquals(externalAccessUserRoleDetail.hashCode(), externalAccessUserRoleDetail1.hashCode());
+ assertTrue(externalAccessUserRoleDetail.equals(externalAccessUserRoleDetail1));
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/ExternalAccessUserTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/ExternalAccessUserTest.java
new file mode 100644
index 00000000..d2be97b1
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/ExternalAccessUserTest.java
@@ -0,0 +1,24 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.ExternalAccessUser;
+
+public class ExternalAccessUserTest {
+
+ public ExternalAccessUser mockExternalAccessUser(){
+ ExternalAccessUser externalAccessUser = new ExternalAccessUser("test", "test");
+
+ return externalAccessUser;
+ }
+
+ @Test
+ public void externalAccessUserTest(){
+ ExternalAccessUser externalAccessUser = mockExternalAccessUser();
+
+ assertEquals(externalAccessUser.getRole(), "test");
+ assertEquals(externalAccessUser.getUser(), "test");
+
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/ExternalRoleDescriptionTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/ExternalRoleDescriptionTest.java
new file mode 100644
index 00000000..5b6fe825
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/ExternalRoleDescriptionTest.java
@@ -0,0 +1,35 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.ExternalRoleDescription;
+
+public class ExternalRoleDescriptionTest {
+
+ public ExternalRoleDescription mockExternalRoleDescription(){
+
+ ExternalRoleDescription externalRoleDescription = new ExternalRoleDescription();
+
+ externalRoleDescription.setId("test");
+ externalRoleDescription.setName("test");
+ externalRoleDescription.setActive("test");
+ externalRoleDescription.setPriority("test");
+ externalRoleDescription.setAppId("test");
+ externalRoleDescription.setAppRoleId("test");
+
+ return externalRoleDescription;
+ }
+
+ @Test
+ public void externalRoleDescriptionTest(){
+ ExternalRoleDescription externalRoleDescription = mockExternalRoleDescription();
+
+ assertEquals(externalRoleDescription.getId(), "test");
+ assertEquals(externalRoleDescription.getName(), "test");
+ assertEquals(externalRoleDescription.getActive(), "test");
+ assertEquals(externalRoleDescription.getPriority(), "test");
+ assertEquals(externalRoleDescription.getAppId(), "test");
+ assertEquals(externalRoleDescription.getAppRoleId(), "test");
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/FunctionalMenuItemTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/FunctionalMenuItemTest.java
new file mode 100644
index 00000000..7d4b96e5
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/FunctionalMenuItemTest.java
@@ -0,0 +1,42 @@
+package org.openecomp.portalapp.portal.transport;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.FunctionalMenuItem;
+
+public class FunctionalMenuItemTest {
+
+ public FunctionalMenuItem mockFunctionalMenuItem(){
+ FunctionalMenuItem functionalMenuItem = new FunctionalMenuItem();
+
+ List<Integer> roles = new ArrayList<Integer>();
+
+ functionalMenuItem.setRestrictedApp(false);
+ functionalMenuItem.setUrl("test");
+ functionalMenuItem.setRoles(roles);
+
+ return functionalMenuItem;
+ }
+
+ @Test
+ public void functionalMenuItemTest(){
+ FunctionalMenuItem functionalMenuItem = mockFunctionalMenuItem();
+
+ FunctionalMenuItem functionalMenuItem1 = mockFunctionalMenuItem();
+
+ List<Integer> roles = new ArrayList<Integer>();
+
+ functionalMenuItem1.setRestrictedApp(false);
+ functionalMenuItem1.setUrl("test");
+ functionalMenuItem1.setRoles(roles);
+
+ assertEquals(functionalMenuItem.getRoles(), functionalMenuItem1.getRoles());
+ assertEquals(functionalMenuItem.toString(), "FunctionalMenuItem [menuId=null, column=null, text=null, parentMenuId=null, url=test, active_yn=null, appid=null, roles=[], restrictedApp=false]");
+ // assertTrue(functionalMenuItem.normalize(), functionalMenuItem1.normalize());
+ }
+
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/FunctionalMenuRoleTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/FunctionalMenuRoleTest.java
new file mode 100644
index 00000000..09f4bc67
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/FunctionalMenuRoleTest.java
@@ -0,0 +1,40 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.FunctionalMenuRole;
+
+public class FunctionalMenuRoleTest {
+
+ public FunctionalMenuRole mockFunctionalMenuRole(){
+ FunctionalMenuRole functionalMenuRole = new FunctionalMenuRole();
+
+ functionalMenuRole.setId(1);
+ functionalMenuRole.setMenuId((long)1);
+ functionalMenuRole.setAppId(1);
+ functionalMenuRole.setRoleId(1);
+
+ return functionalMenuRole;
+ }
+
+ @Test
+ public void functionalMenuRoleTest(){
+ FunctionalMenuRole functionalMenuRole = mockFunctionalMenuRole();
+
+ FunctionalMenuRole functionalMenuRole1 = new FunctionalMenuRole();
+ functionalMenuRole1.setId(1);
+ functionalMenuRole1.setMenuId((long)1);
+ functionalMenuRole1.setAppId(1);
+ functionalMenuRole1.setRoleId(1);
+
+ assertEquals(functionalMenuRole.getId().toString(), "1");
+ assertEquals(functionalMenuRole.getMenuId(), new Long(1));
+ assertEquals(functionalMenuRole.getAppId().toString(), "1");
+ assertEquals(functionalMenuRole.getRoleId().toString(), "1");
+ assertEquals(functionalMenuRole.toString(), "FunctionalMenuRole [id=1, menuId=1, appId=1, roleId=1]");
+ assertTrue(functionalMenuRole.equals(functionalMenuRole1));
+ assertEquals(functionalMenuRole.hashCode(), functionalMenuRole1.hashCode());
+
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/RemoteUserWithRolesTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/RemoteUserWithRolesTest.java
new file mode 100644
index 00000000..ef926f6a
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/RemoteUserWithRolesTest.java
@@ -0,0 +1,65 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.RemoteRole;
+import org.openecomp.portalapp.portal.transport.RemoteUserWithRoles;
+
+public class RemoteUserWithRolesTest {
+
+ public RemoteUserWithRoles mockRemoteUserWithRoles(){
+ RemoteUserWithRoles remoteUserWithRoles = new RemoteUserWithRoles();
+
+ List<RemoteRole> roles = new ArrayList<RemoteRole>();
+ RemoteRole remoteRole = new RemoteRole();
+ remoteRole.setId((long)1);
+ remoteRole.setName("test");
+ roles.add(remoteRole);
+
+ remoteUserWithRoles.setOrgId((long)1);
+ remoteUserWithRoles.setManagerId((long)1);
+ remoteUserWithRoles.setFirstName("test");
+ remoteUserWithRoles.setMiddleInitial("test");
+ remoteUserWithRoles.setLastName("test");
+ remoteUserWithRoles.setPhone("test");
+ remoteUserWithRoles.setEmail("test");
+ remoteUserWithRoles.setHrid("test");
+ remoteUserWithRoles.setOrgUserId("test");
+ remoteUserWithRoles.setOrgCode("test");
+ remoteUserWithRoles.setOrgManagerUserId("test");
+ remoteUserWithRoles.setJobTitle("test");
+ remoteUserWithRoles.setLoginId("test");
+ remoteUserWithRoles.setActive(false);
+ remoteUserWithRoles.setRoles(roles);
+
+ return remoteUserWithRoles;
+ }
+
+ @Test
+ public void remoteUserWithRolesTest(){
+ RemoteUserWithRoles remoteUserWithRoles = mockRemoteUserWithRoles();
+
+ assertEquals(remoteUserWithRoles.getOrgId(), new Long(1));
+ assertEquals(remoteUserWithRoles.getManagerId(), new Long(1));
+ assertEquals(remoteUserWithRoles.getFirstName(), "test");
+ assertEquals(remoteUserWithRoles.getMiddleInitial(), "test");
+ assertEquals(remoteUserWithRoles.getLastName(), "test");
+ assertEquals(remoteUserWithRoles.getPhone(), "test");
+ assertEquals(remoteUserWithRoles.getEmail(), "test");
+ assertEquals(remoteUserWithRoles.getHrid(), "test");
+ assertEquals(remoteUserWithRoles.getOrgUserId(), "test");
+ assertEquals(remoteUserWithRoles.getOrgCode(), "test");
+ assertEquals(remoteUserWithRoles.getOrgManagerUserId(), "test");
+ assertEquals(remoteUserWithRoles.getJobTitle(), "test");
+ assertEquals(remoteUserWithRoles.getLoginId(), "test");
+ assertEquals(remoteUserWithRoles.getActive(), false);
+ assertEquals(remoteUserWithRoles.getRoles().size(), 1);
+ assertEquals(remoteUserWithRoles.toString(), "RemoteUserWithRoles [orgId=1, managerId=1, firstName=test, middleInitial=test, lastName=test, phone=test, "
+ + "email=test, hrid=test, orgUserId=test, orgCode=test, orgManagerUserId=test, jobTitle=test, loginId=test, active=false, roles=[RemoteRole [id=1, name=test]]]");
+
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/RoleInAppForUserTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/RoleInAppForUserTest.java
new file mode 100644
index 00000000..66624c2a
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/RoleInAppForUserTest.java
@@ -0,0 +1,37 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.RoleInAppForUser;
+
+public class RoleInAppForUserTest {
+
+ public RoleInAppForUser mockRoleInAppForUser(){
+ RoleInAppForUser roleInAppForUser = new RoleInAppForUser((long)1 , "test");
+ roleInAppForUser.setRoleId((long)1);
+ roleInAppForUser.setRoleName("test");
+ roleInAppForUser.setIsApplied(false);
+
+ return roleInAppForUser;
+ }
+
+ @Test
+ public void roleInAppForUserTest(){
+ RoleInAppForUser roleInAppForUser = mockRoleInAppForUser();
+
+ RoleInAppForUser roleInAppForUser1 = new RoleInAppForUser((long)1 , "test");
+ roleInAppForUser1.setRoleId((long)1);
+ roleInAppForUser1.setRoleName("test");
+ roleInAppForUser1.setIsApplied(false);
+
+ assertEquals(roleInAppForUser.getRoleId(), new Long(1));
+ assertEquals(roleInAppForUser.getRoleName(), "test");
+ assertEquals(roleInAppForUser.getIsApplied(), false);
+
+ assertEquals(roleInAppForUser.toString(), "RoleInAppForUser [roleId=1, roleName=test, isApplied=false]");
+ assertTrue(roleInAppForUser.equals(roleInAppForUser1));
+ assertEquals(roleInAppForUser.hashCode(), roleInAppForUser1.hashCode());
+ //constructor
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/UserApplicationRolesTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/UserApplicationRolesTest.java
new file mode 100644
index 00000000..632eeb4f
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/UserApplicationRolesTest.java
@@ -0,0 +1,58 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.RemoteRole;
+import org.openecomp.portalapp.portal.transport.UserApplicationRoles;
+
+public class UserApplicationRolesTest {
+
+ public UserApplicationRoles mockUserApplicationRoles(){
+ UserApplicationRoles userApplicationRoles = new UserApplicationRoles();
+
+ List<RemoteRole> roles = new ArrayList<RemoteRole>();
+ RemoteRole remoteRole = new RemoteRole();
+ remoteRole.setId((long)1);
+ remoteRole.setName("test");
+ roles.add(remoteRole);
+
+ userApplicationRoles.setAppId((long)1);
+ userApplicationRoles.setOrgUserId("test");
+ userApplicationRoles.setFirstName("test");
+ userApplicationRoles.setLastName("test");
+ userApplicationRoles.setRoles(roles);
+
+ return userApplicationRoles;
+ }
+
+ @Test
+ public void userApplicationRolesTest(){
+ UserApplicationRoles userApplicationRoles = mockUserApplicationRoles();
+
+ UserApplicationRoles userApplicationRoles1 = new UserApplicationRoles();
+
+ List<RemoteRole> roles = new ArrayList<RemoteRole>();
+ RemoteRole remoteRole = new RemoteRole();
+ remoteRole.setId((long)1);
+ remoteRole.setName("test");
+ roles.add(remoteRole);
+
+ userApplicationRoles1.setAppId((long)1);
+ userApplicationRoles1.setOrgUserId("test");
+ userApplicationRoles1.setFirstName("test");
+ userApplicationRoles1.setLastName("test");
+ userApplicationRoles1.setRoles(roles);
+
+ assertEquals(userApplicationRoles.getAppId(), userApplicationRoles1.getAppId());
+ assertEquals(userApplicationRoles.getOrgUserId(), userApplicationRoles1.getOrgUserId());
+ assertEquals(userApplicationRoles.getFirstName(), userApplicationRoles1.getFirstName());
+ assertEquals(userApplicationRoles.getLastName(), userApplicationRoles1.getLastName());
+ assertEquals(userApplicationRoles.getRoles(), userApplicationRoles1.getRoles());
+
+
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/UserWithNameSurnameTitleTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/UserWithNameSurnameTitleTest.java
new file mode 100644
index 00000000..7267dcde
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/UserWithNameSurnameTitleTest.java
@@ -0,0 +1,19 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.UserWithNameSurnameTitle;
+
+public class UserWithNameSurnameTitleTest {
+
+ @Test
+ public void userWithNameSurnameTitleTest(){
+
+ UserWithNameSurnameTitle userWithNameSurnameTitle = new UserWithNameSurnameTitle("test", "test", "test", "test");
+
+ assertEquals(userWithNameSurnameTitle, new UserWithNameSurnameTitle("test", "test", "test", "test"));
+ assertEquals(userWithNameSurnameTitle.hashCode(), new UserWithNameSurnameTitle("test", "test", "test", "test").hashCode());
+ assertTrue(userWithNameSurnameTitle.equals(new UserWithNameSurnameTitle("test", "test", "test", "test")));
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/WidgetCatalogPersonalizationTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/WidgetCatalogPersonalizationTest.java
new file mode 100644
index 00000000..6681d0a4
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/portal/transport/WidgetCatalogPersonalizationTest.java
@@ -0,0 +1,25 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.WidgetCatalogPersonalization;
+
+public class WidgetCatalogPersonalizationTest {
+
+ public WidgetCatalogPersonalization mockWidgetCatalogPersonalization(){
+ WidgetCatalogPersonalization widgetCatalogPersonalization = new WidgetCatalogPersonalization();
+
+ widgetCatalogPersonalization.setWidgetId((long)1);
+ widgetCatalogPersonalization.setSelect(false);
+ return widgetCatalogPersonalization;
+ }
+
+ @Test
+ public void widgetCatalogPersonalizationTest(){
+ WidgetCatalogPersonalization widgetCatalogPersonalization = mockWidgetCatalogPersonalization();
+
+ assertEquals(widgetCatalogPersonalization.getWidgetId(), new Long(1));
+ assertEquals(widgetCatalogPersonalization.getSelect(), false);
+ }
+}
diff --git a/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/test/exceptions/NoHealthyServiceExceptionTest.java b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/test/exceptions/NoHealthyServiceExceptionTest.java
new file mode 100644
index 00000000..33389fbc
--- /dev/null
+++ b/ecomp-portal-BE-common-test/src/main/java/org/openecomp/portalapp/test/exceptions/NoHealthyServiceExceptionTest.java
@@ -0,0 +1,23 @@
+package org.openecomp.portalapp.test.exceptions;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.exceptions.NoHealthyServiceException;
+
+public class NoHealthyServiceExceptionTest {
+
+ public NoHealthyServiceException mockNoHealthyServiceException(){
+ NoHealthyServiceException noHealthyServiceException = new NoHealthyServiceException("test");
+
+ return noHealthyServiceException;
+ }
+
+ @Test
+ public void noHealthyServiceExceptionTest(){
+ NoHealthyServiceException noHealthyServiceException = mockNoHealthyServiceException();
+
+ // assertEquals(noHealthyServiceException, new NoHealthyServiceException("test"));
+ assertEquals(noHealthyServiceException.toString(), "NoHealthyServiceException [] test");
+ }
+}
diff --git a/ecomp-portal-BE-common/pom.xml b/ecomp-portal-BE-common/pom.xml
index 79968b3a..6e5e5ee0 100644
--- a/ecomp-portal-BE-common/pom.xml
+++ b/ecomp-portal-BE-common/pom.xml
@@ -15,7 +15,7 @@
<epsdk.version>1.3.0</epsdk.version>
<encoding>UTF-8</encoding>
<!-- Tests usually require some setup that maven cannot do, so skip. -->
- <skipTests>true</skipTests>
+ <skipTests>false</skipTests>
<nexusproxy>https://nexus.onap.org</nexusproxy>
<snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>
<stagingNexusPath>content/repositories/staging/</stagingNexusPath>
@@ -67,7 +67,59 @@
<finalName>${project.artifactId}</finalName>
<plugins>
-
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <version>0.7.6.201602180812</version>
+ <inherited>True</inherited>
+ <executions>
+ <!-- Unit-Tests -->
+ <execution>
+ <id>prepare-agent</id>
+ <goals>
+ <goal>prepare-agent</goal>
+ </goals>
+ <configuration>
+ <destFile>${sonar.jacoco.reportPath}</destFile>
+ </configuration>
+ </execution>
+ <execution>
+ <id>report</id>
+ <goals>
+ <goal>report</goal>
+ </goals>
+ <configuration>
+ <dataFile>${sonar.jacoco.reportPath}</dataFile>
+ <outputDirectory>${project.basedir}/target/site/jacoco</outputDirectory>
+ </configuration>
+ </execution>
+ <!-- Will see build errors while running the test cases because of dual
+ instrumentation -->
+ <execution>
+ <id>default-instrument</id>
+ <goals>
+ <goal>instrument</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>default-restore-instrumented-classes</id>
+ <goals>
+ <goal>restore-instrumented-classes</goal>
+ </goals>
+ </execution>
+ <!-- Integration Tests (Only report goal) -->
+ <execution>
+ <id>report-integration</id>
+ <goals>
+ <goal>report-integration</goal>
+ </goals>
+ <configuration>
+ <dataFile>${sonar.jacoco.itReportPath}</dataFile>
+ <outputDirectory>${project.basedir}/target/site/it-jacoco</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
@@ -223,6 +275,7 @@
</exclusion>
</exclusions>
</dependency>
+
<!-- Hibernate -->
<dependency>
@@ -574,6 +627,31 @@
<version>4.11</version>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.powermock</groupId>
+ <artifactId>powermock-api-mockito</artifactId>
+ <version>1.6.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.powermock</groupId>
+ <artifactId>powermock-core</artifactId>
+ <version>1.6.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.powermock</groupId>
+ <artifactId>powermock-module-junit4</artifactId>
+ <version>1.6.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-core</artifactId>
+ <version>1.8.5</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <version>0.7.6.201602180812</version>
+ </dependency>
<dependency>
<groupId>commons-beanutils</groupId>
@@ -604,14 +682,36 @@
<artifactId>springfox-swagger2</artifactId>
<version>2.5.0</version>
</dependency>
-
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.5.0</version>
</dependency>
-
+
+ <!-- Schedulers required Libraries -->
+
+ <dependency>
+ <groupId>com.googlecode.json-simple</groupId>
+ <artifactId>json-simple</artifactId>
+ <version>1.1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.core</groupId>
+ <artifactId>jersey-client</artifactId>
+ <version>2.23.1</version>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.jaxrs</groupId>
+ <artifactId>jackson-jaxrs-json-provider</artifactId>
+ <version>2.6.3</version>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.connectors</groupId>
+ <artifactId>jersey-jetty-connector</artifactId>
+ <version>2.23.1</version>
+ </dependency>
</dependencies>
+
<!-- No deployment descriptor. -->
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/controller/EPFusionBaseController.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/controller/EPFusionBaseController.java
index 986f6387..dfea5fef 100644
--- a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/controller/EPFusionBaseController.java
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/controller/EPFusionBaseController.java
@@ -78,9 +78,9 @@ public abstract class EPFusionBaseController extends FusionBaseController {
public Map<String, Object> setMenu(Set<MenuData> menuResult) throws Exception {
ObjectMapper mapper = new ObjectMapper();
List<List<MenuData>> childItemList = new ArrayList<List<MenuData>>();
- ;
+
List<MenuData> parentList = new ArrayList<MenuData>();
- ;
+
Map<String, Object> model = new HashMap<String, Object>();
for (MenuData menu : menuResult) {
MenuData parentData = new MenuData();
@@ -99,8 +99,8 @@ public abstract class EPFusionBaseController extends FusionBaseController {
}
childItemList.add(tempList);
}
- model.put("childItemList", childItemList != null ? mapper.writeValueAsString(childItemList) : "");
- model.put("parentList", parentList != null ? mapper.writeValueAsString(parentList) : "");
+ model.put("childItemList", mapper.writeValueAsString(childItemList));
+ model.put("parentList", mapper.writeValueAsString(parentList));
return model;
}
}
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/ExternalAccessRolesController.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/ExternalAccessRolesController.java
index fabf5e10..1e9c83e7 100644
--- a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/ExternalAccessRolesController.java
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/ExternalAccessRolesController.java
@@ -25,6 +25,7 @@ import org.openecomp.portalsdk.core.domain.AuditLog;
import org.openecomp.portalsdk.core.domain.Role;
import org.openecomp.portalsdk.core.domain.RoleFunction;
import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.restful.domain.EcompUser;
import org.openecomp.portalsdk.core.service.AuditService;
import org.openecomp.portalsdk.core.util.SystemProperties;
import org.slf4j.MDC;
@@ -469,4 +470,18 @@ public class ExternalAccessRolesController implements BasicAuthenticationControl
return functionsList;
}
+
+ @ApiOperation(value = "Gets all active Users of application", response = String.class, responseContainer = "Json")
+ @RequestMapping(value = { "/users" }, method = RequestMethod.GET, produces = "application/json")
+ public List<EcompUser> getUsersOfApplication(HttpServletRequest request, HttpServletResponse response) throws Exception {
+ List<EcompUser> users = null;
+ try {
+ users = externalAccessRolesService.getAllAppUsers(request.getHeader(UEBKEY));
+ } catch (Exception e) {
+ response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
+ logger.error(EELFLoggerDelegate.errorLogger, "getUsersOfApplication failed", e);
+ throw new Exception(e.getMessage());
+ }
+ return users;
+ }
}
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/FunctionalMenuController.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/FunctionalMenuController.java
index 490a1829..21a6e8ef 100644
--- a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/FunctionalMenuController.java
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/FunctionalMenuController.java
@@ -267,6 +267,7 @@ public class FunctionalMenuController extends EPRestrictedBaseController {
@RequestMapping(value = {
"/portalApi/functionalMenuForAuthUser" }, method = RequestMethod.GET, produces = "application/json")
public List<FunctionalMenuItem> getMenuItemsForAuthUser(HttpServletRequest request, HttpServletResponse response) {
+
EPUser user = EPUserUtils.getUserSession(request);
List<FunctionalMenuItem> menuItems = null;
try {
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/PolicyController.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/PolicyController.java
new file mode 100644
index 00000000..5f691d2d
--- /dev/null
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/PolicyController.java
@@ -0,0 +1,105 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.portalapp.portal.controller;
+
+import java.util.UUID;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.json.simple.JSONObject;
+import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;
+import org.openecomp.portalapp.portal.scheduler.policy.PolicyProperties;
+import org.openecomp.portalapp.portal.scheduler.policy.PolicyResponseWrapper;
+import org.openecomp.portalapp.portal.scheduler.policy.PolicyRestInterfaceFactory;
+import org.openecomp.portalapp.portal.scheduler.policy.PolicyRestInterfaceIfc;
+import org.openecomp.portalapp.portal.scheduler.policy.PolicyUtil;
+import org.openecomp.portalapp.portal.scheduler.policy.RestObject;
+import org.openecomp.portalapp.portal.utils.PortalConstants;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+/*import org.openecomp.vid.policy.PolicyProperties;
+import org.openecomp.vid.policy.PolicyResponseWrapper;
+import org.openecomp.vid.policy.PolicyRestInterfaceFactory;
+import org.openecomp.vid.policy.PolicyRestInterfaceIfc;
+import org.openecomp.vid.policy.PolicyUtil;*/
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+
+
+/**
+ * Controller to handle Policy requests.
+ */
+
+@RestController
+@RequestMapping(PortalConstants.REST_AUX_API)
+@Configuration
+@EnableAspectJAutoProxy
+@EPAuditLog
+public class PolicyController implements BasicAuthenticationController{
+
+ /** The logger. */
+ static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(PolicyController.class);
+
+ @RequestMapping(value="/get_policy",method = RequestMethod.POST)
+ public ResponseEntity<String> getPolicyInfo( HttpServletRequest request, @RequestBody JSONObject policy_request) throws Exception {
+
+ logger.debug(EELFLoggerDelegate.debugLogger, "#####################POLICY API CALL STARTED ###############"+ PolicyProperties.POLICY_GET_CONFIG_VAL);
+ logger.debug(EELFLoggerDelegate.debugLogger, "#####################Policy Request ###############"+policy_request.toString());
+
+ String path = SystemProperties.getProperty(PolicyProperties.POLICY_GET_CONFIG_VAL);
+ PolicyResponseWrapper policyResWrapper = getPolicyConfig(policy_request,path);
+
+ logger.debug(EELFLoggerDelegate.debugLogger, "$$$$$$$$$$$$$$$$$$$$$$ " + new ResponseEntity<String>(policyResWrapper.getResponse(), HttpStatus.OK).toString());
+
+ return ( new ResponseEntity<String>(policyResWrapper.getResponse(), HttpStatus.valueOf(policyResWrapper.getStatus())) );
+ }
+
+ protected static PolicyResponseWrapper getPolicyConfig(JSONObject request, String path) throws Exception {
+ String methodName = "getPolicyConfig";
+ String uuid = UUID.randomUUID().toString();
+ logger.debug(EELFLoggerDelegate.debugLogger, "starting getPolicyConfig ");
+
+ try {
+ //STARTING REST API CALL AS AN FACTORY INSTACE
+ PolicyRestInterfaceIfc policyRestController = PolicyRestInterfaceFactory.getInstance();
+
+ RestObject<String> restObjStr = new RestObject<String>();
+ String str = new String();
+ restObjStr.set(str);
+ policyRestController.<String>Post(str, request, uuid, path, restObjStr );
+ PolicyResponseWrapper policyRespWrapper = PolicyUtil.wrapResponse (restObjStr);
+ logger.debug(EELFLoggerDelegate.debugLogger, "<== " + methodName + " w=" + policyRespWrapper.getResponse());
+ return policyRespWrapper;
+ } catch (Exception e) {
+ logger.debug(EELFLoggerDelegate.debugLogger, "EXCEPTION in getPolicyConfig <== " + "." + methodName + e.toString());
+
+ throw e;
+ }
+ }
+}
+
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/SchedulerController.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/SchedulerController.java
new file mode 100644
index 00000000..54e95ae0
--- /dev/null
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/SchedulerController.java
@@ -0,0 +1,248 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.controller;
+
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.UUID;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.json.simple.JSONObject;
+import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;
+import org.openecomp.portalapp.portal.scheduler.SchedulerProperties;
+import org.openecomp.portalapp.portal.scheduler.SchedulerRestInterface;
+import org.openecomp.portalapp.portal.scheduler.SchedulerUtil;
+import org.openecomp.portalapp.portal.scheduler.restobjects.GetTimeSlotsRestObject;
+import org.openecomp.portalapp.portal.scheduler.restobjects.PostCreateNewVnfRestObject;
+import org.openecomp.portalapp.portal.scheduler.restobjects.PostSubmitVnfChangeRestObject;
+import org.openecomp.portalapp.portal.scheduler.wrapper.GetTimeSlotsWrapper;
+import org.openecomp.portalapp.portal.scheduler.wrapper.PostCreateNewVnfWrapper;
+import org.openecomp.portalapp.portal.scheduler.wrapper.PostSubmitVnfChangeTimeSlotsWrapper;
+import org.openecomp.portalapp.portal.utils.PortalConstants;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@RequestMapping(PortalConstants.REST_AUX_API)
+@Configuration
+@EnableAspectJAutoProxy
+@EPAuditLog
+public class SchedulerController implements BasicAuthenticationController {
+
+ @Autowired
+ private SchedulerRestInterface schedulerRestController;
+
+ private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(SchedulerController.class);
+
+ /** The request date format. */
+ public DateFormat requestDateFormat = new SimpleDateFormat("EEE, dd MMM YYYY HH:mm:ss z");
+
+ @RequestMapping(value = "/get_time_slots/{scheduler_request}", method = RequestMethod.GET)
+ public ResponseEntity<String> getTimeSlots(HttpServletRequest request,
+ @PathVariable("scheduler_request") String scheduler_request) throws Exception {
+
+ Date startingTime = new Date();
+ String startTimeRequest = requestDateFormat.format(startingTime);
+
+ System.out.println("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
+ System.out.println(startTimeRequest + " | Controller Scheduler GET : /get_time_slots/{scheduler_request} \n");
+ System.out.println("Original Request : \n " + scheduler_request + '\n');
+
+ String path = SystemProperties.getProperty(SchedulerProperties.SCHEDULER_GET_TIME_SLOTS) + scheduler_request;
+
+ GetTimeSlotsWrapper schedulerResWrapper = getTimeSlots(scheduler_request, path, scheduler_request);
+
+ Date endTime = new Date();
+ String endTimeRequest = requestDateFormat.format(endTime);
+ System.out.println(endTimeRequest + " | Controller Scheduler - GET\n");
+
+ return (new ResponseEntity<String>(schedulerResWrapper.getResponse(), HttpStatus.OK));
+
+ }
+
+ protected GetTimeSlotsWrapper getTimeSlots(String request, String path, String uuid) throws Exception {
+
+ try {
+ // STARTING REST API CALL AS AN FACTORY INSTACE
+ System.out.println("<== Get Time Slots Request START \n");
+
+ GetTimeSlotsRestObject<String> restObjStr = new GetTimeSlotsRestObject<String>();
+ String str = new String();
+
+ restObjStr.set(str);
+
+ schedulerRestController.Get(str, uuid, path, restObjStr);
+ GetTimeSlotsWrapper schedulerRespWrapper = SchedulerUtil.getTimeSlotsWrapResponse(restObjStr);
+
+ System.out.println(
+ "<== Get Time Slots Request END : Response = " + schedulerRespWrapper.getResponse() + '\n');
+
+ return schedulerRespWrapper;
+
+ } catch (Exception e) {
+ System.out.println("<== Get Time Slots Request ERROR : " + e.toString() + '\n');
+ logger.error(EELFLoggerDelegate.errorLogger, "Get Time Slots Request failed", e);
+ throw e;
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ @RequestMapping(value = "/post_create_new_vnf_change", method = RequestMethod.POST)
+ public ResponseEntity<String> postCreateNewVNFChange(HttpServletRequest request,
+ @RequestBody JSONObject scheduler_request) throws Exception {
+
+ Date startingTime = new Date();
+ String startTimeRequest = requestDateFormat.format(startingTime);
+
+ System.out.println("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
+ System.out.println(startTimeRequest + " | Controller Scheduler POST : post_create_new_vnf_change \n");
+
+ // Generating uuid
+ String uuid = UUID.randomUUID().toString();
+
+ scheduler_request.put("scheduleId", uuid);
+ System.out.println("<== UUID : " + uuid + '\n');
+
+ // adding uuid to the request payload
+ scheduler_request.put("scheduleId", uuid);
+
+ System.out.println("<== UUID : " + uuid + '\n');
+ System.out.println("Original Request : \n " + scheduler_request.toString() + '\n');
+
+ String path = SystemProperties.getProperty(SchedulerProperties.SCHEDULER_CREATE_NEW_VNF_CHANGE_INSTANCE_VAL)
+ + uuid;
+
+ PostCreateNewVnfWrapper responseWrapper = postSchedulingRequest(scheduler_request, path, uuid);
+
+ Date endTime = new Date();
+ String endTimeRequest = requestDateFormat.format(endTime);
+ System.out.println(endTimeRequest + " | Controller Scheduler - POST\n");
+
+ return (new ResponseEntity<String>(responseWrapper.getResponse(), HttpStatus.OK));
+ }
+
+ protected PostCreateNewVnfWrapper postSchedulingRequest(JSONObject request, String path, String uuid)
+ throws Exception {
+
+ try {
+ // STARTING REST API CALL AS AN FACTORY INSTACE
+ System.out.println("<== Post Create New Vnf Scheduling Request START \n");
+
+ PostCreateNewVnfRestObject<String> restObjStr = new PostCreateNewVnfRestObject<String>();
+ String str = new String();
+
+ restObjStr.set(str);
+ schedulerRestController.<String>Post(str, request, path, restObjStr);
+
+ int status = restObjStr.getStatusCode();
+ if (status >= 200 && status <= 299) {
+ restObjStr.setUUID(uuid);
+ }
+
+ PostCreateNewVnfWrapper responseWrapper = SchedulerUtil.postCreateNewVnfWrapResponse(restObjStr);
+
+ System.out.println("<== Post Create New Vnf Scheduling Request END : Response = "
+ + responseWrapper.getResponse() + '\n');
+
+ return responseWrapper;
+
+ } catch (Exception e) {
+ System.out.println("<== Post Create New Vnf Scheduling Request ERROR : " + e.toString() + '\n');
+ logger.error(EELFLoggerDelegate.errorLogger, "Post Create New Vnf Scheduling Request failed", e);
+ throw e;
+ }
+ }
+
+ @RequestMapping(value = "/submit_vnf_change_timeslots", method = RequestMethod.POST)
+ public ResponseEntity<String> postSubmitVnfChangeTimeslots(HttpServletRequest request,
+ @RequestBody JSONObject scheduler_request) throws Exception {
+
+ Date startingTime = new Date();
+ String startTimeRequest = requestDateFormat.format(startingTime);
+
+ System.out.println("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
+ System.out.println(startTimeRequest + " | Controller Scheduler POST : submit_vnf_change_timeslots \n");
+
+ // Generating uuid
+ String uuid = (String) scheduler_request.get("scheduleId");
+ scheduler_request.remove("scheduleId");
+
+ System.out.println("<== UUID : " + uuid + '\n');
+ System.out.println("Original Request : \n " + scheduler_request.toString() + '\n');
+
+ String path = SystemProperties.getProperty(SchedulerProperties.SCHEDULER_SUBMIT_NEW_VNF_CHANGE)
+ .replace("{scheduleId}", uuid);
+
+ PostSubmitVnfChangeTimeSlotsWrapper responseWrapper = postSubmitSchedulingRequest(scheduler_request, path,
+ uuid);
+
+ Date endTime = new Date();
+ String endTimeRequest = requestDateFormat.format(endTime);
+ System.out.println(endTimeRequest + " | Controller Scheduler - POST Submit\n");
+
+ return (new ResponseEntity<String>(responseWrapper.getResponse(), HttpStatus.OK));
+ }
+
+ protected PostSubmitVnfChangeTimeSlotsWrapper postSubmitSchedulingRequest(JSONObject request, String path,
+ String uuid) throws Exception {
+
+ try {
+ // STARTING REST API CALL AS AN FACTORY INSTACE
+ System.out.println("<== Post Submit Scheduling Request START \n");
+
+ PostSubmitVnfChangeRestObject<String> restObjStr = new PostSubmitVnfChangeRestObject<String>();
+ String str = new String();
+
+ restObjStr.set(str);
+ schedulerRestController.<String>Post(str, request, path, restObjStr);
+
+ int status = restObjStr.getStatusCode();
+ if (status >= 200 && status <= 299) {
+ restObjStr.setUUID(uuid);
+ }
+
+ PostSubmitVnfChangeTimeSlotsWrapper responseWrapper = SchedulerUtil
+ .postSubmitNewVnfWrapResponse(restObjStr);
+
+ System.out.println(
+ "<== Post Submit Scheduling Request END : Response = " + responseWrapper.getResponse() + '\n');
+
+ return responseWrapper;
+
+ } catch (Exception e) {
+ System.out.println("<== Post Submit Scheduling Request ERROR : " + e.toString() + '\n');
+ logger.error(EELFLoggerDelegate.errorLogger, "Post Submit Scheduling Request failed", e);
+ throw e;
+ }
+ }
+
+}
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/TicketEventController.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/TicketEventController.java
index 222f4502..7a5196ca 100644
--- a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/TicketEventController.java
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/TicketEventController.java
@@ -33,13 +33,12 @@ import org.openecomp.portalapp.portal.domain.EPUser;
import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
import org.openecomp.portalapp.portal.logging.aop.EPAuditLog;
+import org.openecomp.portalapp.portal.service.TicketEventService;
import org.openecomp.portalapp.portal.service.UserNotificationService;
import org.openecomp.portalapp.portal.transport.EpNotificationItem;
import org.openecomp.portalapp.portal.transport.EpRoleNotificationItem;
-import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;
import org.openecomp.portalapp.portal.utils.PortalConstants;
import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
-import org.openecomp.portalsdk.core.util.SystemProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
@@ -67,6 +66,9 @@ public class TicketEventController implements BasicAuthenticationController {
@Autowired
private UserNotificationService userNotificationService;
+
+ @Autowired
+ private TicketEventService ticketEventService;
private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(TicketEventController.class);
@@ -106,6 +108,7 @@ public class TicketEventController implements BasicAuthenticationController {
JsonNode event = ticketEventNotif.get("event");
JsonNode header = event.get("header");
JsonNode body = event.get("body");
+ JsonNode application = ticketEventNotif.get("application");
epItem.setMsgDescription(body.toString());
Long eventDate = System.currentTimeMillis();
if (body.get("eventDate") != null) {
@@ -114,7 +117,7 @@ public class TicketEventController implements BasicAuthenticationController {
String eventSource = header.get("eventSource").asText();
epItem.setMsgSource(eventSource);
String ticket = body.get("ticketNum").asText();
- String hyperlink = SystemProperties.getProperty(EPCommonSystemProperties.EXTERNAL_SYSTEM_NOTIFICATION_URL)+eventSource+"num="+ticket;
+ String hyperlink = ticketEventService.getNotificationHyperLink(application, ticket, eventSource);
if(body.get("notificationHyperlink")!=null){
hyperlink=body.get("notificationHyperlink").asText();
}
@@ -201,7 +204,7 @@ public class TicketEventController implements BasicAuthenticationController {
.split(",");
List<EPUser> users = userNotificationService.getUsersByOrgIds(Arrays.asList(UserIds));
if(users==null||users.size()==0)
- return "Invalid Attuid";
+ return "Invalid Org User ID";
return null;
}
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/UserRolesController.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/UserRolesController.java
index 4bb447d1..c5cd5c90 100644
--- a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/UserRolesController.java
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/UserRolesController.java
@@ -153,17 +153,22 @@ public class UserRolesController extends EPRestrictedBaseController {
}
StringBuilder adminAppRoles = new StringBuilder();
- if (result != null && result.appsRoles.size() >= 1) {
- adminAppRoles.append("User '" + result.orgUserId + "' has admin role to the apps = {");
- for (AppNameIdIsAdmin adminAppRole : result.appsRoles) {
- if (adminAppRole.isAdmin) {
- adminAppRoles.append(adminAppRole.appName + ", ");
+ if(result != null){
+ if ( result.appsRoles.size() >= 1) {
+ adminAppRoles.append("User '" + result.orgUserId + "' has admin role to the apps = {");
+ for (AppNameIdIsAdmin adminAppRole : result.appsRoles) {
+ if (adminAppRole.isAdmin) {
+ adminAppRoles.append(adminAppRole.appName + ", ");
+ }
}
+ adminAppRoles.append("}.");
+ } else {
+ adminAppRoles.append("User '" + result.orgUserId + "' has no Apps with Admin Role.");
}
- adminAppRoles.append("}.");
- } else {
- adminAppRoles.append("User '" + result.orgUserId + "' has no Apps with Admin Role.");
+ }else{
+ logger.error(EELFLoggerDelegate.errorLogger, "putAppWithUserRoleStateForUser: getAppsWithAdminRoleStateForUser result is null");
}
+
logger.info(EELFLoggerDelegate.errorLogger, adminAppRoles.toString());
EcompPortalUtils.logAndSerializeObject(logger, "/portalApi/adminAppsRoles", "get result =", result);
@@ -189,18 +194,23 @@ public class UserRolesController extends EPRestrictedBaseController {
// newAppsListWithAdminRoles.appsRoles
FieldsValidator fieldsValidator = new FieldsValidator();
StringBuilder newAppRoles = new StringBuilder();
- if (newAppsListWithAdminRoles != null && newAppsListWithAdminRoles.appsRoles.size() >= 1) {
- newAppRoles.append("User '" + newAppsListWithAdminRoles.orgUserId + "' has admin role to the apps = { ");
- for (AppNameIdIsAdmin adminAppRole : newAppsListWithAdminRoles.appsRoles) {
- if (adminAppRole.isAdmin) {
- newAppRoles.append(adminAppRole.appName + " ,");
+ if(newAppsListWithAdminRoles != null ){
+ if (newAppsListWithAdminRoles.appsRoles.size() >= 1) {
+ newAppRoles.append("User '" + newAppsListWithAdminRoles.orgUserId + "' has admin role to the apps = { ");
+ for (AppNameIdIsAdmin adminAppRole : newAppsListWithAdminRoles.appsRoles) {
+ if (adminAppRole.isAdmin) {
+ newAppRoles.append(adminAppRole.appName + " ,");
+ }
}
+ newAppRoles.deleteCharAt(newAppRoles.length() - 1);
+ newAppRoles.append("}.");
+ } else {
+ newAppRoles.append("User '" + newAppsListWithAdminRoles.orgUserId + "' has no Apps with Admin Role.");
}
- newAppRoles.deleteCharAt(newAppRoles.length() - 1);
- newAppRoles.append("}.");
- } else {
- newAppRoles.append("User '" + newAppsListWithAdminRoles.orgUserId + "' has no Apps with Admin Role.");
+ }else{
+ logger.error(EELFLoggerDelegate.errorLogger, "putAppWithUserRoleStateForUser: putAppsWithAdminRoleStateForUser result is null");
}
+
logger.info(EELFLoggerDelegate.errorLogger, newAppRoles.toString());
EPUser user = EPUserUtils.getUserSession(request);
@@ -339,7 +349,9 @@ public class UserRolesController extends EPRestrictedBaseController {
boolean changesApplied = false;
if (!adminRolesService.isAccountAdmin(user)) {
EcompPortalUtils.setBadPermissions(user, response, "putAppWithUserRoleStateForUser");
- } else {
+ } else if(newAppRolesForUser==null){
+ logger.error(EELFLoggerDelegate.errorLogger, "putAppWithUserRoleStateForUser: newAppRolesForUser is null");
+ } else{
changesApplied = userRolesService.setAppWithUserRoleStateForUser(user, newAppRolesForUser);
if (changesApplied) {
logger.info(EELFLoggerDelegate.applicationLogger,
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/WebAnalyticsExtAppController.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/WebAnalyticsExtAppController.java
index 662de30a..44a5dcdf 100644
--- a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/WebAnalyticsExtAppController.java
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/controller/WebAnalyticsExtAppController.java
@@ -178,7 +178,7 @@ public class WebAnalyticsExtAppController extends EPRestrictedRESTfulBaseControl
MDC.get(EPCommonSystemProperties.AUDITLOG_BEGIN_TIMESTAMP),
MDC.get(EPCommonSystemProperties.AUDITLOG_END_TIMESTAMP));
logger.info(EELFLoggerDelegate.auditLogger,
- EPLogUtil.formatStoreAnalyticsAuditLogMessage(analyticsMap.getUserId(), appName,
+ EPLogUtil.formatStoreAnalyticsAuditLogMessage(analyticsMap.getUserid(), appName,
"WebAnalyticsExtAppController.postWebAnalyticsData",
EcompAuditLog.CD_ACTIVITY_STORE_ANALYTICS, analyticsMap.getAction(), analyticsMap.getPage(),
analyticsMap.getFunction(), analyticsMap.getType()));
@@ -214,10 +214,10 @@ public class WebAnalyticsExtAppController extends EPRestrictedRESTfulBaseControl
protected void storeAuxAnalytics(Analytics analyticsMap, String appName) {
logger.info(EELFLoggerDelegate.debugLogger,
" Registering an action for recommendation: AppName/Function/UserId " + appName + "/"
- + analyticsMap.getFunction() + "/" + analyticsMap.getUserId());
+ + analyticsMap.getFunction() + "/" + analyticsMap.getUserid());
Map<String, String> requestMapping = new HashMap<String, String>();
- requestMapping.put("id", analyticsMap.getUserId());
+ requestMapping.put("id", analyticsMap.getUserid());
requestMapping.put("action", appName + "|" + analyticsMap.getFunction());
HttpHeaders headers = new HttpHeaders();
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/EPApp.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/EPApp.java
index edb3c905..ad9dec56 100644
--- a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/EPApp.java
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/EPApp.java
@@ -19,6 +19,8 @@
*/
package org.openecomp.portalapp.portal.domain;
+import java.util.Arrays;
+
import javax.persistence.Lob;
import org.apache.commons.lang.StringUtils;
@@ -94,6 +96,8 @@ public class EPApp extends DomainVo {
this.imageUrl = imageUrl;
}
+
+
public byte[] getThumbnail() {
return this.thumbnail;
}
@@ -312,4 +316,151 @@ public class EPApp extends DomainVo {
return str;
}
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((alternateUrl == null) ? 0 : alternateUrl.hashCode());
+ result = prime * result + ((appPassword == null) ? 0 : appPassword.hashCode());
+ result = prime * result + ((appRestEndpoint == null) ? 0 : appRestEndpoint.hashCode());
+ result = prime * result + ((appType == null) ? 0 : appType.hashCode());
+ result = prime * result + ((centralAuth == null) ? 0 : centralAuth.hashCode());
+ result = prime * result + ((contactUs == null) ? 0 : contactUs.hashCode());
+ result = prime * result + ((description == null) ? 0 : description.hashCode());
+ result = prime * result + ((enabled == null) ? 0 : enabled.hashCode());
+ result = prime * result + ((imageUrl == null) ? 0 : imageUrl.hashCode());
+ result = prime * result + ((mlAppAdminId == null) ? 0 : mlAppAdminId.hashCode());
+ result = prime * result + ((mlAppName == null) ? 0 : mlAppName.hashCode());
+ result = prime * result + ((motsId == null) ? 0 : motsId.hashCode());
+ result = prime * result + ((name == null) ? 0 : name.hashCode());
+ result = prime * result + ((nameSpace == null) ? 0 : nameSpace.hashCode());
+ result = prime * result + ((notes == null) ? 0 : notes.hashCode());
+ result = prime * result + ((open == null) ? 0 : open.hashCode());
+ result = prime * result + Arrays.hashCode(thumbnail);
+ result = prime * result + ((uebKey == null) ? 0 : uebKey.hashCode());
+ result = prime * result + ((uebSecret == null) ? 0 : uebSecret.hashCode());
+ result = prime * result + ((uebTopicName == null) ? 0 : uebTopicName.hashCode());
+ result = prime * result + ((url == null) ? 0 : url.hashCode());
+ result = prime * result + ((username == null) ? 0 : username.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ EPApp other = (EPApp) obj;
+ if (alternateUrl == null) {
+ if (other.alternateUrl != null)
+ return false;
+ } else if (!alternateUrl.equals(other.alternateUrl))
+ return false;
+ if (appPassword == null) {
+ if (other.appPassword != null)
+ return false;
+ } else if (!appPassword.equals(other.appPassword))
+ return false;
+ if (appRestEndpoint == null) {
+ if (other.appRestEndpoint != null)
+ return false;
+ } else if (!appRestEndpoint.equals(other.appRestEndpoint))
+ return false;
+ if (appType == null) {
+ if (other.appType != null)
+ return false;
+ } else if (!appType.equals(other.appType))
+ return false;
+ if (centralAuth == null) {
+ if (other.centralAuth != null)
+ return false;
+ } else if (!centralAuth.equals(other.centralAuth))
+ return false;
+ if (contactUs == null) {
+ if (other.contactUs != null)
+ return false;
+ } else if (!contactUs.equals(other.contactUs))
+ return false;
+ if (description == null) {
+ if (other.description != null)
+ return false;
+ } else if (!description.equals(other.description))
+ return false;
+ if (enabled == null) {
+ if (other.enabled != null)
+ return false;
+ } else if (!enabled.equals(other.enabled))
+ return false;
+ if (imageUrl == null) {
+ if (other.imageUrl != null)
+ return false;
+ } else if (!imageUrl.equals(other.imageUrl))
+ return false;
+ if (mlAppAdminId == null) {
+ if (other.mlAppAdminId != null)
+ return false;
+ } else if (!mlAppAdminId.equals(other.mlAppAdminId))
+ return false;
+ if (mlAppName == null) {
+ if (other.mlAppName != null)
+ return false;
+ } else if (!mlAppName.equals(other.mlAppName))
+ return false;
+ if (motsId == null) {
+ if (other.motsId != null)
+ return false;
+ } else if (!motsId.equals(other.motsId))
+ return false;
+ if (name == null) {
+ if (other.name != null)
+ return false;
+ } else if (!name.equals(other.name))
+ return false;
+ if (nameSpace == null) {
+ if (other.nameSpace != null)
+ return false;
+ } else if (!nameSpace.equals(other.nameSpace))
+ return false;
+ if (notes == null) {
+ if (other.notes != null)
+ return false;
+ } else if (!notes.equals(other.notes))
+ return false;
+ if (open == null) {
+ if (other.open != null)
+ return false;
+ } else if (!open.equals(other.open))
+ return false;
+ if (!Arrays.equals(thumbnail, other.thumbnail))
+ return false;
+ if (uebKey == null) {
+ if (other.uebKey != null)
+ return false;
+ } else if (!uebKey.equals(other.uebKey))
+ return false;
+ if (uebSecret == null) {
+ if (other.uebSecret != null)
+ return false;
+ } else if (!uebSecret.equals(other.uebSecret))
+ return false;
+ if (uebTopicName == null) {
+ if (other.uebTopicName != null)
+ return false;
+ } else if (!uebTopicName.equals(other.uebTopicName))
+ return false;
+ if (url == null) {
+ if (other.url != null)
+ return false;
+ } else if (!url.equals(other.url))
+ return false;
+ if (username == null) {
+ if (other.username != null)
+ return false;
+ } else if (!username.equals(other.username))
+ return false;
+ return true;
+ }
}
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/EPRole.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/EPRole.java
index a1e44575..90990ef4 100644
--- a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/EPRole.java
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/EPRole.java
@@ -199,4 +199,5 @@ public class EPRole extends DomainVo {
public String toString() {
return "[Id = " + id + ", name = " + name + "]";
}
+
}
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/EPUserAppRolesRequest.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/EPUserAppRolesRequest.java
index c756ef58..616246d8 100644
--- a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/EPUserAppRolesRequest.java
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/EPUserAppRolesRequest.java
@@ -82,4 +82,59 @@ public class EPUserAppRolesRequest extends DomainVo {
public void setEpRequestIdDetail(Set<EPUserAppRolesRequestDetail> epMyLoginsDetail) {
this.epRequestIdDetail = epMyLoginsDetail;
}
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((appId == null) ? 0 : appId.hashCode());
+ result = prime * result + ((createdDate == null) ? 0 : createdDate.hashCode());
+ result = prime * result + ((epRequestIdDetail == null) ? 0 : epRequestIdDetail.hashCode());
+ result = prime * result + ((requestStatus == null) ? 0 : requestStatus.hashCode());
+ result = prime * result + ((updatedDate == null) ? 0 : updatedDate.hashCode());
+ result = prime * result + ((userId == null) ? 0 : userId.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ EPUserAppRolesRequest other = (EPUserAppRolesRequest) obj;
+ if (appId == null) {
+ if (other.appId != null)
+ return false;
+ } else if (!appId.equals(other.appId))
+ return false;
+ if (createdDate == null) {
+ if (other.createdDate != null)
+ return false;
+ } else if (!createdDate.equals(other.createdDate))
+ return false;
+ if (epRequestIdDetail == null) {
+ if (other.epRequestIdDetail != null)
+ return false;
+ } else if (!epRequestIdDetail.equals(other.epRequestIdDetail))
+ return false;
+ if (requestStatus == null) {
+ if (other.requestStatus != null)
+ return false;
+ } else if (!requestStatus.equals(other.requestStatus))
+ return false;
+ if (updatedDate == null) {
+ if (other.updatedDate != null)
+ return false;
+ } else if (!updatedDate.equals(other.updatedDate))
+ return false;
+ if (userId == null) {
+ if (other.userId != null)
+ return false;
+ } else if (!userId.equals(other.userId))
+ return false;
+ return true;
+ }
}
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/EPUserAppRolesRequestDetail.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/EPUserAppRolesRequestDetail.java
index 3b466f52..eeb34451 100644
--- a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/EPUserAppRolesRequestDetail.java
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/EPUserAppRolesRequestDetail.java
@@ -53,4 +53,41 @@ public class EPUserAppRolesRequestDetail extends DomainVo {
this.reqType = reqType;
}
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((epRequestIdData == null) ? 0 : epRequestIdData.hashCode());
+ result = prime * result + ((reqRoleId == null) ? 0 : reqRoleId.hashCode());
+ result = prime * result + ((reqType == null) ? 0 : reqType.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ EPUserAppRolesRequestDetail other = (EPUserAppRolesRequestDetail) obj;
+ if (epRequestIdData == null) {
+ if (other.epRequestIdData != null)
+ return false;
+ } else if (!epRequestIdData.equals(other.epRequestIdData))
+ return false;
+ if (reqRoleId == null) {
+ if (other.reqRoleId != null)
+ return false;
+ } else if (!reqRoleId.equals(other.reqRoleId))
+ return false;
+ if (reqType == null) {
+ if (other.reqType != null)
+ return false;
+ } else if (!reqType.equals(other.reqType))
+ return false;
+ return true;
+ }
+
}
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/MicroserviceParameter.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/MicroserviceParameter.java
index 0796a5a9..80c48fcc 100644
--- a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/MicroserviceParameter.java
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/MicroserviceParameter.java
@@ -19,10 +19,6 @@
*/
package org.openecomp.portalapp.portal.domain;
-import javax.persistence.Column;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
import org.openecomp.portalsdk.core.domain.support.DomainVo;
public class MicroserviceParameter extends DomainVo {
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/PersUserAppSelection.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/PersUserAppSelection.java
index 331cdb81..81a5942e 100644
--- a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/PersUserAppSelection.java
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/PersUserAppSelection.java
@@ -75,4 +75,41 @@ public class PersUserAppSelection extends DomainVo {
this.statusCode = statusCode;
}
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((appId == null) ? 0 : appId.hashCode());
+ result = prime * result + ((statusCode == null) ? 0 : statusCode.hashCode());
+ result = prime * result + ((userId == null) ? 0 : userId.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ PersUserAppSelection other = (PersUserAppSelection) obj;
+ if (appId == null) {
+ if (other.appId != null)
+ return false;
+ } else if (!appId.equals(other.appId))
+ return false;
+ if (statusCode == null) {
+ if (other.statusCode != null)
+ return false;
+ } else if (!statusCode.equals(other.statusCode))
+ return false;
+ if (userId == null) {
+ if (other.userId != null)
+ return false;
+ } else if (!userId.equals(other.userId))
+ return false;
+ return true;
+ }
+
}
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/PersUserWidgetSelection.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/PersUserWidgetSelection.java
index 692479b4..5ef8a21b 100644
--- a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/PersUserWidgetSelection.java
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/domain/PersUserWidgetSelection.java
@@ -77,5 +77,42 @@ public class PersUserWidgetSelection extends DomainVo {
public void setStatusCode(String statusCode) {
this.statusCode = statusCode;
}
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((statusCode == null) ? 0 : statusCode.hashCode());
+ result = prime * result + ((userId == null) ? 0 : userId.hashCode());
+ result = prime * result + ((widgetId == null) ? 0 : widgetId.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ PersUserWidgetSelection other = (PersUserWidgetSelection) obj;
+ if (statusCode == null) {
+ if (other.statusCode != null)
+ return false;
+ } else if (!statusCode.equals(other.statusCode))
+ return false;
+ if (userId == null) {
+ if (other.userId != null)
+ return false;
+ } else if (!userId.equals(other.userId))
+ return false;
+ if (widgetId == null) {
+ if (other.widgetId != null)
+ return false;
+ } else if (!widgetId.equals(other.widgetId))
+ return false;
+ return true;
+ }
}
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/listener/HealthMonitor.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/listener/HealthMonitor.java
index f9a6b905..27c43160 100644
--- a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/listener/HealthMonitor.java
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/listener/HealthMonitor.java
@@ -218,9 +218,8 @@ public class HealthMonitor {
}
}
};
- if (healthMonitorThread != null) {
- healthMonitorThread.start();
- }
+ healthMonitorThread.start();
+
}
@PreDestroy
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/RestObject.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/RestObject.java
new file mode 100644
index 00000000..a1030e3a
--- /dev/null
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/RestObject.java
@@ -0,0 +1,44 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.portalapp.portal.scheduler;
+
+
+public class RestObject<T> {
+
+ private T t;
+
+ private int statusCode= 0;
+
+ public String uuid;
+
+ public void set(T t) { this.t = t; }
+
+ public T get() { return t; }
+
+ public void setStatusCode(int v) { this.statusCode = v; }
+
+ public int getStatusCode() { return this.statusCode; }
+
+ public void setUUID(String uuid) { this.uuid = uuid; }
+
+ public String getUUID() { return this.uuid; }
+}
+
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/SchedulerProperties.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/SchedulerProperties.java
new file mode 100644
index 00000000..2d65b6c3
--- /dev/null
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/SchedulerProperties.java
@@ -0,0 +1,20 @@
+package org.openecomp.portalapp.portal.scheduler;
+
+import org.openecomp.portalsdk.core.util.SystemProperties;
+
+
+public class SchedulerProperties extends SystemProperties {
+
+ public static final String SCHEDULER_USER_NAME_VAL = "scheduler.user.name";;
+
+ public static final String SCHEDULER_PASSWORD_VAL = "scheduler.password";
+
+ public static final String SCHEDULER_SERVER_URL_VAL = "scheduler.server.url";
+
+ public static final String SCHEDULER_CREATE_NEW_VNF_CHANGE_INSTANCE_VAL = "scheduler.create.new.vnf.change.instance";
+
+ public static final String SCHEDULER_GET_TIME_SLOTS = "scheduler.get.time.slots";
+
+ public static final String SCHEDULER_SUBMIT_NEW_VNF_CHANGE = "scheduler.submit.new.vnf.change";
+
+}
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/SchedulerResponseWrapper.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/SchedulerResponseWrapper.java
new file mode 100644
index 00000000..d30f0568
--- /dev/null
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/SchedulerResponseWrapper.java
@@ -0,0 +1,71 @@
+package org.openecomp.portalapp.portal.scheduler;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import org.apache.commons.lang.builder.ToStringBuilder;
+
+/**
+ * This wrapper encapsulates the Scheduler response
+ */
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "status",
+ "entity",
+ "uuid"
+})
+
+public class SchedulerResponseWrapper {
+
+ @JsonProperty("status")
+ private int status;
+
+ @JsonProperty("entity")
+ private String entity;
+
+ @JsonProperty("uuid")
+ private String uuid;
+
+ @JsonProperty("entity")
+ public String getEntity() {
+ return entity;
+ }
+
+ @JsonProperty("status")
+ public int getStatus() {
+ return status;
+ }
+
+ @JsonProperty("uuid")
+ public String getUuid() {
+ return uuid;
+ }
+
+ @JsonProperty("status")
+ public void setStatus(int v) {
+ this.status = v;
+ }
+
+ @JsonProperty("entity")
+ public void setEntity(String v) {
+ this.entity = v;
+ }
+
+ @JsonProperty("uuid")
+ public void setUuid(String v) {
+ this.uuid = v;
+ }
+
+ @Override
+ public String toString() {
+ return ToStringBuilder.reflectionToString(this);
+ }
+
+ public String getResponse () {
+
+ StringBuilder b = new StringBuilder ("{ \"status\": ");
+ b.append(getStatus()).append(", \"entity\": \" " ).append(this.getEntity()).append("\" ,\"uuid\": \"" ).append(this.getUuid()).append("\"}");
+ return (b.toString());
+ }
+
+}
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/SchedulerRestInt.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/SchedulerRestInt.java
new file mode 100644
index 00000000..d532fd79
--- /dev/null
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/SchedulerRestInt.java
@@ -0,0 +1,44 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.portalapp.portal.scheduler;
+
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+public class SchedulerRestInt {
+
+ /** The logger. */
+ EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(SchedulerRestInterface.class);
+
+ /** The Constant dateFormat. */
+ final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS");
+
+ /** The request date format. */
+ public DateFormat requestDateFormat = new SimpleDateFormat("EEE, dd MMM YYYY HH:mm:ss z");
+
+ public SchedulerRestInt() {
+ requestDateFormat.setTimeZone(java.util.TimeZone.getTimeZone("GMT"));
+ }
+}
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/SchedulerRestInterface.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/SchedulerRestInterface.java
new file mode 100644
index 00000000..337c1fcf
--- /dev/null
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/SchedulerRestInterface.java
@@ -0,0 +1,200 @@
+package org.openecomp.portalapp.portal.scheduler;
+
+import java.util.Collections;
+
+import javax.ws.rs.client.Client;
+import javax.ws.rs.client.Entity;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.MultivaluedHashMap;
+import javax.ws.rs.core.Response;
+
+import org.apache.commons.codec.binary.Base64;
+import org.json.simple.JSONObject;
+import org.openecomp.portalapp.portal.scheduler.client.HttpBasicClient;
+import org.openecomp.portalapp.portal.scheduler.client.HttpsBasicClient;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.springframework.stereotype.Service;
+import org.openecomp.portalapp.portal.scheduler.restobjects.RestObject;
+
+
+@Service
+public class SchedulerRestInterface implements SchedulerRestInterfaceIfc {
+
+ private static Client client = null;
+
+ private MultivaluedHashMap<String, Object> commonHeaders;
+
+ public SchedulerRestInterface() {
+ super();
+ }
+
+ public void initRestClient()
+ {
+ final String methodname = "initRestClient()";
+
+ final String username = "";//SystemProperties.getProperty(SchedulerProperties.SCHEDULER_USER_NAME_VAL);
+ //final String password = "";//SystemProperties.getProperty(SchedulerProperties.SCHEDULER_PASSWORD_VAL);
+ final String scheduler_url = "";//SystemProperties.getProperty(SchedulerProperties.SCHEDULER_SERVER_URL_VAL);
+ final String decrypted_password = "";//Password.deobfuscate(password);
+
+ String authString = username + ":" + decrypted_password;
+
+ byte[] authEncBytes = Base64.encodeBase64(authString.getBytes());
+ String authStringEnc = new String(authEncBytes);
+
+ commonHeaders = new MultivaluedHashMap<String, Object> ();
+ commonHeaders.put("Authorization", Collections.singletonList((Object) ("Basic " + authStringEnc)));
+
+ boolean use_ssl = true;
+ if ( (scheduler_url != null) && ( !(scheduler_url.isEmpty()) ) ) {
+ if ( scheduler_url.startsWith("https")) {
+ use_ssl = true;
+ }
+ else {
+ use_ssl = false;
+ }
+ }
+ if (client == null) {
+
+ try {
+ if ( use_ssl ) {
+
+ client = HttpsBasicClient.getClient();
+ }
+ else {
+
+ client = HttpBasicClient.getClient();
+ }
+ } catch (Exception e) {
+ System.out.println( methodname + " Unable to get the SSL client");
+ }
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public <T> void Get (T t, String sourceId, String path, org.openecomp.portalapp.portal.scheduler.restobjects.RestObject<T> restObject ) throws Exception {
+
+ String methodName = "Get";
+ String url = SystemProperties.getProperty(SchedulerProperties.SCHEDULER_SERVER_URL_VAL) + path;
+
+
+ System.out.println( "<== URL FOR GET : " + url + "\n");
+
+ initRestClient();
+
+ final Response cres = client.target(url)
+ .request()
+ .accept("application/json")
+ .headers(commonHeaders)
+ .get();
+
+ int status = cres.getStatus();
+ restObject.setStatusCode (status);
+
+ if (status == 200) {
+ t = (T) cres.readEntity(t.getClass());
+ restObject.set(t);
+
+ } else {
+ throw new Exception(methodName + " with status="+ status + ", url= " + url );
+ }
+
+ return;
+ }
+
+ @SuppressWarnings("unchecked")
+ public <T> void Post(T t, JSONObject requestDetails, String path, RestObject<T> restObject) throws Exception {
+
+ String methodName = "Post";
+ String url = SystemProperties.getProperty(SchedulerProperties.SCHEDULER_SERVER_URL_VAL) + path;
+
+ System.out.println( "<== URL FOR POST : " + url + "\n");
+
+ try {
+
+ initRestClient();
+
+ // Change the content length
+ final Response cres = client.target(url)
+ .request()
+ .accept("application/json")
+ .headers(commonHeaders)
+ //.header("content-length", 201)
+ //.header("X-FromAppId", sourceID)
+ .post(Entity.entity(requestDetails, MediaType.APPLICATION_JSON));
+
+ try {
+ t = (T) cres.readEntity(t.getClass());
+ restObject.set(t);
+ }
+ catch ( Exception e ) {
+
+ System.out.println("<== " + methodName + " : No response entity, this is probably ok, e=" + e.getMessage());
+ }
+
+ int status = cres.getStatus();
+ restObject.setStatusCode (status);
+
+ if ( status >= 200 && status <= 299 ) {
+
+ System.out.println( "<== " + methodName + " : REST api POST was successful!" + "\n");
+
+ } else {
+ System.out.println( "<== " + methodName + " : FAILED with http status : "+status+", url = " + url + "\n");
+ }
+
+ } catch (Exception e)
+ {
+ System.out.println( "<== " + methodName + " : with url="+url+ ", Exception: " + e.toString() + "\n");
+ throw e;
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public <T> void Delete(T t, JSONObject requestDetails, String sourceID, String path, RestObject<T> restObject) {
+
+ String url="";
+ Response cres = null;
+
+ try {
+ initRestClient();
+
+ url = SystemProperties.getProperty(SchedulerProperties.SCHEDULER_SERVER_URL_VAL) + path;
+
+ cres = client.target(url)
+ .request()
+ .accept("application/json")
+ .headers(commonHeaders)
+ //.entity(r)
+ .build("DELETE", Entity.entity(requestDetails, MediaType.APPLICATION_JSON)).invoke();
+ // .method("DELETE", Entity.entity(r, MediaType.APPLICATION_JSON));
+ //.delete(Entity.entity(r, MediaType.APPLICATION_JSON));
+
+ int status = cres.getStatus();
+ restObject.setStatusCode (status);
+
+ try {
+ t = (T) cres.readEntity(t.getClass());
+ restObject.set(t);
+ }
+ catch ( Exception e ) {
+ }
+
+ }
+ catch (Exception e)
+ {
+ throw e;
+ }
+ }
+
+ public <T> T getInstance(Class<T> clazz) throws IllegalAccessException, InstantiationException
+ {
+ return clazz.newInstance();
+ }
+
+ @Override
+ public void logRequest(JSONObject requestDetails) {
+ // TODO Auto-generated method stub
+
+ }
+}
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/SchedulerRestInterfaceFactory.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/SchedulerRestInterfaceFactory.java
new file mode 100644
index 00000000..34433e5a
--- /dev/null
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/SchedulerRestInterfaceFactory.java
@@ -0,0 +1,15 @@
+
+package org.openecomp.portalapp.portal.scheduler;
+
+public class SchedulerRestInterfaceFactory {
+
+
+ public static SchedulerRestInterfaceIfc getInstance () {
+ SchedulerRestInterfaceIfc obj = null;
+
+ obj = new SchedulerRestInterface();
+
+ return ( obj );
+ }
+
+}
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/SchedulerRestInterfaceIfc.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/SchedulerRestInterfaceIfc.java
new file mode 100644
index 00000000..77353e5e
--- /dev/null
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/SchedulerRestInterfaceIfc.java
@@ -0,0 +1,22 @@
+
+package org.openecomp.portalapp.portal.scheduler;
+
+import org.json.simple.JSONObject;
+import org.springframework.stereotype.Service;
+import org.openecomp.portalapp.portal.scheduler.restobjects.RestObject;
+
+
+@Service
+public interface SchedulerRestInterfaceIfc {
+
+ public void initRestClient();
+
+ public <T> void Get(T t, String sourceId, String path, org.openecomp.portalapp.portal.scheduler.restobjects.RestObject<T> restObject ) throws Exception;
+
+ public <T> void Delete(T t, JSONObject requestDetails, String sourceID, String path, RestObject<T> restObject)
+ throws Exception;
+
+ public <T> void Post(T t, JSONObject r, String path, RestObject<T> restObject) throws Exception;
+
+ public void logRequest(JSONObject requestDetails);
+} \ No newline at end of file
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/SchedulerUtil.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/SchedulerUtil.java
new file mode 100644
index 00000000..37dddc29
--- /dev/null
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/SchedulerUtil.java
@@ -0,0 +1,99 @@
+package org.openecomp.portalapp.portal.scheduler;
+
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import org.openecomp.portalapp.portal.scheduler.restobjects.GetTimeSlotsRestObject;
+import org.openecomp.portalapp.portal.scheduler.restobjects.PostCreateNewVnfRestObject;
+import org.openecomp.portalapp.portal.scheduler.restobjects.PostSubmitVnfChangeRestObject;
+import org.openecomp.portalapp.portal.scheduler.wrapper.GetTimeSlotsWrapper;
+import org.openecomp.portalapp.portal.scheduler.wrapper.PostCreateNewVnfWrapper;
+import org.openecomp.portalapp.portal.scheduler.wrapper.PostSubmitVnfChangeTimeSlotsWrapper;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+public class SchedulerUtil {
+
+ private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(SchedulerUtil.class);
+
+ final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS");
+
+ public static GetTimeSlotsWrapper getTimeSlotsWrapResponse (GetTimeSlotsRestObject<String> rs) {
+
+ String resp_str = "";
+ int status = 0;
+
+ if ( rs != null ) {
+ resp_str = rs.get();
+ status = rs.getStatusCode();
+ }
+
+ GetTimeSlotsWrapper w = new GetTimeSlotsWrapper();
+
+ w.setEntity(resp_str);
+ w.setStatus (status);
+
+ return (w);
+ }
+
+ public static PostSubmitVnfChangeTimeSlotsWrapper postSubmitNewVnfWrapResponse (PostSubmitVnfChangeRestObject<String> rs) {
+
+ String resp_str = "";
+ int status = 0;
+ String uuid = "";
+
+ if ( rs != null ) {
+ resp_str = rs.get();
+ status = rs.getStatusCode();
+ uuid = rs.getUUID();
+ }
+
+ PostSubmitVnfChangeTimeSlotsWrapper w = new PostSubmitVnfChangeTimeSlotsWrapper();
+
+ w.setEntity(resp_str);
+ w.setStatus (status);
+ w.setUuid(uuid);
+
+ return (w);
+ }
+
+ public static PostCreateNewVnfWrapper postCreateNewVnfWrapResponse (PostCreateNewVnfRestObject<String> rs) {
+
+ String resp_str = "";
+ int status = 0;
+ String uuid = "";
+
+ if ( rs != null ) {
+ resp_str = rs.get();
+ status = rs.getStatusCode();
+ uuid = rs.getUUID();
+ }
+
+ PostCreateNewVnfWrapper w = new PostCreateNewVnfWrapper();
+
+ w.setEntity(resp_str);
+ w.setStatus (status);
+ w.setUuid(uuid);
+
+ return (w);
+ }
+
+ public static <T> String convertPojoToString ( T t ) throws com.fasterxml.jackson.core.JsonProcessingException {
+
+ String methodName = "convertPojoToString";
+ ObjectMapper mapper = new ObjectMapper();
+ String r_json_str = "";
+ if ( t != null ) {
+ try {
+ r_json_str = mapper.writeValueAsString(t);
+ }
+ catch ( com.fasterxml.jackson.core.JsonProcessingException j ) {
+ logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " Unable to parse object as json");
+ }
+ }
+ return (r_json_str);
+ }
+
+}
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/client/HttpBasicClient.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/client/HttpBasicClient.java
new file mode 100644
index 00000000..f0ec2769
--- /dev/null
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/client/HttpBasicClient.java
@@ -0,0 +1,67 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.portalapp.portal.scheduler.client;
+
+
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+
+import javax.servlet.ServletContext;
+import javax.ws.rs.client.Client;
+import javax.ws.rs.client.ClientBuilder;
+
+import org.glassfish.jersey.client.ClientConfig;
+import org.glassfish.jersey.client.ClientProperties;
+import org.openecomp.portalapp.portal.scheduler.util.CustomJacksonJaxBJsonProvider;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.springframework.beans.factory.annotation.Autowired;
+
+/**
+ * General HTTP client.
+ */
+
+public class HttpBasicClient{
+
+ /** The servlet context. */
+ @Autowired
+ private ServletContext servletContext;
+
+ /** The logger. */
+ EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(HttpBasicClient.class);
+
+ /** The Constant dateFormat. */
+ final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS");
+
+ /**
+ * Obtain a basic HTTP client .
+ *
+ * @return Client client object
+ * @throws Exception the exception
+ */
+ public static Client getClient() throws Exception {
+
+ ClientConfig config = new ClientConfig();
+ config.property(ClientProperties.SUPPRESS_HTTP_COMPLIANCE_VALIDATION, true);
+
+ return ClientBuilder.newClient(config)
+ .register(CustomJacksonJaxBJsonProvider.class);
+ }
+}
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/client/HttpsBasicClient.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/client/HttpsBasicClient.java
new file mode 100644
index 00000000..be244865
--- /dev/null
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/client/HttpsBasicClient.java
@@ -0,0 +1,144 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.portalapp.portal.scheduler.client;
+
+import java.io.File;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import javax.net.ssl.HostnameVerifier;
+import javax.net.ssl.HttpsURLConnection;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLSession;
+import javax.ws.rs.client.Client;
+import javax.ws.rs.client.ClientBuilder;
+
+import org.eclipse.jetty.util.security.Password;
+import org.glassfish.jersey.client.ClientConfig;
+import org.glassfish.jersey.client.ClientProperties;
+import org.openecomp.portalapp.portal.scheduler.properties.VidProperties;
+import org.openecomp.portalapp.portal.scheduler.util.CustomJacksonJaxBJsonProvider;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+
+ /**
+ * General SSL client using the VID tomcat keystore. It doesn't use client certificates.
+ */
+
+public class HttpsBasicClient{
+
+ /** The logger. */
+ static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(HttpsBasicClient.class);
+
+ /** The Constant dateFormat. */
+ final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS");
+
+ /**
+ * Retrieve an SSL client.
+ *
+ * @return Client The SSL client
+ * @throws Exception the exception
+ */
+ public static Client getClient() throws Exception {
+ String methodName = "getClient";
+ ClientConfig config = new ClientConfig();
+ //config.getFeatures().put(JSONConfiguration.FEATURE_POJO_MAPPING, Boolean.TRUE);
+ //config.getClasses().add(org.openecomp.aai.util.CustomJacksonJaxBJsonProvider.class);
+
+ SSLContext ctx = null;
+
+ try {
+
+ config.property(ClientProperties.SUPPRESS_HTTP_COMPLIANCE_VALIDATION, true);
+
+ String truststore_path = SystemProperties.getProperty(VidProperties.VID_TRUSTSTORE_FILENAME);
+ logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + " " + methodName + " truststore_path=" + truststore_path);
+ String truststore_password = SystemProperties.getProperty(VidProperties.VID_TRUSTSTORE_PASSWD_X);
+
+
+ String decrypted_truststore_password = Password.deobfuscate(truststore_password);
+ //logger.debug(dateFormat.format(new Date()) + " " + methodName + " decrypted_truststore_password=" + decrypted_truststore_password);
+
+ File tr = new File (truststore_path);
+ logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + " " + methodName + " absolute truststore path=" + tr.getAbsolutePath());
+
+ //String keystore_path = certFilePath + AAIProperties.FILESEPARTOR + SystemProperties.getProperty(AAIProperties.AAI_KEYSTORE_FILENAME);
+ //String keystore_password = SystemProperties.getProperty(AAIProperties.AAI_KEYSTORE_PASSWD_X);
+ //String decrypted_keystore_password = EncryptedPropValue.decryptTriple(keystore_password);
+
+ System.setProperty("javax.net.ssl.trustStore", truststore_path);
+ System.setProperty("javax.net.ssl.trustStorePassword", decrypted_truststore_password);
+ HttpsURLConnection.setDefaultHostnameVerifier( new HostnameVerifier(){
+ public boolean verify(String string,SSLSession ssls) {
+ return true;
+ }
+ });
+
+ //May need to make the algorithm a parameter. MSO requires TLSv1.1 or TLSv1.2
+ ctx = SSLContext.getInstance("TLSv1.2");
+
+ /*
+ KeyManagerFactory kmf = null;
+ try {
+ kmf = KeyManagerFactory.getInstance("SunX509");
+ FileInputStream fin = new FileInputStream(keystore_path);
+ KeyStore ks = KeyStore.getInstance("PKCS12");
+ char[] pwd = decrypted_keystore_password.toCharArray();
+ ks.load(fin, pwd);
+ kmf.init(ks, pwd);
+ } catch (Exception e) {
+ System.out.println("Error setting up kmf: exiting");
+ e.printStackTrace();
+ System.exit(1);
+ }
+
+ ctx.init(kmf.getKeyManagers(), null, null);
+ */
+ ctx.init(null, null, null);
+ //config.getProperties().put(HTTPSProperties.PROPERTY_HTTPS_PROPERTIES,
+ // new HTTPSProperties( , ctx));
+
+ return ClientBuilder.newBuilder()
+ .sslContext(ctx)
+ .hostnameVerifier(new HostnameVerifier() {
+ @Override
+ public boolean verify( String s, SSLSession sslSession ) {
+ return true;
+ }
+ }).withConfig(config)
+ .build()
+ .register(CustomJacksonJaxBJsonProvider.class);
+
+ } catch (Exception e) {
+ logger.debug(EELFLoggerDelegate.debugLogger, "Error setting up config: exiting");
+ //System.out.println("Error setting up config: exiting");
+ e.printStackTrace();
+ return null;
+ }
+
+ //Client client = ClientBuilder.newClient(config);
+ // uncomment this line to get more logging for the request/response
+ // client.addFilter(new LoggingFilter(System.out));
+
+ //return client;
+ }
+}
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/policy/PolicyProperties.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/policy/PolicyProperties.java
new file mode 100644
index 00000000..cf10d8f6
--- /dev/null
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/policy/PolicyProperties.java
@@ -0,0 +1,26 @@
+package org.openecomp.portalapp.portal.scheduler.policy;
+
+import org.openecomp.portalsdk.core.util.SystemProperties;
+
+
+public class PolicyProperties extends SystemProperties {
+
+ public static final String POLICY_CLIENTAUTH_VAL = "policy.ClientAuth";
+
+ public static final String POLICY_CLIENT_MECHID_VAL = "policy.client.mechId";
+
+ public static final String POLICY_CLIENT_PASSWORD_VAL = "policy.client.password";
+
+ public static final String POLICY_USERNAME_VAL = "policy.username";
+
+ public static final String POLICY_PASSWORD_VAL = "policy.password";
+
+ public static final String POLICY_AUTHORIZATION_VAL = "policy.Authorization";
+
+ public static final String POLICY_SERVER_URL_VAL = "policy.server.url";
+
+ public static final String POLICY_ENVIRONMENT_VAL = "policy.environment";
+
+ public static final String POLICY_GET_CONFIG_VAL = "policy.get.config";
+
+}
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/policy/PolicyResponseWrapper.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/policy/PolicyResponseWrapper.java
new file mode 100644
index 00000000..ed51456e
--- /dev/null
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/policy/PolicyResponseWrapper.java
@@ -0,0 +1,56 @@
+package org.openecomp.portalapp.portal.scheduler.policy;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import org.apache.commons.lang.builder.ToStringBuilder;
+
+/**
+ * This wrapper encapsulates the Policy response
+ */
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "status",
+ "entity"
+})
+
+public class PolicyResponseWrapper {
+
+ @JsonProperty("status")
+ private int status;
+
+ @JsonProperty("entity")
+ private String entity;
+
+ @JsonProperty("entity")
+ public String getEntity() {
+ return entity;
+ }
+
+ @JsonProperty("status")
+ public int getStatus() {
+ return status;
+ }
+
+ @JsonProperty("status")
+ public void setStatus(int v) {
+ this.status = v;
+ }
+
+ @JsonProperty("entity")
+ public void setEntity(String v) {
+ this.entity = v;
+ }
+
+ @Override
+ public String toString() {
+ return ToStringBuilder.reflectionToString(this);
+ }
+
+ public String getResponse () {
+
+ StringBuilder b = new StringBuilder ("{ \"status\": ");
+ b.append(getStatus()).append(", \"entity\": " ).append(this.getEntity()).append("}");
+ return (b.toString());
+ }
+} \ No newline at end of file
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/policy/PolicyRestInt.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/policy/PolicyRestInt.java
new file mode 100644
index 00000000..ce930c9a
--- /dev/null
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/policy/PolicyRestInt.java
@@ -0,0 +1,67 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.portalapp.portal.scheduler.policy;
+
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import org.openecomp.portalapp.portal.scheduler.policy.rest.RequestDetails;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+public class PolicyRestInt {
+
+ /** The logger. */
+ EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(PolicyRestInterface.class);
+
+ /** The Constant dateFormat. */
+ final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS");
+
+ /** The request date format. */
+ public DateFormat requestDateFormat = new SimpleDateFormat("EEE, dd MMM YYYY HH:mm:ss z");
+
+ public PolicyRestInt() {
+ requestDateFormat.setTimeZone(java.util.TimeZone.getTimeZone("GMT"));
+ }
+
+ /**
+ * Log request.
+ *
+ * @param r the r
+ */
+ public void logRequest ( RequestDetails r ) {
+ String methodName = "logRequest";
+ ObjectMapper mapper = new ObjectMapper();
+ String r_json_str = "";
+ if ( r != null ) {
+ r_json_str = r.toString();
+ try {
+ r_json_str = mapper.writeValueAsString(r);
+ }
+ catch ( com.fasterxml.jackson.core.JsonProcessingException j ) {
+ logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " Unable to parse request as json");
+ }
+ }
+ logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " Request=(" + r_json_str + ")");
+ }
+} \ No newline at end of file
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/policy/PolicyRestInterface.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/policy/PolicyRestInterface.java
new file mode 100644
index 00000000..70b4f818
--- /dev/null
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/policy/PolicyRestInterface.java
@@ -0,0 +1,235 @@
+package org.openecomp.portalapp.portal.scheduler.policy;
+
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Collections;
+import java.util.Date;
+
+import javax.ws.rs.client.Client;
+import javax.ws.rs.client.Entity;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.MultivaluedHashMap;
+import javax.ws.rs.core.Response;
+
+import org.apache.commons.codec.binary.Base64;
+import org.eclipse.jetty.util.security.Password;
+import org.json.simple.JSONObject;
+import org.openecomp.portalapp.portal.scheduler.client.HttpBasicClient;
+import org.openecomp.portalapp.portal.scheduler.policy.rest.RequestDetails;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+
+
+public class PolicyRestInterface extends PolicyRestInt implements PolicyRestInterfaceIfc {
+
+ /** The logger. */
+ EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(PolicyRestInterface.class);
+
+ /** The Constant dateFormat. */
+ final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS");
+
+ /** The client. */
+ private static Client client = null;
+
+ /** The common headers. */
+ private MultivaluedHashMap<String, Object> commonHeaders;
+
+ public PolicyRestInterface() {
+ super();
+ }
+
+ public void initRestClient()
+ {
+ final String methodname = "initRestClient()";
+
+ //final String clientAuth = SystemProperties.getProperty(PolicyProperties.POLICY_CLIENTAUTH_VAL);
+ //final String authorization = SystemProperties.getProperty(PolicyProperties.POLICY_AUTHORIZATION_VAL);
+ final String mechId = SystemProperties.getProperty(PolicyProperties.POLICY_CLIENT_MECHID_VAL);
+ final String clientPassword = SystemProperties.getProperty(PolicyProperties.POLICY_CLIENT_PASSWORD_VAL);
+ final String username = SystemProperties.getProperty(PolicyProperties.POLICY_USERNAME_VAL);
+ final String password = SystemProperties.getProperty(PolicyProperties.POLICY_PASSWORD_VAL);
+ final String environment = SystemProperties.getProperty(PolicyProperties.POLICY_ENVIRONMENT_VAL);
+
+ final String decrypted_client_password = Password.deobfuscate(clientPassword);
+ String mechAuthString = mechId + ":" + decrypted_client_password;
+ byte[] mechAuthEncBytes = Base64.encodeBase64(mechAuthString.getBytes());
+ String clientAuth = new String(mechAuthEncBytes);
+
+ final String decrypted_password = Password.deobfuscate(password);
+ String authString = username + ":" + decrypted_password;
+ byte[] authEncBytes = Base64.encodeBase64(authString.getBytes());
+ String authorization = new String(authEncBytes);
+
+ commonHeaders = new MultivaluedHashMap<String, Object> ();
+ commonHeaders.put("ClientAuth", Collections.singletonList((Object) ("Basic " + clientAuth)));
+ commonHeaders.put("Authorization", Collections.singletonList((Object) ("Basic " + authorization)));
+ commonHeaders.put("Environment", Collections.singletonList((Object) (environment)));
+
+ if (client == null) {
+
+ try {
+ client = HttpBasicClient.getClient();
+ } catch (Exception e) {
+ System.out.println( methodname + " Unable to get the SSL client");
+ }
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public <T> void Get (T t, String sourceId, String path, RestObject<T> restObject ) throws Exception {
+ String methodName = "Get";
+
+ logger.debug(EELFLoggerDelegate.debugLogger, methodName + " start");
+
+ String url="";
+ restObject.set(t);
+
+ url = SystemProperties.getProperty(PolicyProperties.POLICY_SERVER_URL_VAL) + path;
+ logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " sending request to url= " + url);
+
+ initRestClient();
+
+ final Response cres = client.target(url)
+ .request()
+ .accept("application/json")
+ .headers(commonHeaders)
+ .get();
+
+ int status = cres.getStatus();
+ restObject.setStatusCode (status);
+
+ if (status == 200) {
+ t = (T) cres.readEntity(t.getClass());
+ restObject.set(t);
+ logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + methodName + " REST api was successfull!");
+
+ } else {
+ throw new Exception(methodName + " with status="+ status + ", url= " + url );
+ }
+
+ logger.debug(EELFLoggerDelegate.debugLogger,methodName + " received status=" + status );
+
+ return;
+ }
+
+ @SuppressWarnings("unchecked")
+ public <T> void Delete(T t, RequestDetails r, String sourceID, String path, RestObject<T> restObject) {
+
+ String methodName = "Delete";
+ String url="";
+ Response cres = null;
+
+ logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " start");
+ logRequest (r);
+
+ try {
+ initRestClient();
+
+ url = SystemProperties.getProperty(PolicyProperties.POLICY_SERVER_URL_VAL) + path;
+ logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + " methodName sending request to: " + url);
+
+ cres = client.target(url)
+ .request()
+ .accept("application/json")
+ .headers(commonHeaders)
+ //.entity(r)
+ .build("DELETE", Entity.entity(r, MediaType.APPLICATION_JSON)).invoke();
+ // .method("DELETE", Entity.entity(r, MediaType.APPLICATION_JSON));
+ //.delete(Entity.entity(r, MediaType.APPLICATION_JSON));
+
+ int status = cres.getStatus();
+ restObject.setStatusCode (status);
+
+ if (status == 404) { // resource not found
+ String msg = "Resource does not exist...: " + cres.getStatus();
+ logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + msg);
+ } else if (status == 200 || status == 204){
+ logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + "Resource " + url + " deleted");
+ } else if (status == 202) {
+ String msg = "Delete in progress: " + status;
+ logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + msg);
+ }
+ else {
+ String msg = "Deleting Resource failed: " + status;
+ logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + msg);
+ }
+
+ try {
+ t = (T) cres.readEntity(t.getClass());
+ restObject.set(t);
+ }
+ catch ( Exception e ) {
+ logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " No response entity, this is probably ok, e="
+ + e.getMessage());
+ }
+
+ }
+ catch (Exception e)
+ {
+ logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " with url="+url+ ", Exception: " + e.toString());
+ throw e;
+
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public <T> void Post(T t, JSONObject requestDetails, String uuid, String path, RestObject<T> restObject) throws Exception {
+
+ String methodName = "Post";
+ String url="";
+
+ System.out.println( "POST policy rest interface");
+
+ // logRequest (requestDetails);
+ try {
+
+ initRestClient();
+
+ url = SystemProperties.getProperty(PolicyProperties.POLICY_SERVER_URL_VAL) + path;
+ System.out.println( "<== " + methodName + " sending request to url= " + url);
+ // Change the content length
+ final Response cres = client.target(url)
+ .request()
+ .accept("application/json")
+ .headers(commonHeaders)
+ //.header("content-length", 201)
+ //.header("X-FromAppId", sourceID)
+ .post(Entity.entity(requestDetails, MediaType.APPLICATION_JSON));
+
+ try {
+ t = (T) cres.readEntity(t.getClass());
+ restObject.set(t);
+ }
+ catch ( Exception e ) {
+
+ System.out.println("<== " + methodName + " No response entity, this is probably ok, e=" + e.getMessage());
+ }
+
+ int status = cres.getStatus();
+ restObject.setStatusCode (status);
+
+ if ( status >= 200 && status <= 299 ) {
+ System.out.println( "<== " + methodName + " REST api POST was successful!");
+
+ } else {
+ System.out.println( "<== " + methodName + " with status="+status+", url="+url);
+ }
+
+ } catch (Exception e)
+ {
+ System.out.println( "<== " + methodName + " with url="+url+ ", Exception: " + e.toString());
+ throw e;
+
+ }
+ }
+
+ public <T> T getInstance(Class<T> clazz) throws IllegalAccessException, InstantiationException
+ {
+ return clazz.newInstance();
+ }
+
+ @Override
+ public void logRequest(RequestDetails r) {
+ // TODO Auto-generated method stub
+ }
+} \ No newline at end of file
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/policy/PolicyRestInterfaceFactory.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/policy/PolicyRestInterfaceFactory.java
new file mode 100644
index 00000000..c6dd440d
--- /dev/null
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/policy/PolicyRestInterfaceFactory.java
@@ -0,0 +1,14 @@
+
+package org.openecomp.portalapp.portal.scheduler.policy;
+
+public class PolicyRestInterfaceFactory {
+
+
+ public static PolicyRestInterfaceIfc getInstance () {
+ PolicyRestInterfaceIfc obj = null;
+
+ obj = new PolicyRestInterface();
+
+ return ( obj );
+ }
+} \ No newline at end of file
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/policy/PolicyRestInterfaceIfc.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/policy/PolicyRestInterfaceIfc.java
new file mode 100644
index 00000000..38fedb9c
--- /dev/null
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/policy/PolicyRestInterfaceIfc.java
@@ -0,0 +1,58 @@
+
+package org.openecomp.portalapp.portal.scheduler.policy;
+
+import org.json.simple.JSONObject;
+import org.openecomp.portalapp.portal.scheduler.policy.rest.RequestDetails;
+
+public interface PolicyRestInterfaceIfc {
+ /**
+ * Inits the rest client.
+ */
+ public void initRestClient();
+
+ /**
+ * Gets the.
+ *
+ * @param <T> the generic type
+ * @param t the t
+ * @param sourceId the source id
+ * @param path the path
+ * @param restObject the rest object
+ * @throws Exception the exception
+ */
+ public <T> void Get (T t, String sourceId, String path, RestObject<T> restObject ) throws Exception;
+
+ /**
+ * Delete.
+ *
+ * @param <T> the generic type
+ * @param t the t
+ * @param r the r
+ * @param sourceID the source ID
+ * @param path the path
+ * @param restObject the rest object
+ * @throws Exception the exception
+ */
+ public <T> void Delete(T t, RequestDetails r, String sourceID, String path, RestObject<T> restObject) throws Exception;
+
+ /**
+ * Post.
+ *
+ * @param <T> the generic type
+ * @param t the t
+ * @param r the r
+ * @param sourceID the source ID
+ * @param path the path
+ * @param restObject the rest object
+ * @throws Exception the exception
+ */
+ public <T> void Post(T t, JSONObject r, String sourceID, String path, RestObject<T> restObject) throws Exception;
+
+ /***
+ * Log request.
+ *
+ * @param r the r
+ */
+ public void logRequest ( RequestDetails r );
+
+} \ No newline at end of file
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/policy/PolicyUtil.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/policy/PolicyUtil.java
new file mode 100644
index 00000000..8ec8323d
--- /dev/null
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/policy/PolicyUtil.java
@@ -0,0 +1,71 @@
+package org.openecomp.portalapp.portal.scheduler.policy;
+
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import org.glassfish.jersey.client.ClientResponse;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+/*import org.openecomp.vid.policy.PolicyResponseWrapper;
+import org.openecomp.vid.policy.PolicyUtil;
+import org.openecomp.vid.policy.RestObject;*/
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+public class PolicyUtil {
+
+ private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(PolicyUtil.class);
+
+ final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS");
+
+ public static PolicyResponseWrapper wrapResponse ( String body, int statusCode ) {
+
+ PolicyResponseWrapper w = new PolicyResponseWrapper();
+ w.setStatus (statusCode);
+ w.setEntity(body);
+
+ return w;
+ }
+
+ public static PolicyResponseWrapper wrapResponse (ClientResponse cres) {
+ String resp_str = "";
+ if ( cres != null ) {
+ resp_str = cres.readEntity(String.class);
+ }
+ int statuscode = cres.getStatus();
+ PolicyResponseWrapper w = PolicyUtil.wrapResponse ( resp_str, statuscode );
+ return (w);
+ }
+
+ public static PolicyResponseWrapper wrapResponse (RestObject<String> rs) {
+ String resp_str = "";
+ int status = 0;
+ if ( rs != null ) {
+ resp_str = rs.get();
+ status = rs.getStatusCode();
+ }
+ PolicyResponseWrapper w = PolicyUtil.wrapResponse ( resp_str, status );
+ return (w);
+ }
+
+ public static <T> String convertPojoToString ( T t ) throws com.fasterxml.jackson.core.JsonProcessingException {
+
+ String methodName = "convertPojoToString";
+ ObjectMapper mapper = new ObjectMapper();
+ String r_json_str = "";
+ if ( t != null ) {
+ try {
+ r_json_str = mapper.writeValueAsString(t);
+ }
+ catch ( com.fasterxml.jackson.core.JsonProcessingException j ) {
+ logger.debug(EELFLoggerDelegate.debugLogger,dateFormat.format(new Date()) + "<== " + methodName + " Unable to parse object as json");
+ }
+ }
+ return (r_json_str);
+ }
+
+
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+ }
+}
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/policy/RestObject.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/policy/RestObject.java
new file mode 100644
index 00000000..040971e5
--- /dev/null
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/policy/RestObject.java
@@ -0,0 +1,68 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.portalapp.portal.scheduler.policy;
+
+/**
+ * The Class RestObject.
+ *
+ * @param <T> the generic type
+ */
+public class RestObject<T> {
+
+ /**
+ * Generic version of the RestObject class.
+ *
+ */
+ // T stands for "Type"
+ private T t;
+
+ /** The status code. */
+ private int statusCode= 0;
+
+ /**
+ * Sets the.
+ *
+ * @param t the t
+ */
+ public void set(T t) { this.t = t; }
+
+ /**
+ * Gets the.
+ *
+ * @return the t
+ */
+ public T get() { return t; }
+
+ /**
+ * Sets the status code.
+ *
+ * @param v the new status code
+ */
+ public void setStatusCode(int v) { this.statusCode = v; }
+
+ /**
+ * Gets the status code.
+ *
+ * @return the status code
+ */
+ public int getStatusCode() { return this.statusCode; }
+
+} \ No newline at end of file
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/policy/rest/RequestDetails.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/policy/rest/RequestDetails.java
new file mode 100644
index 00000000..9c5debee
--- /dev/null
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/policy/rest/RequestDetails.java
@@ -0,0 +1,107 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.portalapp.portal.scheduler.policy.rest;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+/*
+ [
+ {
+ "policyConfigMessage": "Config Retrieved! ",
+ "policyConfigStatus": "CONFIG_RETRIEVED",
+ "type": "JSON",
+ "config": "{\"service\":\"TimeLimitAndVerticalTopology\",\"policyName\":\"SNIRO_CM_1707.Demo_TimeLimitAndVerticalTopology_zone_localTime\",\"description\":\"dev instance\",\"templateVersion\":\"1702.03\",\"version\":\"1707\",\"priority\":\"4\",\"riskType\":\"test\",\"riskLevel\":\"3\",\"guard\":\"False\",\"content\":{\"serviceType\":\"networkOnDemand\",\"identity\":\"vnf_upgrade_policy\",\"policyScope\":{\"serviceType\":[\"networkOnDemand\"],\"aicZone\":[\" \"],\"entityType\":[\"vnf\"]},\"timeSchedule\":{\"allowedPeriodicTime\":[{\"day\":\"weekday\",\"timeRange\":[{\"start_time\":\"04:00:00\",\"end_time\":\"13:00:00\"}]}]},\"nodeType\":[\"vnf\"],\"type\":\"timeLimitAndVerticalTopology\",\"conflictScope\":\"vnf_zone\"}}",
+ "policyName": "SNIRO_CM_1707.Config_MS_Demo_TimeLimitAndVerticalTopology_zone_localTime.1.xml",
+ "policyVersion": "1",
+ "matchingConditions": {
+ "ECOMPName": "SNIRO-Placement",
+ "ConfigName": "",
+ "service": "TimeLimitAndVerticalTopology",
+ "uuid": "",
+ "Location": ""
+ },
+ "responseAttributes": {},
+ "property": null
+ },
+ {
+ "policyConfigMessage": "Config Retrieved! ",
+ "policyConfigStatus": "CONFIG_RETRIEVED",
+ "type": "JSON",
+ "config": "{\"service\":\"TimeLimitAndVerticalTopology\",\"policyName\":\"SNIRO_CM_1707.Demo_TimeLimitAndVerticalTopology_pserver_localTime\",\"description\":\"dev instance\",\"templateVersion\":\"1702.03\",\"version\":\"1707\",\"priority\":\"4\",\"riskType\":\"test\",\"riskLevel\":\"3\",\"guard\":\"False\",\"content\":{\"serviceType\":\"networkOnDemand\",\"identity\":\"vnf_upgrade_policy\",\"policyScope\":{\"serviceType\":[\"networkOnDemand\"],\"aicZone\":[\" \"],\"entityType\":[\"vnf\"]},\"timeSchedule\":{\"allowedPeriodicTime\":[{\"day\":\"weekday\",\"timeRange\":[{\"start_time\":\"04:00:00\",\"end_time\":\"13:00:00\"}]}]},\"nodeType\":[\"vnf\"],\"type\":\"timeLimitAndVerticalTopology\",\"conflictScope\":\"vnf_pserver\"}}",
+ "policyName": "SNIRO_CM_1707.Config_MS_Demo_TimeLimitAndVerticalTopology_pserver_localTime.1.xml",
+ "policyVersion": "1",
+ "matchingConditions": {
+ "ECOMPName": "SNIRO-Placement",
+ "ConfigName": "",
+ "service": "TimeLimitAndVerticalTopology",
+ "uuid": "",
+ "Location": ""
+ },
+ "responseAttributes": {},
+ "property": null
+ },
+ {
+ "policyConfigMessage": "Config Retrieved! ",
+ "policyConfigStatus": "CONFIG_RETRIEVED",
+ "type": "JSON",
+ "config": "{\"service\":\"TimeLimitAndVerticalTopology\",\"policyName\":\"SNIRO_CM_1707.Demo_TimeLimitAndVerticalTopology_vnf_localTime\",\"description\":\"dev instance\",\"templateVersion\":\"1702.03\",\"version\":\"1707\",\"priority\":\"4\",\"riskType\":\"test\",\"riskLevel\":\"3\",\"guard\":\"False\",\"content\":{\"serviceType\":\"networkOnDemand\",\"identity\":\"vnf_upgrade_policy\",\"policyScope\":{\"serviceType\":[\"networkOnDemand\"],\"aicZone\":[\" \"],\"entityType\":[\"vnf\"]},\"timeSchedule\":{\"allowedPeriodicTime\":[{\"day\":\"weekday\",\"timeRange\":[{\"start_time\":\"04:00:00\",\"end_time\":\"13:00:00\"}]}]},\"nodeType\":[\"vnf\"],\"type\":\"timeLimitAndVerticalTopology\",\"conflictScope\":\"vnf\"}}",
+ "policyName": "SNIRO_CM_1707.Config_MS_Demo_TimeLimitAndVerticalTopology_vnf_localTime.1.xml",
+ "policyVersion": "1",
+ "matchingConditions": {
+ "ECOMPName": "SNIRO-Placement",
+ "ConfigName": "",
+ "service": "TimeLimitAndVerticalTopology",
+ "uuid": "",
+ "Location": ""
+ },
+ "responseAttributes": {},
+ "property": null
+ }
+ ]
+*/
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "policyConfigMessage",
+ "policyConfigStatus",
+ "type",
+ "config",
+ "policyName",
+ "policyVersion",
+ "matchingConditions"
+})
+public class RequestDetails {
+
+ @JsonProperty("policyName")
+ private String policyName;
+
+ @JsonProperty("policyName")
+ public String getPolicyName() {
+ return policyName;
+ }
+
+ @JsonProperty("policyName")
+ public void setPolicyName(String policyName) {
+ this.policyName = policyName;
+ }
+
+} \ No newline at end of file
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/properties/VidProperties.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/properties/VidProperties.java
new file mode 100644
index 00000000..883f8714
--- /dev/null
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/properties/VidProperties.java
@@ -0,0 +1,40 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.portalapp.portal.scheduler.properties;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+/**
+ * The Class VidProperties.
+ */
+public class VidProperties extends SystemProperties {
+
+ //VID General Properties
+
+ /** The Constant VID_TRUSTSTORE_FILENAME. */
+ public static final String VID_TRUSTSTORE_FILENAME = "vid.truststore.filename";
+
+ /** The Constant VID_TRUSTSTORE_PASSWD_X. */
+ public static final String VID_TRUSTSTORE_PASSWD_X = "vid.truststore.passwd.x";
+
+ /** The Constant FILESEPARATOR. */
+ public static final String FILESEPARATOR = (System.getProperty("file.separator") == null) ? "/" : System.getProperty("file.separator");
+
+
+}
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/restobjects/GetTimeSlotsRestObject.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/restobjects/GetTimeSlotsRestObject.java
new file mode 100644
index 00000000..3e7771ae
--- /dev/null
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/restobjects/GetTimeSlotsRestObject.java
@@ -0,0 +1,11 @@
+package org.openecomp.portalapp.portal.scheduler.restobjects;
+
+public class GetTimeSlotsRestObject<T> extends RestObject<T> {
+
+ public String uuid;
+
+ public void setUUID(String uuid) { this.uuid = uuid; }
+
+ public String getUUID() { return this.uuid; }
+
+}
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/restobjects/PostCreateNewVnfRestObject.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/restobjects/PostCreateNewVnfRestObject.java
new file mode 100644
index 00000000..7e92307b
--- /dev/null
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/restobjects/PostCreateNewVnfRestObject.java
@@ -0,0 +1,10 @@
+package org.openecomp.portalapp.portal.scheduler.restobjects;
+
+public class PostCreateNewVnfRestObject<T> extends RestObject<T> {
+
+ public String uuid;
+
+ public void setUUID(String uuid) { this.uuid = uuid; }
+
+ public String getUUID() { return this.uuid; }
+}
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/restobjects/PostSubmitVnfChangeRestObject.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/restobjects/PostSubmitVnfChangeRestObject.java
new file mode 100644
index 00000000..9dd66afc
--- /dev/null
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/restobjects/PostSubmitVnfChangeRestObject.java
@@ -0,0 +1,10 @@
+package org.openecomp.portalapp.portal.scheduler.restobjects;
+
+public class PostSubmitVnfChangeRestObject<T> extends RestObject<T> {
+
+ public String uuid;
+
+ public void setUUID(String uuid) { this.uuid = uuid; }
+
+ public String getUUID() { return this.uuid; }
+}
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/restobjects/RestObject.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/restobjects/RestObject.java
new file mode 100644
index 00000000..6bb74431
--- /dev/null
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/restobjects/RestObject.java
@@ -0,0 +1,39 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.portalapp.portal.scheduler.restobjects;
+
+
+public class RestObject<T> {
+
+ private T t;
+
+ private int statusCode= 0;
+
+ public void set(T t) { this.t = t; }
+
+ public T get() { return t; }
+
+ public void setStatusCode(int v) { this.statusCode = v; }
+
+ public int getStatusCode() { return this.statusCode; }
+
+}
+
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/util/CustomJacksonJaxBJsonProvider.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/util/CustomJacksonJaxBJsonProvider.java
new file mode 100644
index 00000000..e6953838
--- /dev/null
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/util/CustomJacksonJaxBJsonProvider.java
@@ -0,0 +1,73 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * VID
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.portalapp.portal.scheduler.util;
+
+
+import javax.ws.rs.ext.Provider;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
+import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider;
+import com.fasterxml.jackson.module.jaxb.JaxbAnnotationModule;
+
+/**
+ * The Class CustomJacksonJaxBJsonProvider.
+ */
+@Provider
+public class CustomJacksonJaxBJsonProvider extends JacksonJaxbJsonProvider {
+
+ /** The common mapper. */
+ private static ObjectMapper commonMapper = null;
+
+ /**
+ * Instantiates a new custom jackson jax B json provider.
+ */
+ public CustomJacksonJaxBJsonProvider() {
+ if (commonMapper == null) {
+ ObjectMapper mapper = new ObjectMapper();
+
+ mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
+
+ mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
+ mapper.configure(SerializationFeature.INDENT_OUTPUT, false);
+ mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, false);
+
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+ mapper.configure(DeserializationFeature.UNWRAP_ROOT_VALUE, false);
+
+ mapper.registerModule(new JaxbAnnotationModule());
+
+ commonMapper = mapper;
+ }
+ super.setMapper(commonMapper);
+ }
+
+ /**
+ * Gets the mapper.
+ *
+ * @return the mapper
+ */
+ public ObjectMapper getMapper() {
+ return commonMapper;
+ }
+}
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/wrapper/GetTimeSlotsWrapper.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/wrapper/GetTimeSlotsWrapper.java
new file mode 100644
index 00000000..81aafc62
--- /dev/null
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/wrapper/GetTimeSlotsWrapper.java
@@ -0,0 +1,5 @@
+package org.openecomp.portalapp.portal.scheduler.wrapper;
+
+public class GetTimeSlotsWrapper extends SchedulerResponseWrapper {
+
+}
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/wrapper/PostCreateNewVnfWrapper.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/wrapper/PostCreateNewVnfWrapper.java
new file mode 100644
index 00000000..38aa6347
--- /dev/null
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/wrapper/PostCreateNewVnfWrapper.java
@@ -0,0 +1,39 @@
+package org.openecomp.portalapp.portal.scheduler.wrapper;
+
+import org.apache.commons.lang.builder.ToStringBuilder;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "uuid"
+})
+public class PostCreateNewVnfWrapper extends SchedulerResponseWrapper {
+
+ @JsonProperty("uuid")
+ private String uuid;
+
+ @JsonProperty("uuid")
+ public String getUuid() {
+ return uuid;
+ }
+
+ @JsonProperty("uuid")
+ public void setUuid(String v) {
+ this.uuid = v;
+ }
+
+ @Override
+ public String toString() {
+ return ToStringBuilder.reflectionToString(this);
+ }
+
+ public String getResponse () {
+
+ StringBuilder b = new StringBuilder ("{ \"status\": ");
+ b.append(getStatus()).append(", \"entity\": \" " ).append(this.getEntity()).append("\" ,\"uuid\": \"" ).append(this.getUuid()).append("\"}");
+ return (b.toString());
+ }
+}
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/wrapper/PostSubmitVnfChangeTimeSlotsWrapper.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/wrapper/PostSubmitVnfChangeTimeSlotsWrapper.java
new file mode 100644
index 00000000..9d6725ab
--- /dev/null
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/wrapper/PostSubmitVnfChangeTimeSlotsWrapper.java
@@ -0,0 +1,38 @@
+package org.openecomp.portalapp.portal.scheduler.wrapper;
+
+import org.apache.commons.lang.builder.ToStringBuilder;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "uuid"
+})
+public class PostSubmitVnfChangeTimeSlotsWrapper extends SchedulerResponseWrapper {
+ @JsonProperty("uuid")
+ private String uuid;
+
+ @JsonProperty("uuid")
+ public String getUuid() {
+ return uuid;
+ }
+
+ @JsonProperty("uuid")
+ public void setUuid(String v) {
+ this.uuid = v;
+ }
+
+ @Override
+ public String toString() {
+ return ToStringBuilder.reflectionToString(this);
+ }
+
+ public String getResponse () {
+
+ StringBuilder b = new StringBuilder ("{ \"status\": ");
+ b.append(getStatus()).append(", \"entity\": \" " ).append(this.getEntity()).append("\" ,\"uuid\": \"" ).append(this.getUuid()).append("\"}");
+ return (b.toString());
+ }
+}
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/wrapper/SchedulerResponseWrapper.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/wrapper/SchedulerResponseWrapper.java
new file mode 100644
index 00000000..e10505c0
--- /dev/null
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/scheduler/wrapper/SchedulerResponseWrapper.java
@@ -0,0 +1,57 @@
+package org.openecomp.portalapp.portal.scheduler.wrapper;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import org.apache.commons.lang.builder.ToStringBuilder;
+
+/**
+ * This wrapper encapsulates the Scheduler response
+ */
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonPropertyOrder({
+ "status",
+ "entity"
+})
+
+public class SchedulerResponseWrapper {
+
+ @JsonProperty("status")
+ private int status;
+
+ @JsonProperty("entity")
+ private String entity;
+
+ @JsonProperty("entity")
+ public String getEntity() {
+ return entity;
+ }
+
+ @JsonProperty("status")
+ public int getStatus() {
+ return status;
+ }
+
+ @JsonProperty("status")
+ public void setStatus(int v) {
+ this.status = v;
+ }
+
+ @JsonProperty("entity")
+ public void setEntity(String v) {
+ this.entity = v;
+ }
+
+ @Override
+ public String toString() {
+ return ToStringBuilder.reflectionToString(this);
+ }
+
+ public String getResponse () {
+
+ StringBuilder b = new StringBuilder ("{ \"status\": ");
+
+ b.append(getStatus()).append(", \"entity\": " ).append(this.getEntity()).append("}");
+ return (b.toString());
+ }
+}
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/AdminRolesServiceImpl.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/AdminRolesServiceImpl.java
index b5bccfe3..9025b598 100644
--- a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/AdminRolesServiceImpl.java
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/AdminRolesServiceImpl.java
@@ -228,7 +228,10 @@ public class AdminRolesServiceImpl implements AdminRolesService {
EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeDaoSystemError, e);
logger.error(EELFLoggerDelegate.errorLogger, "setAppsWithAdminRoleStateForUser: exception in point 2", e);
try {
- transaction.rollback();
+ if(transaction!=null)
+ transaction.rollback();
+ else
+ logger.error(EELFLoggerDelegate.errorLogger, "setAppsWithAdminRoleStateForUser: transaction is null cannot rollback");
} catch (Exception ex) {
EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeExecuteRollbackError, e);
logger.error(EELFLoggerDelegate.errorLogger, "setAppsWithAdminRoleStateForUser: exception in point 3", ex);
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/EPRoleServiceImpl.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/EPRoleServiceImpl.java
index e509fcf5..3efe4382 100644
--- a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/EPRoleServiceImpl.java
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/EPRoleServiceImpl.java
@@ -145,7 +145,7 @@ public class EPRoleServiceImpl implements EPRoleService {
} else if (appId != 1 && !roleName.equals(PortalConstants.ADMIN_ROLE)) {
roles = (List<EPRole>) dataAccessService.executeNamedQuery("getAppRoles", params, null);
}
- int resultsCount = roles.size();
+ int resultsCount = (roles == null ? 0 : roles.size());
if (resultsCount > 1) {
logger.error(EELFLoggerDelegate.errorLogger,
"Trying to recover from duplicates by returning the first search result. This issue should be treated, it is probably not critical because duplicate roles should be similar.");
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/ExternalAccessRolesService.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/ExternalAccessRolesService.java
index 34088a22..77ce88c5 100644
--- a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/ExternalAccessRolesService.java
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/ExternalAccessRolesService.java
@@ -10,6 +10,7 @@ import org.openecomp.portalapp.portal.domain.EPUser;
import org.openecomp.portalapp.portal.transport.CentralRole;
import org.openecomp.portalsdk.core.domain.Role;
import org.openecomp.portalsdk.core.domain.RoleFunction;
+import org.openecomp.portalsdk.core.restful.domain.EcompUser;
public interface ExternalAccessRolesService {
@@ -246,6 +247,14 @@ public interface ExternalAccessRolesService {
* @throws Exception
*/
List<String> getMenuFunctionsList(String uebkey) throws Exception;
-
+
+ /**
+ *
+ * @param uebkey applications UebKey
+ * @return
+ * @throws Exception
+ * Method getAllUsers returns all the active users of application
+ */
+ List<EcompUser> getAllAppUsers(String uebkey) throws Exception;
}
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/ExternalAccessRolesServiceImpl.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/ExternalAccessRolesServiceImpl.java
index 95e5ddce..97fa98e5 100644
--- a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/ExternalAccessRolesServiceImpl.java
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/ExternalAccessRolesServiceImpl.java
@@ -2,6 +2,7 @@ package org.openecomp.portalapp.portal.service;
import java.util.ArrayList;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
@@ -11,6 +12,7 @@ import java.util.SortedSet;
import java.util.TreeSet;
import java.util.stream.Collectors;
+import org.apache.commons.lang.StringUtils;
import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
@@ -33,6 +35,7 @@ import org.openecomp.portalapp.portal.transport.CentralApp;
import org.openecomp.portalapp.portal.transport.CentralRole;
import org.openecomp.portalapp.portal.transport.CentralUser;
import org.openecomp.portalapp.portal.transport.CentralUserApp;
+import org.openecomp.portalapp.portal.transport.EcompUserRoles;
import org.openecomp.portalapp.portal.transport.ExternalAccessPerms;
import org.openecomp.portalapp.portal.transport.ExternalAccessPermsDetail;
import org.openecomp.portalapp.portal.transport.ExternalAccessRole;
@@ -45,6 +48,8 @@ import org.openecomp.portalapp.portal.utils.PortalConstants;
import org.openecomp.portalsdk.core.domain.Role;
import org.openecomp.portalsdk.core.domain.RoleFunction;
import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.restful.domain.EcompRole;
+import org.openecomp.portalsdk.core.restful.domain.EcompUser;
import org.openecomp.portalsdk.core.service.DataAccessService;
import org.openecomp.portalsdk.core.util.SystemProperties;
import org.springframework.beans.factory.annotation.Autowired;
@@ -69,6 +74,18 @@ import com.fasterxml.jackson.databind.type.TypeFactory;
@EPAuditLog
public class ExternalAccessRolesServiceImpl implements ExternalAccessRolesService {
+ private static final String AND_FUNCTION_CD_EQUALS = " and function_cd = '";
+
+ private static final String OWNER = ".owner";
+
+ private static final String ADMIN = ".admin";
+
+ private static final String ACCOUNT_ADMINISTRATOR = ".Account_Administrator";
+
+ private static final String FUNCTION_CD_LIKE_CLAUSE = " and function_cd like '%";
+
+ private static final String FUNCTION_PIPE = "|";
+
private static final String IS_NULL_STRING = "null";
private static final String EXTERNAL_AUTH_PERMS = "perms";
@@ -133,7 +150,7 @@ public class ExternalAccessRolesServiceImpl implements ExternalAccessRolesServic
List<EPApp> app = null;
try {
app = (List<EPApp>) dataAccessService.getList(EPApp.class, " where ueb_key = '" + uebkey + "'", null, null);
- if(!app.get(0).getEnabled()){
+ if(!app.get(0).getEnabled() && !app.get(0).getId().equals(PortalConstants.PORTAL_APP_ID)){
throw new Exception("Application:"+app.get(0).getName()+" is Unavailable");
}
} catch (Exception e) {
@@ -225,7 +242,13 @@ public class ExternalAccessRolesServiceImpl implements ExternalAccessRolesServic
ExternalAccessRolePerms extRolePerms = null;
ExternalAccessPerms extPerms = null;
List<EPRole> epRoleList = null;
- epRoleList = dataAccessService.getList(EPRole.class, WHERE_ROLE_ID_EQUALS + updateExtRole.getId(), null, null);
+ if (app.getId().equals(PortalConstants.PORTAL_APP_ID)) {
+ epRoleList = dataAccessService.getList(EPRole.class,
+ WHERE_ROLE_ID_EQUALS + updateExtRole.getId() + " and app_id is null", null, null);
+ } else {
+ epRoleList = dataAccessService.getList(EPRole.class,
+ " where app_role_id = " + updateExtRole.getId() + " and app_id = " + app.getId(), null, null);
+ }
String appRole = getSingleAppRole(epRoleList.get(0).getName(), app);
if (!appRole.equals(IS_EMPTY_JSON_STRING)) {
JSONObject jsonObj = new JSONObject(appRole);
@@ -268,9 +291,10 @@ public class ExternalAccessRolesServiceImpl implements ExternalAccessRolesServic
addRole(updateExtRole, app.getUebKey());
addRoleFunctionsInExternalSystem(updateExtRole, mapper, app);
}
+ boolean checkPriorityStatus = StringUtils.equals(String.valueOf(sysRoleList.getPriority()),String.valueOf(updateExtRole.getPriority()));
ExternalAccessRole updateRole = new ExternalAccessRole();
if (!isActiveValueChanged
- || !sysRoleList.getPriority().equals(String.valueOf(updateExtRole.getPriority()))
+ || !checkPriorityStatus
|| sysRoleList.getId().equals(IS_NULL_STRING)
|| !sysRoleList.getId().equals(String.valueOf(epRoleList.get(0).getId()))) {
String updateDesc = "";
@@ -278,17 +302,17 @@ public class ExternalAccessRolesServiceImpl implements ExternalAccessRolesServic
: APP_ID_EQUALS + app.getId();
List<EPRole> getRole = dataAccessService.getList(EPRole.class,
WHERE_ROLE_NAME_EQUALS + updateExtRole.getName() + "' and " + appId, null, null);
- Map<String, Object> extSystemUpdateRoleJsonMapper = new LinkedHashMap<>();
- extSystemUpdateRoleJsonMapper.put(ID, getRole.get(0).getId());
- extSystemUpdateRoleJsonMapper.put(ROLE_NAME, updateExtRole.getName());
- extSystemUpdateRoleJsonMapper.put(ACTIVE, updateExtRole.getActive());
- extSystemUpdateRoleJsonMapper.put(PRIORITY, updateExtRole.getPriority());
+ Map<String, String> extSystemUpdateRoleJsonMapper = new LinkedHashMap<>();
+ extSystemUpdateRoleJsonMapper.put(ID, String.valueOf(getRole.get(0).getId()));
+ extSystemUpdateRoleJsonMapper.put(ROLE_NAME, String.valueOf(updateExtRole.getName()));
+ extSystemUpdateRoleJsonMapper.put(ACTIVE, String.valueOf(updateExtRole.getActive()));
+ extSystemUpdateRoleJsonMapper.put(PRIORITY, String.valueOf(updateExtRole.getPriority()));
if (app.getId().equals(PortalConstants.PORTAL_APP_ID)) {
- extSystemUpdateRoleJsonMapper.put(APP_ID, null);
- extSystemUpdateRoleJsonMapper.put(APP_ROLE_ID, null);
+ extSystemUpdateRoleJsonMapper.put(APP_ID, "null");
+ extSystemUpdateRoleJsonMapper.put(APP_ROLE_ID, "null");
} else {
- extSystemUpdateRoleJsonMapper.put(APP_ID, app.getId());
- extSystemUpdateRoleJsonMapper.put(APP_ROLE_ID, getRole.get(0).getAppRoleId());
+ extSystemUpdateRoleJsonMapper.put(APP_ID, String.valueOf(app.getId()));
+ extSystemUpdateRoleJsonMapper.put(APP_ROLE_ID, String.valueOf(getRole.get(0).getAppRoleId()));
}
updateDesc = mapper.writeValueAsString(extSystemUpdateRoleJsonMapper);
@@ -465,13 +489,13 @@ public class ExternalAccessRolesServiceImpl implements ExternalAccessRolesServic
String addNewRole = "";
ExternalAccessRole extRole = new ExternalAccessRole();
String addDesc = null;
- Map<String, Object> extSystemJsonMapper = new LinkedHashMap<>();
- extSystemJsonMapper.put(ID, newRole.get(0).getId());
- extSystemJsonMapper.put(ROLE_NAME, newRole.get(0).getName());
- extSystemJsonMapper.put(ACTIVE, newRole.get(0).getActive());
- extSystemJsonMapper.put(PRIORITY, newRole.get(0).getPriority());
- extSystemJsonMapper.put(APP_ID, newRole.get(0).getAppId());
- extSystemJsonMapper.put(APP_ROLE_ID, newRole.get(0).getAppRoleId());
+ Map<String, String> extSystemJsonMapper = new LinkedHashMap<>();
+ extSystemJsonMapper.put(ID, String.valueOf(newRole.get(0).getId()));
+ extSystemJsonMapper.put(ROLE_NAME, String.valueOf(newRole.get(0).getName()));
+ extSystemJsonMapper.put(ACTIVE, String.valueOf(newRole.get(0).getActive()));
+ extSystemJsonMapper.put(PRIORITY, String.valueOf(newRole.get(0).getPriority()));
+ extSystemJsonMapper.put(APP_ID, String.valueOf(newRole.get(0).getAppId()));
+ extSystemJsonMapper.put(APP_ROLE_ID, String.valueOf(newRole.get(0).getAppRoleId()));
addDesc = mapper.writeValueAsString(extSystemJsonMapper);
extRole.setName(app.getNameSpace() + "." + newRole.get(0).getName().replaceAll(" ", "_"));
extRole.setDescription(addDesc);
@@ -508,18 +532,18 @@ public class ExternalAccessRolesServiceImpl implements ExternalAccessRolesServic
ExternalAccessRole extRole = new ExternalAccessRole();
List<EPRole> role = null;
String addDesc = null;
- Map<String, Object> extSystemUpdateRole = new LinkedHashMap<>();
+ Map<String, String> extSystemUpdateRole = new LinkedHashMap<>();
if (app.getId().equals(PortalConstants.PORTAL_APP_ID)) {
- role = dataAccessService.getList(EPRole.class, WHERE_ROLE_ID_EQUALS + addRole.getId(), null, null);
+ role = dataAccessService.getList(EPRole.class, WHERE_ROLE_ID_EQUALS + addRole.getId() + " and app_id is null", null, null);
} else {
- role = dataAccessService.getList(EPRole.class, " where app_role_id = " + addRole.getId(), null, null);
+ role = dataAccessService.getList(EPRole.class, " where app_role_id = " + addRole.getId() + " and app_id ="+app.getId(), null, null);
}
- extSystemUpdateRole.put(ID, role.get(0).getId());
- extSystemUpdateRole.put(ROLE_NAME, addRole.getName());
- extSystemUpdateRole.put(ACTIVE, role.get(0).getActive());
- extSystemUpdateRole.put(PRIORITY, role.get(0).getPriority());
- extSystemUpdateRole.put(APP_ID, role.get(0).getAppId());
- extSystemUpdateRole.put(APP_ROLE_ID, role.get(0).getAppRoleId());
+ extSystemUpdateRole.put(ID, String.valueOf(role.get(0).getId()));
+ extSystemUpdateRole.put(ROLE_NAME, String.valueOf(addRole.getName()));
+ extSystemUpdateRole.put(ACTIVE, String.valueOf(role.get(0).getActive()));
+ extSystemUpdateRole.put(PRIORITY, String.valueOf(role.get(0).getPriority()));
+ extSystemUpdateRole.put(APP_ID, String.valueOf(role.get(0).getAppId()));
+ extSystemUpdateRole.put(APP_ROLE_ID, String.valueOf(role.get(0).getAppRoleId()));
addDesc = mapper.writeValueAsString(extSystemUpdateRole);
extRole.setName(app.getNameSpace() + "." + addRole.getName().replaceAll(" ", "_"));
extRole.setDescription(addDesc);
@@ -652,13 +676,17 @@ public class ExternalAccessRolesServiceImpl implements ExternalAccessRolesServic
* @param applicationRoles
* @throws Exception
*/
+ @SuppressWarnings("unchecked")
private void saveRoleFunction(List<RoleFunction> roleFunctionListNew, EPApp app, List<EPRole> applicationRoles)
throws Exception {
for (RoleFunction roleFunc : roleFunctionListNew) {
EPAppRoleFunction appRoleFunc = new EPAppRoleFunction();
appRoleFunc.setAppId(app.getId());
appRoleFunc.setRoleId(applicationRoles.get(0).getId());
- appRoleFunc.setCode(roleFunc.getCode());
+ // query to check if function code is different for safe operation
+ List<CentralRoleFunction> roleFunction = dataAccessService.getList(CentralRoleFunction.class,
+ WHERE_APP_ID_EQUALS+ app.getId()+FUNCTION_CD_LIKE_CLAUSE + roleFunc.getCode() + "'", null, null);
+ appRoleFunc.setCode(roleFunction.get(0).getCode());
dataAccessService.saveDomainObject(appRoleFunc, null);
}
}
@@ -739,15 +767,33 @@ public class ExternalAccessRolesServiceImpl implements ExternalAccessRolesServic
@Override
public List<CentralRoleFunction> getRoleFuncList(String uebkey) throws Exception {
EPApp app = getApp(uebkey).get(0);
- List<CentralRoleFunction> getRoleFuncList = null;
+ List<CentralRoleFunction> finalRoleList = new ArrayList<>();
final Map<String, Long> params = new HashMap<>();
params.put(APP_ID, app.getId());
// Sync all functions from external system into Ecomp portal DB
logger.debug(EELFLoggerDelegate.debugLogger, "getRoleFuncList: Entering into syncRoleFunctionFromExternalAccessSystem");
syncRoleFunctionFromExternalAccessSystem(app);
logger.debug(EELFLoggerDelegate.debugLogger, "getRoleFuncList: Finished syncRoleFunctionFromExternalAccessSystem");
- getRoleFuncList = dataAccessService.executeNamedQuery("getAllRoleFunctions", params, null);
- return getRoleFuncList;
+ List<CentralRoleFunction> getRoleFuncList = dataAccessService.executeNamedQuery("getAllRoleFunctions", params, null);
+ for(CentralRoleFunction roleFuncItem : getRoleFuncList ){
+ if(roleFuncItem.getCode().contains(FUNCTION_PIPE)){
+ String code = "";
+ int count = StringUtils.countMatches(roleFuncItem.getCode(), FUNCTION_PIPE);
+ if (count == 2)
+ code = roleFuncItem.getCode().substring(
+ roleFuncItem.getCode().indexOf(FUNCTION_PIPE) + 1,
+ roleFuncItem.getCode().lastIndexOf(FUNCTION_PIPE));
+ else
+ code = roleFuncItem.getCode()
+ .substring(roleFuncItem.getCode().lastIndexOf(FUNCTION_PIPE) + 1);
+
+ roleFuncItem.setCode(code);
+ finalRoleList.add(roleFuncItem);
+ } else{
+ finalRoleList.add(roleFuncItem);
+ }
+ }
+ return finalRoleList;
}
/**
@@ -792,8 +838,24 @@ public class ExternalAccessRolesServiceImpl implements ExternalAccessRolesServic
.executeNamedQuery("getAppRoleFunctionList", params, null);
SortedSet<CentralRoleFunction> roleFunctionSet = new TreeSet<>();
for (CentralRoleFunction roleFunc : appRoleFunctionList) {
- CentralRoleFunction cenRoleFunc = new CentralRoleFunction(roleFunc.getId(),
- roleFunc.getCode(), roleFunc.getName(), null, null);
+ String functionCode = "";
+ if (roleFunc.getCode().contains(FUNCTION_PIPE)) {
+ int count = StringUtils.countMatches(roleFunc.getCode(), FUNCTION_PIPE);
+ String finalFunctionCodeVal;
+ if (count == 2)
+ finalFunctionCodeVal = roleFunc.getCode().substring(
+ roleFunc.getCode().indexOf(FUNCTION_PIPE) + 1,
+ roleFunc.getCode().lastIndexOf(FUNCTION_PIPE));
+ else
+ finalFunctionCodeVal = roleFunc.getCode()
+ .substring(roleFunc.getCode().lastIndexOf(FUNCTION_PIPE) + 1);
+
+ functionCode = finalFunctionCodeVal;
+ } else {
+ functionCode = roleFunc.getCode();
+ }
+ CentralRoleFunction cenRoleFunc = new CentralRoleFunction(roleFunc.getId(), functionCode,
+ roleFunc.getName(), null, null);
roleFunctionSet.add(cenRoleFunc);
}
Long userRoleId = null;
@@ -892,7 +954,22 @@ public class ExternalAccessRolesServiceImpl implements ExternalAccessRolesServic
params, null);
SortedSet<CentralRoleFunction> roleFunctionSet = new TreeSet<>();
for (CentralRoleFunction roleFunc : cenRoleFuncList) {
- CentralRoleFunction cenRoleFunc = new CentralRoleFunction(role.getId(), roleFunc.getCode(),
+ String functionCode = "";
+ if (roleFunc.getCode().contains(FUNCTION_PIPE)) {
+ int count = StringUtils.countMatches(roleFunc.getCode(), FUNCTION_PIPE);
+ String finalFunctionCodeVal;
+ if (count == 2)
+ finalFunctionCodeVal = roleFunc.getCode().substring(
+ roleFunc.getCode().indexOf(FUNCTION_PIPE) + 1,
+ roleFunc.getCode().lastIndexOf(FUNCTION_PIPE));
+ else
+ finalFunctionCodeVal = roleFunc.getCode()
+ .substring(roleFunc.getCode().lastIndexOf(FUNCTION_PIPE) + 1);
+ functionCode = finalFunctionCodeVal;
+ } else {
+ functionCode = roleFunc.getCode();
+ }
+ CentralRoleFunction cenRoleFunc = new CentralRoleFunction(role.getId(), functionCode,
roleFunc.getName(), null, null);
roleFunctionSet.add(cenRoleFunc);
}
@@ -925,13 +1002,20 @@ public class ExternalAccessRolesServiceImpl implements ExternalAccessRolesServic
getRoleFuncList = dataAccessService.executeNamedQuery("getRoleFunction", params, null);
if (getRoleFuncList.isEmpty()) {
return roleFunc;
+ } else{
+ String functionCodeFormat = getRoleFuncList.get(0).getCode();
+ if(functionCodeFormat.contains(FUNCTION_PIPE)){
+ String newfunctionCodeFormat = functionCodeFormat.substring(functionCodeFormat.lastIndexOf(FUNCTION_PIPE)+1);
+ roleFunc = new CentralRoleFunction(getRoleFuncList.get(0).getId(), newfunctionCodeFormat, getRoleFuncList.get(0).getName(), getRoleFuncList.get(0).getAppId(), getRoleFuncList.get(0).getEditUrl());
+ } else{
+ roleFunc = new CentralRoleFunction(getRoleFuncList.get(0).getId(), functionCodeFormat, getRoleFuncList.get(0).getName(), getRoleFuncList.get(0).getAppId(), getRoleFuncList.get(0).getEditUrl());
+ }
}
-
} catch (Exception e) {
logger.error(EELFLoggerDelegate.errorLogger, "getRoleFunction: failed", e);
throw new Exception("getRoleFunction failed", e);
}
- return getRoleFuncList.get(0);
+ return roleFunc;
}
@Override
@@ -959,13 +1043,10 @@ public class ExternalAccessRolesServiceImpl implements ExternalAccessRolesServic
private void addRoleFunctionInExternalSystem(CentralRoleFunction domainCentralRoleFunction, EPApp app)
throws Exception {
ObjectMapper mapper = new ObjectMapper();
- final Map<String, String> params = new HashMap<>();
- params.put("functionCd", domainCentralRoleFunction.getCode());
- params.put(APP_ID, String.valueOf(app.getId()));
ExternalAccessPerms extPerms = new ExternalAccessPerms();
HttpHeaders headers = EcompPortalUtils.base64encodeKeyForAAFBasicAuth();
- List<CentralRoleFunction> appRoleFunc = dataAccessService.executeNamedQuery("getAppFunctionDetails", params,
- null);
+ List<CentralRoleFunction> appRoleFunc = dataAccessService.getList(CentralRoleFunction.class,
+ WHERE_APP_ID_EQUALS + app.getId() + AND_FUNCTION_CD_EQUALS + domainCentralRoleFunction.getCode() + "'", null, null);
String roleFuncName = null;
if (!appRoleFunc.isEmpty()) {
roleFuncName = appRoleFunc.get(0).getCode();
@@ -1034,10 +1115,10 @@ public class ExternalAccessRolesServiceImpl implements ExternalAccessRolesServic
boolean deleteFunctionResponse = false;
try {
final Map<String, String> params = new HashMap<>();
- params.put("functionCd", code);
+ params.put("functionCode", code);
params.put(APP_ID, String.valueOf(app.getId()));
CentralRoleFunction domainCentralRoleFunction = (CentralRoleFunction) dataAccessService
- .executeNamedQuery("getAppFunctionDetails", params, null).get(0);
+ .executeNamedQuery("getRoleFunction", params, null).get(0);
deleteRoleFunctionInExternalSystem(domainCentralRoleFunction, app);
// Delete role function dependency records
deleteAppRoleFunctions(code, app);
@@ -1057,7 +1138,7 @@ public class ExternalAccessRolesServiceImpl implements ExternalAccessRolesServic
*/
private void deleteAppRoleFunctions(String code, EPApp app) {
dataAccessService.deleteDomainObjects(EPAppRoleFunction.class,
- APP_ID_EQUALS + app.getId() + " and function_cd = '" + code + "'", null);
+ APP_ID_EQUALS + app.getId() + FUNCTION_CD_LIKE_CLAUSE + code + "'", null);
}
/**
@@ -1073,7 +1154,13 @@ public class ExternalAccessRolesServiceImpl implements ExternalAccessRolesServic
try {
ObjectMapper mapper = new ObjectMapper();
ExternalAccessPerms extPerms = new ExternalAccessPerms();
- String checkType = domainCentralRoleFunction.getCode().contains("menu") ? "menu" : "url";
+ String instanceValue = "";
+ if(domainCentralRoleFunction.getCode().contains(FUNCTION_PIPE)){
+ instanceValue = domainCentralRoleFunction.getCode().substring(domainCentralRoleFunction.getCode().lastIndexOf(FUNCTION_PIPE)+1);
+ }else{
+ instanceValue = domainCentralRoleFunction.getCode();
+ }
+ String checkType = instanceValue.contains("menu") ? "menu" : "url";
HttpHeaders headers = EcompPortalUtils.base64encodeKeyForAAFBasicAuth();
extPerms.setAction("*");
extPerms.setInstance(domainCentralRoleFunction.getCode());
@@ -1298,21 +1385,29 @@ public class ExternalAccessRolesServiceImpl implements ExternalAccessRolesServic
ExternalAccessPermsDetail permDetails = null;
List<ExternalAccessPermsDetail> permsDetailList = new ArrayList<>();
for (int i = 0; i < extPerms.length(); i++) {
+ String description = null;
+ if(extPerms.getJSONObject(i).has("description")){
+ description = extPerms.getJSONObject(i).getString(EXTERNAL_AUTH_ROLE_DESCRIPTION);
+ } else{
+ description = extPerms.getJSONObject(i).getString("instance");
+ }
if (extPerms.getJSONObject(i).has("roles")) {
ObjectMapper rolesListMapper = new ObjectMapper();
JSONArray resRoles = extPerms.getJSONObject(i).getJSONArray("roles");
List<String> list = rolesListMapper.readValue(resRoles.toString(),
TypeFactory.defaultInstance().constructCollectionType(List.class, String.class));
permDetails = new ExternalAccessPermsDetail(extPerms.getJSONObject(i).getString("type"),
- extPerms.getJSONObject(i).getString("instance"),
- extPerms.getJSONObject(i).getString("action"), list,
- extPerms.getJSONObject(i).getString(EXTERNAL_AUTH_ROLE_DESCRIPTION));
+ extPerms.getJSONObject(i).getString("type").substring(app.getNameSpace().length() + 1)
+ + FUNCTION_PIPE + extPerms.getJSONObject(i).getString("instance") + FUNCTION_PIPE
+ + extPerms.getJSONObject(i).getString("action"),
+ extPerms.getJSONObject(i).getString("action"), list, description);
permsDetailList.add(permDetails);
} else {
permDetails = new ExternalAccessPermsDetail(extPerms.getJSONObject(i).getString("type"),
- extPerms.getJSONObject(i).getString("instance"),
- extPerms.getJSONObject(i).getString("action"),
- extPerms.getJSONObject(i).getString(EXTERNAL_AUTH_ROLE_DESCRIPTION));
+ extPerms.getJSONObject(i).getString("type").substring(app.getNameSpace().length() + 1)
+ + FUNCTION_PIPE + extPerms.getJSONObject(i).getString("instance") + FUNCTION_PIPE
+ + extPerms.getJSONObject(i).getString("action"),
+ extPerms.getJSONObject(i).getString("action"), description);
permsDetailList.add(permDetails);
}
}
@@ -1329,20 +1424,34 @@ public class ExternalAccessRolesServiceImpl implements ExternalAccessRolesServic
}
// delete all application role functions
dataAccessService.deleteDomainObjects(EPAppRoleFunction.class, APP_ID_EQUALS + app.getId(), null);
-
// Add if new functions and app role functions were added in external auth system
for (ExternalAccessPermsDetail permsDetail : permsDetailList) {
- if (!roleFuncMap.containsKey(permsDetail.getInstance())) {
- try{
- CentralRoleFunction addFunction = new CentralRoleFunction();
- addFunction.setAppId(app.getId());
- addFunction.setCode(permsDetail.getInstance());
- addFunction.setName(permsDetail.getDescription());
- dataAccessService.saveDomainObject(addFunction, null);
- } catch(Exception e){
- logger.error(EELFLoggerDelegate.errorLogger, "syncRoleFunctionFromExternalAccessSystem: Failed to add function", e);
+ String code = permsDetail.getInstance();
+ CentralRoleFunction getFunctionCodeKey = roleFuncMap.get(permsDetail.getInstance());
+ if (null == getFunctionCodeKey) {
+ String finalFunctionCodeVal = "";
+ if (permsDetail.getInstance().contains(FUNCTION_PIPE)) {
+ int count = StringUtils.countMatches(permsDetail.getInstance(), FUNCTION_PIPE);
+ if (count == 2)
+ finalFunctionCodeVal = permsDetail.getInstance().substring(
+ permsDetail.getInstance().indexOf(FUNCTION_PIPE) + 1,
+ permsDetail.getInstance().lastIndexOf(FUNCTION_PIPE));
+ else
+ finalFunctionCodeVal = permsDetail.getInstance()
+ .substring(permsDetail.getInstance().lastIndexOf(FUNCTION_PIPE) + 1);
+ } else {
+ finalFunctionCodeVal = permsDetail.getInstance();
}
- }
+ CentralRoleFunction checkIfCodeStillExits = roleFuncMap.get(finalFunctionCodeVal);
+ if (null == checkIfCodeStillExits) {
+ logger.debug(EELFLoggerDelegate.debugLogger,
+ "syncRoleFunctionFromExternalAccessSystem: Adding function: {} ", code);
+ addFunctionInEcompDB(app, permsDetail, code);
+ logger.debug(EELFLoggerDelegate.debugLogger,
+ "syncRoleFunctionFromExternalAccessSystem: Finished adding function: {} ", code);
+
+ }
+ }
List<EPRole> epRolesList = null;
List<String> roles = permsDetail.getRoles();
if (roles != null) {
@@ -1372,17 +1481,53 @@ public class ExternalAccessRolesServiceImpl implements ExternalAccessRolesServic
+ roleList.substring(app.getNameSpace().length() + 1) + "'",
null, null);
}
+ // Adding new role thats does not exits in Local but exists in external access system
+ if (epRolesList.isEmpty()) {
+ Role role = addRoleInDBIfDoesNotExists(app, roleList.substring(app.getNameSpace().length() + 1));
+ addIfRoleDescriptionNotExitsInExtSystem(role, app);
+ epRolesList = dataAccessService.getList(EPRole.class,
+ WHERE_APP_ID_EQUALS + app.getId() + " and role_name = '"
+ + role.getName() + "'",
+ null, null);
+ }
}
// save all application role functions
if (!epRolesList.isEmpty()) {
- try{
- EPAppRoleFunction addAppRoleFunc = new EPAppRoleFunction();
- addAppRoleFunc.setAppId(app.getId());
- addAppRoleFunc.setCode(permsDetail.getInstance());
- addAppRoleFunc.setRoleId(epRolesList.get(0).getId());
- dataAccessService.saveDomainObject(addAppRoleFunc, null);
- } catch(Exception e){
- logger.error(EELFLoggerDelegate.errorLogger, "syncRoleFunctionFromExternalAccessSystem: Failed to save app role function ", e);
+ try {
+ List<CentralRoleFunction> roleFunctionList = null;
+ String functionCode = "";
+ if (permsDetail.getInstance().contains(FUNCTION_PIPE)) {
+ int count = StringUtils.countMatches(permsDetail.getInstance(), FUNCTION_PIPE);
+ String finalFunctionCodeVal;
+ if (count == 2)
+ finalFunctionCodeVal = permsDetail.getInstance().substring(
+ permsDetail.getInstance().indexOf(FUNCTION_PIPE) + 1,
+ permsDetail.getInstance().lastIndexOf(FUNCTION_PIPE));
+ else
+ finalFunctionCodeVal = permsDetail.getInstance()
+ .substring(permsDetail.getInstance().lastIndexOf(FUNCTION_PIPE) + 1);
+
+ functionCode = finalFunctionCodeVal;
+ }
+ roleFunctionList = dataAccessService.getList(CentralRoleFunction.class,
+ " where app_id = " + app.getId() + AND_FUNCTION_CD_EQUALS + functionCode + "'",
+ null, null);
+ if (roleFunctionList.isEmpty()) {
+ roleFunctionList = dataAccessService.getList(CentralRoleFunction.class,
+ " where app_id = " + app.getId() + AND_FUNCTION_CD_EQUALS + code + "'",
+ null, null);
+ }
+ if (!roleFunctionList.isEmpty()) {
+ EPAppRoleFunction addAppRoleFunc = new EPAppRoleFunction();
+ addAppRoleFunc.setAppId(app.getId());
+ addAppRoleFunc.setCode(roleFunctionList.get(0).getCode());
+ addAppRoleFunc.setRoleId(epRolesList.get(0).getId());
+ dataAccessService.saveDomainObject(addAppRoleFunc, null);
+ }
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger,
+ "syncRoleFunctionFromExternalAccessSystem: Failed to save app role function ",
+ e);
}
}
}
@@ -1394,6 +1539,97 @@ public class ExternalAccessRolesServiceImpl implements ExternalAccessRolesServic
}
}
+
+ /**
+ *
+ * Add function into local DB
+ *
+ * @param app
+ * @param permsDetail
+ * @param code
+ */
+ private void addFunctionInEcompDB(EPApp app, ExternalAccessPermsDetail permsDetail, String code) {
+ try{
+ CentralRoleFunction addFunction = new CentralRoleFunction();
+ addFunction.setAppId(app.getId());
+ addFunction.setCode(code);
+ addFunction.setName(permsDetail.getDescription());
+ dataAccessService.saveDomainObject(addFunction, null);
+ } catch(Exception e){
+ logger.error(EELFLoggerDelegate.errorLogger, "addFunctionInEcompDB: Failed to add function", e);
+ }
+ }
+
+ /**
+ *
+ * It updates description of a role in external auth system
+ *
+ * @param role
+ * @param app
+ * @throws Exception
+ */
+ private void addIfRoleDescriptionNotExitsInExtSystem(Role role, EPApp app) throws Exception {
+ String addRoleNew = updateExistingRoleInExternalSystem(role, app);
+ HttpHeaders headers = EcompPortalUtils.base64encodeKeyForAAFBasicAuth();
+ try {
+ HttpEntity<String> entity = new HttpEntity<>(addRoleNew, headers);
+ template.exchange(
+ SystemProperties.getProperty(EPCommonSystemProperties.EXTERNAL_CENTRAL_ACCESS_URL) + "role",
+ HttpMethod.PUT, entity, String.class);
+ } catch (HttpClientErrorException e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "HttpClientErrorException - Failed to addIfRoleDescriptionNotExitsInExtSystem",
+ e);
+ EPLogUtil.logExternalAuthAccessAlarm(logger, e.getStatusCode());
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "addIfRoleDescriptionNotExitsInExtSystem: Failed",
+ e);
+ }
+ }
+
+ /**
+ *
+ * While sync functions form external auth system if new role found we should add in local and return Role.class object
+ *
+ * @param app
+ * @param role
+ * @return
+ */
+ @SuppressWarnings("unchecked")
+ private Role addRoleInDBIfDoesNotExists(EPApp app, String role) {
+ Role setNewRole = new Role();
+ EPRole epRoleNew = new EPRole();
+ try {
+ epRoleNew.setActive(true);
+ epRoleNew.setName(role);
+ if (app.getId().equals(PortalConstants.PORTAL_APP_ID)) {
+ epRoleNew.setAppId(null);
+ } else {
+ epRoleNew.setAppId(app.getId());
+ }
+ dataAccessService.saveDomainObject(epRoleNew, null);
+ List<EPRole> getRoleCreated = null;
+ if (!app.getId().equals(PortalConstants.PORTAL_APP_ID)) {
+ List<EPRole> roleCreated = dataAccessService.getList(EPRole.class,
+ WHERE_ROLE_NAME_EQUALS + role + "' and app_id = " + app.getId(), null, null);
+ EPRole epUpdateRole = roleCreated.get(0);
+ epUpdateRole.setAppRoleId(epUpdateRole.getId());
+ dataAccessService.saveDomainObject(epUpdateRole, null);
+ getRoleCreated = dataAccessService.getList(EPRole.class,
+ WHERE_ROLE_NAME_EQUALS + role + "' and app_id = " + app.getId(), null, null);
+ } else {
+ getRoleCreated = dataAccessService.getList(EPRole.class,
+ WHERE_ROLE_NAME_EQUALS + role + "' and app_id is null", null, null);
+ }
+ EPRole roleObject = getRoleCreated.get(0);
+ setNewRole.setId(roleObject.getId());
+ setNewRole.setName(roleObject.getName());
+ setNewRole.setActive(roleObject.getActive());
+ setNewRole.setPriority(roleObject.getPriority());
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "addRoleInDBIfDoesNotExists: Failed", e);
+ }
+ return setNewRole;
+ }
@Override
@SuppressWarnings("unchecked")
@@ -1610,28 +1846,27 @@ public class ExternalAccessRolesServiceImpl implements ExternalAccessRolesServic
ObjectMapper mapper = new ObjectMapper();
HttpHeaders headers = EcompPortalUtils.base64encodeKeyForAAFBasicAuth();
HttpEntity<String> entity = new HttpEntity<>(headers);
- logger.debug(EELFLoggerDelegate.debugLogger, "syncApplicationRolesWithEcompDB: {} " , CONNECTING_TO_EXTERNAL_AUTH_SYSTEM_LOG_MESSAGE);
+ logger.debug(EELFLoggerDelegate.debugLogger, "syncApplicationRolesWithEcompDB: {} ",
+ CONNECTING_TO_EXTERNAL_AUTH_SYSTEM_LOG_MESSAGE);
response = template
.exchange(SystemProperties.getProperty(EPCommonSystemProperties.EXTERNAL_CENTRAL_ACCESS_URL)
+ "roles/ns/" + app.getNameSpace(), HttpMethod.GET, entity, String.class);
String res = response.getBody();
- logger.debug(EELFLoggerDelegate.debugLogger, "syncApplicationRolesWithEcompDB: Finished GET roles from External Auth system and the result is :",
+ logger.debug(EELFLoggerDelegate.debugLogger,
+ "syncApplicationRolesWithEcompDB: Finished GET roles from External Auth system and the result is :",
res);
JSONObject jsonObj = new JSONObject(res);
JSONArray extRole = jsonObj.getJSONArray("role");
for (int i = 0; i < extRole.length(); i++) {
- if (extRole.getJSONObject(i).getString(ROLE_NAME).equals(app.getNameSpace() + ".admin")
- || extRole.getJSONObject(i).getString(ROLE_NAME).equals(app.getNameSpace() + ".owner")) {
+ if (extRole.getJSONObject(i).getString(ROLE_NAME).equals(app.getNameSpace() + ADMIN)
+ || extRole.getJSONObject(i).getString(ROLE_NAME).equals(app.getNameSpace() + OWNER)
+ || (extRole.getJSONObject(i).getString(ROLE_NAME).equals(app.getNameSpace() + ACCOUNT_ADMINISTRATOR)
+ && !app.getId().equals(PortalConstants.PORTAL_APP_ID))) {
extRole.remove(i);
i--;
- }
- if (!app.getId().equals(PortalConstants.PORTAL_APP_ID) && extRole.getJSONObject(i).get(ROLE_NAME)
- .equals(app.getNameSpace() + "." + PortalConstants.ADMIN_ROLE.replaceAll(" ", "_"))) {
- extRole.remove(i);
- i--;
- }
+ }
}
- List<EPAppRoleFunction> applicationRoleFunctionList = new ArrayList<>();
+ dataAccessService.deleteDomainObjects(EPAppRoleFunction.class, APP_ID_EQUALS + app.getId(), null);
for (int i = 0; i < extRole.length(); i++) {
ExternalRoleDetails externalRoleDetail = new ExternalRoleDetails();
EPAppRoleFunction ePAppRoleFunction = new EPAppRoleFunction();
@@ -1664,7 +1899,7 @@ public class ExternalAccessRolesServiceImpl implements ExternalAccessRolesServic
if (ApplicationRole.getActive().equals(IS_NULL_STRING)) {
externalRoleDetail.setActive(false);
} else {
- externalRoleDetail.setActive(Boolean.parseBoolean(ApplicationRole.getActive().toString()));
+ externalRoleDetail.setActive(Boolean.parseBoolean(ApplicationRole.getActive()));
}
externalRoleDetail.setName(ApplicationRole.getName());
@@ -1673,13 +1908,13 @@ public class ExternalAccessRolesServiceImpl implements ExternalAccessRolesServic
} else if (ApplicationRole.getAppId().equals(IS_NULL_STRING)) {
externalRoleDetail.setAppId(app.getId());
} else {
- externalRoleDetail.setAppId(Long.parseLong(ApplicationRole.getAppId().toString()));
+ externalRoleDetail.setAppId(Long.parseLong(ApplicationRole.getAppId()));
}
if (ApplicationRole.getPriority().equals(IS_NULL_STRING)) {
externalRoleDetail.setPriority(null);
} else {
- externalRoleDetail.setPriority(Integer.parseInt(ApplicationRole.getPriority().toString()));
+ externalRoleDetail.setPriority(Integer.parseInt(ApplicationRole.getPriority()));
}
if (ApplicationRole.getAppRoleId().equals(IS_NULL_STRING) && app.getId() == 1) {
@@ -1687,17 +1922,40 @@ public class ExternalAccessRolesServiceImpl implements ExternalAccessRolesServic
}
if (!externalAccessPermsOfRole.isEmpty()) {
+ // Adding functions to roles
for (ExternalAccessPerms externalpermission : externalAccessPermsOfRole) {
- EPAppRoleFunction apRoleFunction = new EPAppRoleFunction();
- apRoleFunction.setAppId(app.getId());
- apRoleFunction.setRoleId(Long.parseLong(ApplicationRole.getId()));
- apRoleFunction.setCode(externalpermission.getInstance());
- applicationRoleFunctionList.add(apRoleFunction);
+ try {
+ logger.debug(EELFLoggerDelegate.debugLogger,
+ "SyncApplicationRolesWithEcompDB: Adding function to the role: {}",
+ externalpermission.getInstance());
+ List<CentralRoleFunction> roleFunction = null;
+ roleFunction = dataAccessService.getList(
+ CentralRoleFunction.class, " where function_cd = '"
+ + externalpermission.getInstance() + "' and " + APP_ID_EQUALS + app.getId(),
+ null, null);
+ if (roleFunction.isEmpty()) {
+ String funcCode = externalpermission.getType()
+ .substring(app.getNameSpace().length() + 1) + FUNCTION_PIPE
+ + externalAccessPerms.getInstance();
+ roleFunction = dataAccessService.getList(CentralRoleFunction.class,
+ " where function_cd = '" + funcCode + "' and " + APP_ID_EQUALS + app.getId(), null,
+ null);
+ }
+ if(!roleFunction.isEmpty()){
+ EPAppRoleFunction apRoleFunction = new EPAppRoleFunction();
+ apRoleFunction.setAppId(app.getId());
+ apRoleFunction.setRoleId(Long.parseLong(ApplicationRole.getId()));
+ apRoleFunction.setCode(roleFunction.get(0).getCode());
+ dataAccessService.saveDomainObject(apRoleFunction, null);
+ }
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger,
+ "SyncApplicationRolesWithEcompDB: Failed to add role function", e);
+ }
}
}
externalRoleDetailsList.add(externalRoleDetail);
}
-
for (ExternalRoleDetails externalRole : externalRoleDetailsList) {
EPRole ecompRole = convertExternalRoleDetailstoEpRole(externalRole);
finalRoleList.add(ecompRole);
@@ -1717,32 +1975,37 @@ public class ExternalAccessRolesServiceImpl implements ExternalAccessRolesServic
}
}
- // Check if roles exits in external Access system and make it
- // inactive
+ // Check if roles exits in external Access system and make it inactive
final Map<String, EPRole> checkRolesInactive = new HashMap<>();
for (EPRole extrole : finalRoleList) {
checkRolesInactive.put(extrole.getName(), extrole);
}
for (EPRole role : applicationRolesList) {
- final Map<String, String> extRoleParams = new HashMap<>();
- List<EPRole> roleList = new ArrayList<>();
- extRoleParams.put("appRoleName", role.getName());
- if (!checkRolesInactive.containsKey(role.getName())) {
- if (app.getId() == 1) {
- roleList = dataAccessService.executeNamedQuery("getPortalAppRoles", extRoleParams, null);
- } else {
- extRoleParams.put(APP_ID, app.getId().toString());
- roleList = dataAccessService.executeNamedQuery("getRoletoUpdateAAF", extRoleParams, null);
+ try {
+ final Map<String, String> extRoleParams = new HashMap<>();
+ List<EPRole> roleList = null;
+ extRoleParams.put("appRoleName", role.getName());
+ if (!checkRolesInactive.containsKey(role.getName())) {
+ if (app.getId() == 1) {
+ roleList = dataAccessService.executeNamedQuery("getPortalAppRoles", extRoleParams, null);
+ } else {
+ extRoleParams.put(APP_ID, app.getId().toString());
+ roleList = dataAccessService.executeNamedQuery("getRoletoUpdateAAF", extRoleParams, null);
+ }
+ EPRole updateRoleInactive = roleList.get(0);
+ updateRoleInactive.setActive(false);
+ dataAccessService.saveDomainObject(updateRoleInactive, null);
}
- EPRole updateRoleInactive = roleList.get(0);
- updateRoleInactive.setActive(false);
- dataAccessService.saveDomainObject(updateRoleInactive, null);
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger,
+ "syncApplicationRolesWithEcompDB: Failed to de-activate role ", e);
}
}
+ // It checks properties in the external auth system app role description and updates role in local
for (EPRole roleItem : finalRoleList) {
final Map<String, String> roleParams = new HashMap<>();
- List<EPRole> currentList = new ArrayList<>();
+ List<EPRole> currentList = null;
roleParams.put("appRoleName", roleItem.getName());
if (app.getId() == 1) {
currentList = dataAccessService.executeNamedQuery("getPortalAppRoles", roleParams, null);
@@ -1752,65 +2015,71 @@ public class ExternalAccessRolesServiceImpl implements ExternalAccessRolesServic
}
if (!currentList.isEmpty()) {
- Boolean aafRoleActive;
- Boolean localRoleActive;
- boolean result;
- aafRoleActive = Boolean.valueOf(roleItem.getActive());
- localRoleActive = Boolean.valueOf(currentList.get(0).getActive());
- result = aafRoleActive.equals(localRoleActive);
- EPRole updateRole = currentList.get(0);
-
- if (!result) {
- updateRole.setActive(roleItem.getActive());
- dataAccessService.saveDomainObject(updateRole, null);
- }
- if (roleItem.getPriority() != null
- && !currentList.get(0).getPriority().equals(roleItem.getPriority())) {
- updateRole.setPriority(roleItem.getPriority());
- dataAccessService.saveDomainObject(updateRole, null);
+ try {
+ Boolean aafRoleActive;
+ Boolean localRoleActive;
+ boolean result;
+ aafRoleActive = Boolean.valueOf(roleItem.getActive());
+ localRoleActive = Boolean.valueOf(currentList.get(0).getActive());
+ result = aafRoleActive.equals(localRoleActive);
+ EPRole updateRole = currentList.get(0);
+
+ if (!result) {
+ updateRole.setActive(roleItem.getActive());
+ dataAccessService.saveDomainObject(updateRole, null);
+ }
+ if (roleItem.getPriority() != null
+ && !currentList.get(0).getPriority().equals(roleItem.getPriority())) {
+ updateRole.setPriority(roleItem.getPriority());
+ dataAccessService.saveDomainObject(updateRole, null);
+ }
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger,
+ "syncApplicationRolesWithEcompDB: Failed to update role ", e);
}
}
}
EPRole roleToBeAddedInEcompDB = new EPRole();
for (int i = 0; i < roleListToBeAddInEcompDB.size(); i++) {
- roleToBeAddedInEcompDB = roleListToBeAddInEcompDB.get(i);
- if (app.getId() == 1) {
- roleToBeAddedInEcompDB.setAppRoleId(null);
- }
- dataAccessService.saveDomainObject(roleToBeAddedInEcompDB, null);
- List<EPRole> getRoleCreatedInSync = null;
- if (!app.getId().equals(PortalConstants.PORTAL_APP_ID)) {
- getRoleCreatedInSync = dataAccessService.getList(EPRole.class,
- WHERE_ROLE_NAME_EQUALS + roleToBeAddedInEcompDB.getName() + "'", null, null);
- EPRole epUpdateRole = getRoleCreatedInSync.get(0);
- epUpdateRole.setAppRoleId(epUpdateRole.getId());
- dataAccessService.saveDomainObject(epUpdateRole, null);
- }
- List<EPRole> roleList = new ArrayList<>();
- final Map<String, String> params = new HashMap<>();
+ try {
+ roleToBeAddedInEcompDB = roleListToBeAddInEcompDB.get(i);
+ if (app.getId() == 1) {
+ roleToBeAddedInEcompDB.setAppRoleId(null);
+ }
+ dataAccessService.saveDomainObject(roleToBeAddedInEcompDB, null);
+ List<EPRole> getRoleCreatedInSync = null;
+ if (!app.getId().equals(PortalConstants.PORTAL_APP_ID)) {
+ getRoleCreatedInSync = dataAccessService.getList(EPRole.class,
+ WHERE_ROLE_NAME_EQUALS + roleToBeAddedInEcompDB.getName() + "' and app_id = "+app.getId(), null, null);
+ EPRole epUpdateRole = getRoleCreatedInSync.get(0);
+ epUpdateRole.setAppRoleId(epUpdateRole.getId());
+ dataAccessService.saveDomainObject(epUpdateRole, null);
+ }
+ List<EPRole> roleList = new ArrayList<>();
+ final Map<String, String> params = new HashMap<>();
- params.put("appRoleName", roleToBeAddedInEcompDB.getName());
- if (app.getId() == 1) {
- roleList = dataAccessService.executeNamedQuery("getPortalAppRoles", params, null);
- } else {
- params.put(APP_ID, app.getId().toString());
- roleList = dataAccessService.executeNamedQuery("getRoletoUpdateAAF", params, null);
+ params.put("appRoleName", roleToBeAddedInEcompDB.getName());
+ if (app.getId() == 1) {
+ roleList = dataAccessService.executeNamedQuery("getPortalAppRoles", params, null);
+ } else {
+ params.put(APP_ID, app.getId().toString());
+ roleList = dataAccessService.executeNamedQuery("getRoletoUpdateAAF", params, null);
+ }
+ EPRole role = roleList.get(0);
+ Role aaFrole = new Role();
+ aaFrole.setId(role.getId());
+ aaFrole.setActive(role.getActive());
+ aaFrole.setPriority(role.getPriority());
+ aaFrole.setName(role.getName());
+ updateRoleInExternalSystem(aaFrole, app);
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger,
+ "SyncApplicationRolesWithEcompDB: Failed to add or update role in external auth system", e);
}
- EPRole role = roleList.get(0);
- Role aaFrole = new Role();
- aaFrole.setId(role.getId());
- aaFrole.setActive(role.getActive());
- aaFrole.setPriority(role.getPriority());
- aaFrole.setName(role.getName());
- updateRoleInExternalSystem(aaFrole, app);
- }
- dataAccessService.deleteDomainObjects(EPAppRoleFunction.class, APP_ID_EQUALS + app.getId(), null);
- for (EPAppRoleFunction rolefun : applicationRoleFunctionList) {
- dataAccessService.saveDomainObject(rolefun, null);
}
logger.debug(EELFLoggerDelegate.debugLogger, "syncApplicationRolesWithEcompDB: Finished");
- } catch(HttpClientErrorException e){
+ } catch (HttpClientErrorException e) {
logger.error(EELFLoggerDelegate.errorLogger, "Failed to SyncApplicationRolesWithEcompDB", e);
EPLogUtil.logExternalAuthAccessAlarm(logger, e.getStatusCode());
} catch (Exception e) {
@@ -1966,4 +2235,67 @@ public class ExternalAccessRolesServiceImpl implements ExternalAccessRolesServic
}
return appMenuFunctionsList;
}
+
+ @SuppressWarnings({ "unchecked"})
+ @Override
+ public List<EcompUser> getAllAppUsers(String uebkey) throws Exception {
+ List<String> usersList = new ArrayList<>();
+ List<EcompUser> usersfinalList = new ArrayList<>();
+ try {
+ EPApp app = getApp(uebkey).get(0);
+ final Map<String, Long> appParams = new HashMap<>();
+ appParams.put("appId", app.getId());
+ List<EcompUserRoles> userList = (List<EcompUserRoles>) dataAccessService
+ .executeNamedQuery("ApplicationUserRoles", appParams, null);
+ for (EcompUserRoles ecompUserRole : userList) {
+ boolean found = false;
+ Set<EcompRole> roles = null;
+ for (EcompUser user : usersfinalList) {
+ if (user.getOrgUserId().equals(ecompUserRole.getOrgUserId())) {
+ EcompRole ecompRole = new EcompRole();
+ ecompRole.setId(ecompUserRole.getRoleId());
+ ecompRole.setName(ecompUserRole.getRoleName());
+ roles = user.getRoles();
+ roles.add(ecompRole);
+ user.setRoles(roles);
+ found = true;
+ break;
+ }
+ }
+
+ if (!found) {
+ EcompUser epUser = new EcompUser();
+ epUser.setOrgId(ecompUserRole.getOrgId());
+ epUser.setManagerId(ecompUserRole.getManagerId());
+ epUser.setFirstName(ecompUserRole.getFirstName());
+ epUser.setLastName(ecompUserRole.getLastName());
+ epUser.setPhone(ecompUserRole.getPhone());
+ epUser.setEmail(ecompUserRole.getEmail());
+ epUser.setOrgUserId(ecompUserRole.getOrgUserId());
+ epUser.setOrgCode(ecompUserRole.getOrgCode());
+ epUser.setOrgManagerUserId(ecompUserRole.getOrgManagerUserId());
+ epUser.setJobTitle(ecompUserRole.getJobTitle());
+ epUser.setLoginId(ecompUserRole.getLoginId());
+ epUser.setActive(true);
+ roles = new HashSet<>();
+ EcompRole ecompRole = new EcompRole();
+ ecompRole.setId(ecompUserRole.getRoleId());
+ ecompRole.setName(ecompUserRole.getRoleName());
+ roles.add(ecompRole);
+ epUser.setRoles(roles);
+ usersfinalList.add(epUser);
+ }
+ }
+ ObjectMapper mapper = new ObjectMapper();
+
+ for (EcompUser u1 : usersfinalList) {
+ String str = mapper.writeValueAsString(u1);
+ usersList.add(str);
+ }
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "getAllUsers failed", e);
+ throw e;
+ }
+ return usersfinalList;
+ }
}
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/FunctionalMenuServiceImpl.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/FunctionalMenuServiceImpl.java
index 6a71bc71..87143e85 100644
--- a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/FunctionalMenuServiceImpl.java
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/FunctionalMenuServiceImpl.java
@@ -284,7 +284,7 @@ public class FunctionalMenuServiceImpl implements FunctionalMenuService {
logQuery(sql);
@SuppressWarnings("unchecked")
List<FunctionalMenuRole> roleItems = dataAccessService.executeSQLQuery(sql, FunctionalMenuRole.class, null);
- if (roleItems.size() > 0) {
+ if (roleItems.size() > 0 && menuItem != null) {
Integer appid = roleItems.get(0).appId;
menuItem.appid = appid;
List<Integer> roles = new ArrayList<Integer>();
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/PortalAdminServiceImpl.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/PortalAdminServiceImpl.java
index 5979fe82..10490e73 100644
--- a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/PortalAdminServiceImpl.java
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/PortalAdminServiceImpl.java
@@ -144,7 +144,10 @@ public class PortalAdminServiceImpl implements PortalAdminService {
transaction.commit();
// Add role in the external central auth system
- result = addPortalAdminInExternalCentralAuth(user.getOrgUserId(), PortalConstants.PORTAL_ADMIN_ROLE);
+ if(user != null)
+ result = addPortalAdminInExternalCentralAuth(user.getOrgUserId(), PortalConstants.PORTAL_ADMIN_ROLE);
+ else
+ logger.error(EELFLoggerDelegate.errorLogger, "PortalAdminServiceImpl createPortalAdmin: failed to Add role in the external central auth system since User obj is null" );
} catch (Exception e) {
EcompPortalUtils.rollbackTransaction(transaction, "createPortalAdmin rollback, exception = " + e);
logger.error(EELFLoggerDelegate.errorLogger, EcompPortalUtils.getStackTrace(e));
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/TicketEventService.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/TicketEventService.java
new file mode 100644
index 00000000..1c9a735a
--- /dev/null
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/TicketEventService.java
@@ -0,0 +1,9 @@
+package org.openecomp.portalapp.portal.service;
+
+import com.fasterxml.jackson.databind.JsonNode;
+
+public interface TicketEventService {
+
+ public String getNotificationHyperLink(JsonNode application, String ticket, String eventSource);
+
+}
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/UserRolesCommonServiceImpl.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/UserRolesCommonServiceImpl.java
index d7aac633..0751c72e 100644
--- a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/UserRolesCommonServiceImpl.java
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/service/UserRolesCommonServiceImpl.java
@@ -58,6 +58,7 @@ import org.openecomp.portalapp.portal.logging.aop.EPMetricsLog;
import org.openecomp.portalapp.portal.logging.format.EPAppMessagesEnum;
import org.openecomp.portalapp.portal.logging.logic.EPLogUtil;
import org.openecomp.portalapp.portal.transport.AppWithRolesForUser;
+import org.openecomp.portalapp.portal.transport.CentralRole;
import org.openecomp.portalapp.portal.transport.EPUserAppCurrentRoles;
import org.openecomp.portalapp.portal.transport.EcompUserAppRoles;
import org.openecomp.portalapp.portal.transport.ExternalAccessUser;
@@ -537,6 +538,7 @@ public class UserRolesCommonServiceImpl {
externalAccessRolesService.deleteRoleDependencyRecords(localSession, roleId, appId);
logger.debug(EELFLoggerDelegate.debugLogger, "syncAppRoles: about to delete the role: " + role.toString());
localSession.delete(role);
+ localSession.flush();
logger.debug(EELFLoggerDelegate.debugLogger, "syncAppRoles: deleted the role");
}
}
@@ -1292,7 +1294,7 @@ public class UserRolesCommonServiceImpl {
}
// Check if list contains just account admin role
boolean checkIfAdminRoleExists = false;
- if (reqType.equals("DELETE")) {
+ if (reqType.equals("DELETE") && userRoleList!=null) {
checkIfAdminRoleExists = userRoleList.stream()
.anyMatch(userRole -> userRole.getRoleId().equals(PortalConstants.ACCOUNT_ADMIN_ROLE_ID));
} else {
@@ -1307,10 +1309,10 @@ public class UserRolesCommonServiceImpl {
if (!app.getId().equals(PortalConstants.PORTAL_APP_ID) && !(checkIfAdminRoleExists
&& reqType.equals("DELETE")) && roleInAppForUserList.size() > 1) {
EPUser remoteAppUser = null;
- remoteAppUser = checkIfRemoteUserExits(userId.getOrgUserId(), app,
+ remoteAppUser = checkIfRemoteUserExits(orgUserId, app,
applicationsRestClientService);
if (remoteAppUser == null) {
- addRemoteUser(roleInAppForUserList, userId.getOrgUserId(), app, mapper, searchService,
+ addRemoteUser(roleInAppForUserList, orgUserId, app, mapper, searchService,
applicationsRestClientService);
reqMessage = "Saved Successfully";
}
@@ -1342,9 +1344,9 @@ public class UserRolesCommonServiceImpl {
// If adding just account admin role don't do remote application user call
if(!((roleInAppForUserList.size() == 1 || reqType.equals("DELETE")) && checkIfAdminRoleExists)){
EPUser remoteAppUser = null;
- remoteAppUser = checkIfRemoteUserExits(userId.getOrgUserId(), app, applicationsRestClientService);
+ remoteAppUser = checkIfRemoteUserExits(orgUserId, app, applicationsRestClientService);
if (remoteAppUser == null) {
- remoteAppUser = addRemoteUser(roleInAppForUserList, userId.getOrgUserId(), app, mapper, searchService, applicationsRestClientService);
+ remoteAppUser = addRemoteUser(roleInAppForUserList, orgUserId, app, mapper, searchService, applicationsRestClientService);
reqMessage = "Saved Successfully";
}
if (remoteAppUser != null) {
@@ -1396,7 +1398,7 @@ public class UserRolesCommonServiceImpl {
logger.error(EELFLoggerDelegate.errorLogger, message, e);
result = false;
reqMessage = e.getMessage();
- if(epRequestIdSize > 0 && !userInfo.isEmpty()){
+ if(epRequestIdSize > 0 && userInfo!=null && !userInfo.isEmpty()){
updateStatus = "F";
applyChangesToAppRolesRequest(app.getId(), userId.getId(),
updateStatus, epRequestId.get(0));
@@ -1525,9 +1527,21 @@ public class UserRolesCommonServiceImpl {
EPApp app = appsService.getApp(appId);
try {
// for ecomp portal app, no need to make a remote call
+ List<Role> roleList = new ArrayList<>();
if (appId == PortalConstants.PORTAL_APP_ID) {
-
- List<Role> roleList = roleService.getAvailableRoles(userId);
+ if(app.getCentralAuth()){
+ List<CentralRole> cenRoleList = externalAccessRolesService.getRolesForApp(app.getUebKey());
+ for(CentralRole cenRole : cenRoleList){
+ Role role = new Role();
+ role.setActive(cenRole.isActive());
+ role.setId(cenRole.getId());
+ role.setName(cenRole.getName());
+ role.setPriority(cenRole.getPriority());
+ roleList.add(role);
+ }
+ }else{
+ roleList = roleService.getAvailableRoles(userId);
+ }
List<Role> activeRoleList = new ArrayList<Role>();
for(Role role: roleList) {
if(role.getActive()) {
@@ -1554,8 +1568,8 @@ public class UserRolesCommonServiceImpl {
EcompRole[] appRoles = null;
List<EcompRole> roles = new ArrayList<>();
if(app.getCentralAuth()){
- //Sync application roles from External Access System
- externalAccessRolesService.syncApplicationRolesWithEcompDB(app);
+ //Sync application functions from External Access System
+ externalAccessRolesService.syncRoleFunctionFromExternalAccessSystem(app);
List<EPRole> applicationRoles = dataAccessService.getList(EPRole.class, " where app_id = "+app.getId()+ " and active_yn = 'Y'", null, null);;
for(EPRole role : applicationRoles){
EcompRole ecompRole = new EcompRole();
@@ -1625,12 +1639,14 @@ public class UserRolesCommonServiceImpl {
HashMap<Long, EcompRole> appRolesActiveMap =hashMapFromEcompRoles(appRoles);
ArrayList<EcompRole> activeRoles = new ArrayList<EcompRole>();
- for (int i = 0; i < userAppRoles.length; i++) {
- if (appRolesActiveMap.containsKey(userAppRoles[i].getId())) {
- EcompRole role = new EcompRole();
- role.setId(userAppRoles[i].getId());
- role.setName(userAppRoles[i].getName());
- activeRoles.add(role);
+ if(userAppRoles != null){
+ for (int i = 0; i < userAppRoles.length; i++) {
+ if (appRolesActiveMap.containsKey(userAppRoles[i].getId())) {
+ EcompRole role = new EcompRole();
+ role.setId(userAppRoles[i].getId());
+ role.setName(userAppRoles[i].getName());
+ activeRoles.add(role);
+ }
}
}
EcompRole[] userAppRolesActive = activeRoles.toArray(new EcompRole[activeRoles.size()]);
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/Analytics.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/Analytics.java
index 059999a4..b6e6c24f 100644
--- a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/Analytics.java
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/Analytics.java
@@ -27,7 +27,7 @@ public class Analytics {
private String action;
private String page;
private String function;
- private String userId;
+ private String userid;
private String type;
public String getType() {
@@ -54,11 +54,11 @@ public class Analytics {
public void setFunction(String function) {
this.function = function;
}
- public String getUserId() {
- return userId;
+ public String getUserid() {
+ return userid;
}
- public void setUserId(String userId) {
- this.userId = userId;
+ public void setUserid(String userId) {
+ this.userid = userId;
}
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/CentralApp.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/CentralApp.java
index 97907422..5a03bf56 100644
--- a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/CentralApp.java
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/CentralApp.java
@@ -1,5 +1,6 @@
package org.openecomp.portalapp.portal.transport;
+import java.util.Arrays;
import java.util.Date;
public class CentralApp {
@@ -205,6 +206,166 @@ public class CentralApp {
public void setUebTopicName(String uebTopicName) {
this.uebTopicName = uebTopicName;
}
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((alternateUrl == null) ? 0 : alternateUrl.hashCode());
+ result = prime * result + ((appPassword == null) ? 0 : appPassword.hashCode());
+ result = prime * result + ((created == null) ? 0 : created.hashCode());
+ result = prime * result + ((createdId == null) ? 0 : createdId.hashCode());
+ result = prime * result + ((description == null) ? 0 : description.hashCode());
+ result = prime * result + ((enabled == null) ? 0 : enabled.hashCode());
+ result = prime * result + ((id == null) ? 0 : id.hashCode());
+ result = prime * result + ((imageUrl == null) ? 0 : imageUrl.hashCode());
+ result = prime * result + ((mlAppAdminId == null) ? 0 : mlAppAdminId.hashCode());
+ result = prime * result + ((mlAppName == null) ? 0 : mlAppName.hashCode());
+ result = prime * result + ((modified == null) ? 0 : modified.hashCode());
+ result = prime * result + ((modifiedId == null) ? 0 : modifiedId.hashCode());
+ result = prime * result + ((motsId == null) ? 0 : motsId.hashCode());
+ result = prime * result + ((name == null) ? 0 : name.hashCode());
+ result = prime * result + ((notes == null) ? 0 : notes.hashCode());
+ result = prime * result + ((open == null) ? 0 : open.hashCode());
+ result = prime * result + ((restEndpoint == null) ? 0 : restEndpoint.hashCode());
+ result = prime * result + ((rowNum == null) ? 0 : rowNum.hashCode());
+ result = prime * result + Arrays.hashCode(thumbnail);
+ result = prime * result + ((uebKey == null) ? 0 : uebKey.hashCode());
+ result = prime * result + ((uebSecret == null) ? 0 : uebSecret.hashCode());
+ result = prime * result + ((uebTopicName == null) ? 0 : uebTopicName.hashCode());
+ result = prime * result + ((url == null) ? 0 : url.hashCode());
+ result = prime * result + ((username == null) ? 0 : username.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ CentralApp other = (CentralApp) obj;
+ if (alternateUrl == null) {
+ if (other.alternateUrl != null)
+ return false;
+ } else if (!alternateUrl.equals(other.alternateUrl))
+ return false;
+ if (appPassword == null) {
+ if (other.appPassword != null)
+ return false;
+ } else if (!appPassword.equals(other.appPassword))
+ return false;
+ if (created == null) {
+ if (other.created != null)
+ return false;
+ } else if (!created.equals(other.created))
+ return false;
+ if (createdId == null) {
+ if (other.createdId != null)
+ return false;
+ } else if (!createdId.equals(other.createdId))
+ return false;
+ if (description == null) {
+ if (other.description != null)
+ return false;
+ } else if (!description.equals(other.description))
+ return false;
+ if (enabled == null) {
+ if (other.enabled != null)
+ return false;
+ } else if (!enabled.equals(other.enabled))
+ return false;
+ if (id == null) {
+ if (other.id != null)
+ return false;
+ } else if (!id.equals(other.id))
+ return false;
+ if (imageUrl == null) {
+ if (other.imageUrl != null)
+ return false;
+ } else if (!imageUrl.equals(other.imageUrl))
+ return false;
+ if (mlAppAdminId == null) {
+ if (other.mlAppAdminId != null)
+ return false;
+ } else if (!mlAppAdminId.equals(other.mlAppAdminId))
+ return false;
+ if (mlAppName == null) {
+ if (other.mlAppName != null)
+ return false;
+ } else if (!mlAppName.equals(other.mlAppName))
+ return false;
+ if (modified == null) {
+ if (other.modified != null)
+ return false;
+ } else if (!modified.equals(other.modified))
+ return false;
+ if (modifiedId == null) {
+ if (other.modifiedId != null)
+ return false;
+ } else if (!modifiedId.equals(other.modifiedId))
+ return false;
+ if (motsId == null) {
+ if (other.motsId != null)
+ return false;
+ } else if (!motsId.equals(other.motsId))
+ return false;
+ if (name == null) {
+ if (other.name != null)
+ return false;
+ } else if (!name.equals(other.name))
+ return false;
+ if (notes == null) {
+ if (other.notes != null)
+ return false;
+ } else if (!notes.equals(other.notes))
+ return false;
+ if (open == null) {
+ if (other.open != null)
+ return false;
+ } else if (!open.equals(other.open))
+ return false;
+ if (restEndpoint == null) {
+ if (other.restEndpoint != null)
+ return false;
+ } else if (!restEndpoint.equals(other.restEndpoint))
+ return false;
+ if (rowNum == null) {
+ if (other.rowNum != null)
+ return false;
+ } else if (!rowNum.equals(other.rowNum))
+ return false;
+ if (!Arrays.equals(thumbnail, other.thumbnail))
+ return false;
+ if (uebKey == null) {
+ if (other.uebKey != null)
+ return false;
+ } else if (!uebKey.equals(other.uebKey))
+ return false;
+ if (uebSecret == null) {
+ if (other.uebSecret != null)
+ return false;
+ } else if (!uebSecret.equals(other.uebSecret))
+ return false;
+ if (uebTopicName == null) {
+ if (other.uebTopicName != null)
+ return false;
+ } else if (!uebTopicName.equals(other.uebTopicName))
+ return false;
+ if (url == null) {
+ if (other.url != null)
+ return false;
+ } else if (!url.equals(other.url))
+ return false;
+ if (username == null) {
+ if (other.username != null)
+ return false;
+ } else if (!username.equals(other.username))
+ return false;
+ return true;
+ }
}
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/CentralRole.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/CentralRole.java
index a3c3c9d5..de576ad7 100644
--- a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/CentralRole.java
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/CentralRole.java
@@ -156,4 +156,92 @@ public class CentralRole implements Comparable{
return (c1 == null || c2 == null) ? 1 : c1.compareTo(c2);
}
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + (active ? 1231 : 1237);
+ result = prime * result + ((childRoles == null) ? 0 : childRoles.hashCode());
+ result = prime * result + ((created == null) ? 0 : created.hashCode());
+ result = prime * result + ((createdId == null) ? 0 : createdId.hashCode());
+ result = prime * result + ((id == null) ? 0 : id.hashCode());
+ result = prime * result + ((modified == null) ? 0 : modified.hashCode());
+ result = prime * result + ((modifiedId == null) ? 0 : modifiedId.hashCode());
+ result = prime * result + ((name == null) ? 0 : name.hashCode());
+ result = prime * result + ((parentRoles == null) ? 0 : parentRoles.hashCode());
+ result = prime * result + ((priority == null) ? 0 : priority.hashCode());
+ result = prime * result + ((roleFunctions == null) ? 0 : roleFunctions.hashCode());
+ result = prime * result + ((rowNum == null) ? 0 : rowNum.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ CentralRole other = (CentralRole) obj;
+ if (active != other.active)
+ return false;
+ if (childRoles == null) {
+ if (other.childRoles != null)
+ return false;
+ } else if (!childRoles.equals(other.childRoles))
+ return false;
+ if (created == null) {
+ if (other.created != null)
+ return false;
+ } else if (!created.equals(other.created))
+ return false;
+ if (createdId == null) {
+ if (other.createdId != null)
+ return false;
+ } else if (!createdId.equals(other.createdId))
+ return false;
+ if (id == null) {
+ if (other.id != null)
+ return false;
+ } else if (!id.equals(other.id))
+ return false;
+ if (modified == null) {
+ if (other.modified != null)
+ return false;
+ } else if (!modified.equals(other.modified))
+ return false;
+ if (modifiedId == null) {
+ if (other.modifiedId != null)
+ return false;
+ } else if (!modifiedId.equals(other.modifiedId))
+ return false;
+ if (name == null) {
+ if (other.name != null)
+ return false;
+ } else if (!name.equals(other.name))
+ return false;
+ if (parentRoles == null) {
+ if (other.parentRoles != null)
+ return false;
+ } else if (!parentRoles.equals(other.parentRoles))
+ return false;
+ if (priority == null) {
+ if (other.priority != null)
+ return false;
+ } else if (!priority.equals(other.priority))
+ return false;
+ if (roleFunctions == null) {
+ if (other.roleFunctions != null)
+ return false;
+ } else if (!roleFunctions.equals(other.roleFunctions))
+ return false;
+ if (rowNum == null) {
+ if (other.rowNum != null)
+ return false;
+ } else if (!rowNum.equals(other.rowNum))
+ return false;
+ return true;
+ }
+
}
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/CentralUser.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/CentralUser.java
index f8174825..b44e25d3 100644
--- a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/CentralUser.java
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/CentralUser.java
@@ -132,6 +132,334 @@ public class CentralUser {
this.userApps = userApps;
this.pseudoRoles = pseudoRoles;
}
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + (active ? 1231 : 1237);
+ result = prime * result + ((address1 == null) ? 0 : address1.hashCode());
+ result = prime * result + ((address2 == null) ? 0 : address2.hashCode());
+ result = prime * result + ((addressId == null) ? 0 : addressId.hashCode());
+ result = prime * result + ((alertMethodCd == null) ? 0 : alertMethodCd.hashCode());
+ result = prime * result + ((businessCountryCode == null) ? 0 : businessCountryCode.hashCode());
+ result = prime * result + ((businessCountryName == null) ? 0 : businessCountryName.hashCode());
+ result = prime * result + ((businessUnit == null) ? 0 : businessUnit.hashCode());
+ result = prime * result + ((businessUnitName == null) ? 0 : businessUnitName.hashCode());
+ result = prime * result + ((cellular == null) ? 0 : cellular.hashCode());
+ result = prime * result + ((chatId == null) ? 0 : chatId.hashCode());
+ result = prime * result + ((city == null) ? 0 : city.hashCode());
+ result = prime * result + ((commandChain == null) ? 0 : commandChain.hashCode());
+ result = prime * result + ((company == null) ? 0 : company.hashCode());
+ result = prime * result + ((companyCode == null) ? 0 : companyCode.hashCode());
+ result = prime * result + ((costCenter == null) ? 0 : costCenter.hashCode());
+ result = prime * result + ((country == null) ? 0 : country.hashCode());
+ result = prime * result + ((created == null) ? 0 : created.hashCode());
+ result = prime * result + ((createdId == null) ? 0 : createdId.hashCode());
+ result = prime * result + ((department == null) ? 0 : department.hashCode());
+ result = prime * result + ((departmentName == null) ? 0 : departmentName.hashCode());
+ result = prime * result + ((email == null) ? 0 : email.hashCode());
+ result = prime * result + ((fax == null) ? 0 : fax.hashCode());
+ result = prime * result + ((financialLocCode == null) ? 0 : financialLocCode.hashCode());
+ result = prime * result + ((firstName == null) ? 0 : firstName.hashCode());
+ result = prime * result + ((hrid == null) ? 0 : hrid.hashCode());
+ result = prime * result + ((id == null) ? 0 : id.hashCode());
+ result = prime * result + (internal ? 1231 : 1237);
+ result = prime * result + ((jobTitle == null) ? 0 : jobTitle.hashCode());
+ result = prime * result + ((lastLoginDate == null) ? 0 : lastLoginDate.hashCode());
+ result = prime * result + ((lastName == null) ? 0 : lastName.hashCode());
+ result = prime * result + ((locationClli == null) ? 0 : locationClli.hashCode());
+ result = prime * result + ((loginId == null) ? 0 : loginId.hashCode());
+ result = prime * result + ((loginPwd == null) ? 0 : loginPwd.hashCode());
+ result = prime * result + ((managerId == null) ? 0 : managerId.hashCode());
+ result = prime * result + ((middleInitial == null) ? 0 : middleInitial.hashCode());
+ result = prime * result + ((modified == null) ? 0 : modified.hashCode());
+ result = prime * result + ((modifiedId == null) ? 0 : modifiedId.hashCode());
+ result = prime * result + (online ? 1231 : 1237);
+ result = prime * result + ((orgCode == null) ? 0 : orgCode.hashCode());
+ result = prime * result + ((orgId == null) ? 0 : orgId.hashCode());
+ result = prime * result + ((orgManagerUserId == null) ? 0 : orgManagerUserId.hashCode());
+ result = prime * result + ((orgUserId == null) ? 0 : orgUserId.hashCode());
+ result = prime * result + ((phone == null) ? 0 : phone.hashCode());
+ result = prime * result + ((pseudoRoles == null) ? 0 : pseudoRoles.hashCode());
+ result = prime * result + ((rowNum == null) ? 0 : rowNum.hashCode());
+ result = prime * result + ((selectedProfileId == null) ? 0 : selectedProfileId.hashCode());
+ result = prime * result + ((siloStatus == null) ? 0 : siloStatus.hashCode());
+ result = prime * result + ((state == null) ? 0 : state.hashCode());
+ result = prime * result + ((timeZoneId == null) ? 0 : timeZoneId.hashCode());
+ result = prime * result + ((userApps == null) ? 0 : userApps.hashCode());
+ result = prime * result + ((zipCode == null) ? 0 : zipCode.hashCode());
+ result = prime * result + ((zipCodeSuffix == null) ? 0 : zipCodeSuffix.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ CentralUser other = (CentralUser) obj;
+ if (active != other.active)
+ return false;
+ if (address1 == null) {
+ if (other.address1 != null)
+ return false;
+ } else if (!address1.equals(other.address1))
+ return false;
+ if (address2 == null) {
+ if (other.address2 != null)
+ return false;
+ } else if (!address2.equals(other.address2))
+ return false;
+ if (addressId == null) {
+ if (other.addressId != null)
+ return false;
+ } else if (!addressId.equals(other.addressId))
+ return false;
+ if (alertMethodCd == null) {
+ if (other.alertMethodCd != null)
+ return false;
+ } else if (!alertMethodCd.equals(other.alertMethodCd))
+ return false;
+ if (businessCountryCode == null) {
+ if (other.businessCountryCode != null)
+ return false;
+ } else if (!businessCountryCode.equals(other.businessCountryCode))
+ return false;
+ if (businessCountryName == null) {
+ if (other.businessCountryName != null)
+ return false;
+ } else if (!businessCountryName.equals(other.businessCountryName))
+ return false;
+ if (businessUnit == null) {
+ if (other.businessUnit != null)
+ return false;
+ } else if (!businessUnit.equals(other.businessUnit))
+ return false;
+ if (businessUnitName == null) {
+ if (other.businessUnitName != null)
+ return false;
+ } else if (!businessUnitName.equals(other.businessUnitName))
+ return false;
+ if (cellular == null) {
+ if (other.cellular != null)
+ return false;
+ } else if (!cellular.equals(other.cellular))
+ return false;
+ if (chatId == null) {
+ if (other.chatId != null)
+ return false;
+ } else if (!chatId.equals(other.chatId))
+ return false;
+ if (city == null) {
+ if (other.city != null)
+ return false;
+ } else if (!city.equals(other.city))
+ return false;
+ if (commandChain == null) {
+ if (other.commandChain != null)
+ return false;
+ } else if (!commandChain.equals(other.commandChain))
+ return false;
+ if (company == null) {
+ if (other.company != null)
+ return false;
+ } else if (!company.equals(other.company))
+ return false;
+ if (companyCode == null) {
+ if (other.companyCode != null)
+ return false;
+ } else if (!companyCode.equals(other.companyCode))
+ return false;
+ if (costCenter == null) {
+ if (other.costCenter != null)
+ return false;
+ } else if (!costCenter.equals(other.costCenter))
+ return false;
+ if (country == null) {
+ if (other.country != null)
+ return false;
+ } else if (!country.equals(other.country))
+ return false;
+ if (created == null) {
+ if (other.created != null)
+ return false;
+ } else if (!created.equals(other.created))
+ return false;
+ if (createdId == null) {
+ if (other.createdId != null)
+ return false;
+ } else if (!createdId.equals(other.createdId))
+ return false;
+ if (department == null) {
+ if (other.department != null)
+ return false;
+ } else if (!department.equals(other.department))
+ return false;
+ if (departmentName == null) {
+ if (other.departmentName != null)
+ return false;
+ } else if (!departmentName.equals(other.departmentName))
+ return false;
+ if (email == null) {
+ if (other.email != null)
+ return false;
+ } else if (!email.equals(other.email))
+ return false;
+ if (fax == null) {
+ if (other.fax != null)
+ return false;
+ } else if (!fax.equals(other.fax))
+ return false;
+ if (financialLocCode == null) {
+ if (other.financialLocCode != null)
+ return false;
+ } else if (!financialLocCode.equals(other.financialLocCode))
+ return false;
+ if (firstName == null) {
+ if (other.firstName != null)
+ return false;
+ } else if (!firstName.equals(other.firstName))
+ return false;
+ if (hrid == null) {
+ if (other.hrid != null)
+ return false;
+ } else if (!hrid.equals(other.hrid))
+ return false;
+ if (id == null) {
+ if (other.id != null)
+ return false;
+ } else if (!id.equals(other.id))
+ return false;
+ if (internal != other.internal)
+ return false;
+ if (jobTitle == null) {
+ if (other.jobTitle != null)
+ return false;
+ } else if (!jobTitle.equals(other.jobTitle))
+ return false;
+ if (lastLoginDate == null) {
+ if (other.lastLoginDate != null)
+ return false;
+ } else if (!lastLoginDate.equals(other.lastLoginDate))
+ return false;
+ if (lastName == null) {
+ if (other.lastName != null)
+ return false;
+ } else if (!lastName.equals(other.lastName))
+ return false;
+ if (locationClli == null) {
+ if (other.locationClli != null)
+ return false;
+ } else if (!locationClli.equals(other.locationClli))
+ return false;
+ if (loginId == null) {
+ if (other.loginId != null)
+ return false;
+ } else if (!loginId.equals(other.loginId))
+ return false;
+ if (loginPwd == null) {
+ if (other.loginPwd != null)
+ return false;
+ } else if (!loginPwd.equals(other.loginPwd))
+ return false;
+ if (managerId == null) {
+ if (other.managerId != null)
+ return false;
+ } else if (!managerId.equals(other.managerId))
+ return false;
+ if (middleInitial == null) {
+ if (other.middleInitial != null)
+ return false;
+ } else if (!middleInitial.equals(other.middleInitial))
+ return false;
+ if (modified == null) {
+ if (other.modified != null)
+ return false;
+ } else if (!modified.equals(other.modified))
+ return false;
+ if (modifiedId == null) {
+ if (other.modifiedId != null)
+ return false;
+ } else if (!modifiedId.equals(other.modifiedId))
+ return false;
+ if (online != other.online)
+ return false;
+ if (orgCode == null) {
+ if (other.orgCode != null)
+ return false;
+ } else if (!orgCode.equals(other.orgCode))
+ return false;
+ if (orgId == null) {
+ if (other.orgId != null)
+ return false;
+ } else if (!orgId.equals(other.orgId))
+ return false;
+ if (orgManagerUserId == null) {
+ if (other.orgManagerUserId != null)
+ return false;
+ } else if (!orgManagerUserId.equals(other.orgManagerUserId))
+ return false;
+ if (orgUserId == null) {
+ if (other.orgUserId != null)
+ return false;
+ } else if (!orgUserId.equals(other.orgUserId))
+ return false;
+ if (phone == null) {
+ if (other.phone != null)
+ return false;
+ } else if (!phone.equals(other.phone))
+ return false;
+ if (pseudoRoles == null) {
+ if (other.pseudoRoles != null)
+ return false;
+ } else if (!pseudoRoles.equals(other.pseudoRoles))
+ return false;
+ if (rowNum == null) {
+ if (other.rowNum != null)
+ return false;
+ } else if (!rowNum.equals(other.rowNum))
+ return false;
+ if (selectedProfileId == null) {
+ if (other.selectedProfileId != null)
+ return false;
+ } else if (!selectedProfileId.equals(other.selectedProfileId))
+ return false;
+ if (siloStatus == null) {
+ if (other.siloStatus != null)
+ return false;
+ } else if (!siloStatus.equals(other.siloStatus))
+ return false;
+ if (state == null) {
+ if (other.state != null)
+ return false;
+ } else if (!state.equals(other.state))
+ return false;
+ if (timeZoneId == null) {
+ if (other.timeZoneId != null)
+ return false;
+ } else if (!timeZoneId.equals(other.timeZoneId))
+ return false;
+ if (userApps == null) {
+ if (other.userApps != null)
+ return false;
+ } else if (!userApps.equals(other.userApps))
+ return false;
+ if (zipCode == null) {
+ if (other.zipCode != null)
+ return false;
+ } else if (!zipCode.equals(other.zipCode))
+ return false;
+ if (zipCodeSuffix == null) {
+ if (other.zipCodeSuffix != null)
+ return false;
+ } else if (!zipCodeSuffix.equals(other.zipCodeSuffix))
+ return false;
+ return true;
+ }
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/CommonWidget.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/CommonWidget.java
index ceb5d46d..5be1fb70 100644
--- a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/CommonWidget.java
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/CommonWidget.java
@@ -31,7 +31,6 @@ import com.fasterxml.jackson.annotation.JsonInclude;
/**
* This is to handle portal admins
- * @author aw3218
*/
@Entity
@Table(name="fn_common_widget_data")
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/EcompUserRoles.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/EcompUserRoles.java
new file mode 100644
index 00000000..50c14ca8
--- /dev/null
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/EcompUserRoles.java
@@ -0,0 +1,172 @@
+package org.openecomp.portalapp.portal.transport;
+
+import java.io.Serializable;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+
+@Entity
+public class EcompUserRoles implements Serializable{
+
+ private static final long serialVersionUID = 1L;
+
+ @Id
+ @Column(name = "org_id")
+ private Long orgId;
+ @Id
+ @Column(name = "manager_id")
+ private String managerId;
+ @Id
+ @Column(name = "first_name")
+ private String firstName;
+ @Id
+ @Column(name = "middle_name")
+ private String middleInitial;
+ @Id
+ @Column(name = "last_name")
+ private String lastName;
+ @Id
+ @Column(name = "phone")
+ private String phone;
+ @Id
+ @Column(name = "email")
+ private String email;
+ @Id
+ @Column(name = "hrid")
+ private String hrid;
+ @Id
+ @Column(name = "org_user_id")
+ private String orgUserId;
+ @Id
+ @Column(name = "org_code")
+ private String orgCode;
+ @Id
+ @Column(name = "org_manager_userid")
+ private String orgManagerUserId;
+ @Id
+ @Column(name = "job_title")
+ private String jobTitle;
+ @Id
+ @Column(name = "login_id")
+ private String loginId;
+
+ @Id
+ @Column(name = "app_role_id")
+ private Long roleId;
+ @Id
+ @Column(name = "role_name")
+ private String roleName;
+ @Id
+ @Column(name = "active_yn")
+ private boolean active;
+
+ public Long getOrgId() {
+ return orgId;
+ }
+ public void setOrgId(Long orgId) {
+ this.orgId = orgId;
+ }
+ public String getManagerId() {
+ return managerId;
+ }
+ public void setManagerId(String managerId) {
+ this.managerId = managerId;
+ }
+ public String getFirstName() {
+ return firstName;
+ }
+ public void setFirstName(String firstName) {
+ this.firstName = firstName;
+ }
+ public String getMiddleInitial() {
+ return middleInitial;
+ }
+ public void setMiddleInitial(String middleInitial) {
+ this.middleInitial = middleInitial;
+ }
+ public String getLastName() {
+ return lastName;
+ }
+ public void setLastName(String lastName) {
+ this.lastName = lastName;
+ }
+ public String getPhone() {
+ return phone;
+ }
+ public void setPhone(String phone) {
+ this.phone = phone;
+ }
+ public String getEmail() {
+ return email;
+ }
+ public void setEmail(String email) {
+ this.email = email;
+ }
+ public String getHrid() {
+ return hrid;
+ }
+ public void setHrid(String hrid) {
+ this.hrid = hrid;
+ }
+ public String getOrgUserId() {
+ return orgUserId;
+ }
+ public void setOrgUserId(String orgUserId) {
+ this.orgUserId = orgUserId;
+ }
+ public String getOrgCode() {
+ return orgCode;
+ }
+ public void setOrgCode(String orgCode) {
+ this.orgCode = orgCode;
+ }
+ public String getOrgManagerUserId() {
+ return orgManagerUserId;
+ }
+ public void setOrgManagerUserId(String orgManagerUserId) {
+ this.orgManagerUserId = orgManagerUserId;
+ }
+ public String getJobTitle() {
+ return jobTitle;
+ }
+ public void setJobTitle(String jobTitle) {
+ this.jobTitle = jobTitle;
+ }
+ public String getLoginId() {
+ return loginId;
+ }
+ public void setLoginId(String loginId) {
+ this.loginId = loginId;
+ }
+
+ public Long getRoleId() {
+ return roleId;
+ }
+ public void setRoleId(Long roleId) {
+ this.roleId = roleId;
+ }
+ public String getRoleName() {
+ return roleName;
+ }
+ public void setRoleName(String roleName) {
+ this.roleName = roleName;
+ }
+
+ public boolean isActive() {
+ return active;
+ }
+ public void setActive(boolean active) {
+ this.active = active;
+ }
+ @Override
+ public String toString() {
+ return "EcompUserRoles [orgId=" + orgId + ", managerId=" + managerId + ", firstName=" + firstName
+ + ", middleInitial=" + middleInitial + ", lastName=" + lastName + ", phone=" + phone + ", email="
+ + email + ", hrid=" + hrid + ", orgUserId=" + orgUserId + ", orgCode=" + orgCode + ", orgManagerUserId="
+ + orgManagerUserId + ", jobTitle=" + jobTitle + ", loginId=" + loginId + ", active=" + active
+ + ", roleId=" + roleId + ", roleName=" + roleName + "]";
+ }
+
+
+}
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/ExternalAccessPerms.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/ExternalAccessPerms.java
index 60f9f63a..27d0dd0b 100644
--- a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/ExternalAccessPerms.java
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/ExternalAccessPerms.java
@@ -91,6 +91,53 @@ public class ExternalAccessPerms implements Serializable, Comparable{
return (c1 == null || c2 == null) ? 1 : c1.compareTo(c2);
}
+
+
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((action == null) ? 0 : action.hashCode());
+ result = prime * result + ((description == null) ? 0 : description.hashCode());
+ result = prime * result + ((instance == null) ? 0 : instance.hashCode());
+ result = prime * result + ((type == null) ? 0 : type.hashCode());
+ return result;
+ }
+
+
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ ExternalAccessPerms other = (ExternalAccessPerms) obj;
+ if (action == null) {
+ if (other.action != null)
+ return false;
+ } else if (!action.equals(other.action))
+ return false;
+ if (description == null) {
+ if (other.description != null)
+ return false;
+ } else if (!description.equals(other.description))
+ return false;
+ if (instance == null) {
+ if (other.instance != null)
+ return false;
+ } else if (!instance.equals(other.instance))
+ return false;
+ if (type == null) {
+ if (other.type != null)
+ return false;
+ } else if (!type.equals(other.type))
+ return false;
+ return true;
+ }
}
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/ExternalAccessUserRoleDetail.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/ExternalAccessUserRoleDetail.java
index e5d89e22..1a8aeb64 100644
--- a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/ExternalAccessUserRoleDetail.java
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/ExternalAccessUserRoleDetail.java
@@ -31,6 +31,37 @@ public class ExternalAccessUserRoleDetail {
public void setDescription(ExternalRoleDescription description) {
this.description = description;
}
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((description == null) ? 0 : description.hashCode());
+ result = prime * result + ((name == null) ? 0 : name.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ ExternalAccessUserRoleDetail other = (ExternalAccessUserRoleDetail) obj;
+ if (description == null) {
+ if (other.description != null)
+ return false;
+ } else if (!description.equals(other.description))
+ return false;
+ if (name == null) {
+ if (other.name != null)
+ return false;
+ } else if (!name.equals(other.name))
+ return false;
+ return true;
+ }
}
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/ExternalRoleDescription.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/ExternalRoleDescription.java
index d6eba633..824dc5b2 100644
--- a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/ExternalRoleDescription.java
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/ExternalRoleDescription.java
@@ -45,6 +45,59 @@ public class ExternalRoleDescription {
public void setAppRoleId(String appRoleId) {
this.appRoleId = appRoleId;
}
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((active == null) ? 0 : active.hashCode());
+ result = prime * result + ((appId == null) ? 0 : appId.hashCode());
+ result = prime * result + ((appRoleId == null) ? 0 : appRoleId.hashCode());
+ result = prime * result + ((id == null) ? 0 : id.hashCode());
+ result = prime * result + ((name == null) ? 0 : name.hashCode());
+ result = prime * result + ((priority == null) ? 0 : priority.hashCode());
+ return result;
+ }
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ ExternalRoleDescription other = (ExternalRoleDescription) obj;
+ if (active == null) {
+ if (other.active != null)
+ return false;
+ } else if (!active.equals(other.active))
+ return false;
+ if (appId == null) {
+ if (other.appId != null)
+ return false;
+ } else if (!appId.equals(other.appId))
+ return false;
+ if (appRoleId == null) {
+ if (other.appRoleId != null)
+ return false;
+ } else if (!appRoleId.equals(other.appRoleId))
+ return false;
+ if (id == null) {
+ if (other.id != null)
+ return false;
+ } else if (!id.equals(other.id))
+ return false;
+ if (name == null) {
+ if (other.name != null)
+ return false;
+ } else if (!name.equals(other.name))
+ return false;
+ if (priority == null) {
+ if (other.priority != null)
+ return false;
+ } else if (!priority.equals(other.priority))
+ return false;
+ return true;
+ }
}
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/RemoteRole.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/RemoteRole.java
index 8a2d6232..74dbd1ab 100644
--- a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/RemoteRole.java
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/RemoteRole.java
@@ -41,4 +41,33 @@ public class RemoteRole {
public String toString() {
return "RemoteRole [id=" + id + ", name=" + name + "]";
}
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((id == null) ? 0 : id.hashCode());
+ result = prime * result + ((name == null) ? 0 : name.hashCode());
+ return result;
+ }
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ RemoteRole other = (RemoteRole) obj;
+ if (id == null) {
+ if (other.id != null)
+ return false;
+ } else if (!id.equals(other.id))
+ return false;
+ if (name == null) {
+ if (other.name != null)
+ return false;
+ } else if (!name.equals(other.name))
+ return false;
+ return true;
+ }
}
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/UserWithNameSurnameTitle.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/UserWithNameSurnameTitle.java
index ba411e65..bcd6595c 100644
--- a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/UserWithNameSurnameTitle.java
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/transport/UserWithNameSurnameTitle.java
@@ -36,4 +36,47 @@ public class UserWithNameSurnameTitle {
this.jobTitle = jobTitle;
}
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((firstName == null) ? 0 : firstName.hashCode());
+ result = prime * result + ((jobTitle == null) ? 0 : jobTitle.hashCode());
+ result = prime * result + ((lastName == null) ? 0 : lastName.hashCode());
+ result = prime * result + ((orgUserId == null) ? 0 : orgUserId.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ UserWithNameSurnameTitle other = (UserWithNameSurnameTitle) obj;
+ if (firstName == null) {
+ if (other.firstName != null)
+ return false;
+ } else if (!firstName.equals(other.firstName))
+ return false;
+ if (jobTitle == null) {
+ if (other.jobTitle != null)
+ return false;
+ } else if (!jobTitle.equals(other.jobTitle))
+ return false;
+ if (lastName == null) {
+ if (other.lastName != null)
+ return false;
+ } else if (!lastName.equals(other.lastName))
+ return false;
+ if (orgUserId == null) {
+ if (other.orgUserId != null)
+ return false;
+ } else if (!orgUserId.equals(other.orgUserId))
+ return false;
+ return true;
+ }
+
}
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/ueb/EPUebHelper.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/ueb/EPUebHelper.java
index a80517d2..55137cbf 100644
--- a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/ueb/EPUebHelper.java
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/portal/ueb/EPUebHelper.java
@@ -134,9 +134,8 @@ public class EPUebHelper {
refreshPublisherList();
}
};
- if (thread != null) {
- thread.start();
- }
+ thread.start();
+
}
@EPMetricsLog
diff --git a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/service/sessionmgt/SessionCommunication.java b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/service/sessionmgt/SessionCommunication.java
index 11c0890e..2bdd0ca8 100644
--- a/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/service/sessionmgt/SessionCommunication.java
+++ b/ecomp-portal-BE-common/src/main/java/org/openecomp/portalapp/service/sessionmgt/SessionCommunication.java
@@ -54,56 +54,57 @@ public class SessionCommunication {
String appResponse = "";
String appName = "Unknwon";
int responseCode = 0;
-
- try {
- if (app != null && app.name != null && app.name != "") {
- appName = app.name;
- }
- String url = app.restUrl + "/sessionTimeOuts";
- String encriptedPwdDB = app.appPassword;
- String appUserName = app.username;
-
- setLocalMDCContext(app, "/sessionTimeOuts", url);
-
- URL obj = new URL(url);
-
- HttpURLConnection con = (HttpURLConnection) obj.openConnection();
-
- // optional default is GET
- con.setRequestMethod("GET");
- con.setConnectTimeout(3000);
- con.setReadTimeout(8000);
- // add request header
- con.setRequestProperty("username", appUserName);
- con.setRequestProperty("password", encriptedPwdDB);
-
- // con.set
- responseCode = con.getResponseCode();
- logger.debug(EELFLoggerDelegate.debugLogger, "Response Code : " + responseCode);
-
- BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
- String inputLine;
- StringBuffer response = new StringBuffer();
-
- while ((inputLine = in.readLine()) != null) {
- response.append(inputLine);
+ if (app != null && app.name != null && app.name != "") {
+ try {
+ appName = app.name;
+ String url = app.restUrl + "/sessionTimeOuts";
+ String encriptedPwdDB = app.appPassword;
+ String appUserName = app.username;
+
+ setLocalMDCContext(app, "/sessionTimeOuts", url);
+
+ URL obj = new URL(url);
+
+ HttpURLConnection con = (HttpURLConnection) obj.openConnection();
+
+ // optional default is GET
+ con.setRequestMethod("GET");
+ con.setConnectTimeout(3000);
+ con.setReadTimeout(8000);
+ // add request header
+ con.setRequestProperty("username", appUserName);
+ con.setRequestProperty("password", encriptedPwdDB);
+
+ // con.set
+ responseCode = con.getResponseCode();
+ logger.debug(EELFLoggerDelegate.debugLogger, "Response Code : " + responseCode);
+
+ BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
+ String inputLine;
+ StringBuffer response = new StringBuffer();
+
+ while ((inputLine = in.readLine()) != null) {
+ response.append(inputLine);
+ }
+
+ in.close();
+ appResponse = response.toString();
+ } catch (UrlAccessRestrictedException e) {
+ responseCode = HttpServletResponse.SC_UNAUTHORIZED;
+ logger.error(EELFLoggerDelegate.errorLogger, String.format("SessionCommunication.sendGet received an un-authorized exception. AppName: %s", appName));
+ EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeRestApiAuthenticationError, e);
+ } catch (Exception e) {
+ responseCode = HttpServletResponse.SC_INTERNAL_SERVER_ERROR;
+ String message = String.format(
+ "SessionCommunication.sendGet encountered an Exception. AppName: %s, Details: %s", appName,
+ EcompPortalUtils.getStackTrace(e));
+ EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeHttpConnectionError, e);
+ logger.error(EELFLoggerDelegate.errorLogger, message);
+ } finally {
+ EcompPortalUtils.setExternalAppResponseCode(responseCode);
}
-
- in.close();
- appResponse = response.toString();
- } catch (UrlAccessRestrictedException e) {
- responseCode = HttpServletResponse.SC_UNAUTHORIZED;
- logger.error(EELFLoggerDelegate.errorLogger, String.format("SessionCommunication.sendGet received an un-authorized exception. AppName: %s", appName));
- EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeRestApiAuthenticationError, e);
- } catch (Exception e) {
- responseCode = HttpServletResponse.SC_INTERNAL_SERVER_ERROR;
- String message = String.format(
- "SessionCommunication.sendGet encountered an Exception. AppName: %s, Details: %s", appName,
- EcompPortalUtils.getStackTrace(e));
- EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeHttpConnectionError, e);
- logger.error(EELFLoggerDelegate.errorLogger, message);
- } finally {
- EcompPortalUtils.setExternalAppResponseCode(responseCode);
+ }else{
+ logger.error(EELFLoggerDelegate.errorLogger, "SessionCommunication sendGet: app is null");
}
return appResponse;
}
@@ -113,10 +114,11 @@ public class SessionCommunication {
String appName = "Unknwon";
int responseCode = 0;
try {
+ if(app==null)
+ throw new Exception("SessionCommunication.pingSession app is null");
if (app != null && app.name != null && app.name != "") {
appName = app.name;
}
-
String url = app.restUrl + "/updateSessionTimeOuts";
String encriptedPwdDB = app.appPassword;
String appUserName = app.username;
@@ -171,55 +173,56 @@ public class SessionCommunication {
public Boolean timeoutSession(OnboardingApp app, String portalJSessionId) throws Exception {
String appName = "Unknwon";
int responseCode = 0;
- try {
- if (app != null && app.name != null && app.name != "") {
+ if (app != null && app.name != null && app.name != "") {
+ try {
appName = app.name;
+ String url = app.restUrl + "/timeoutSession" + "?portalJSessionId=" + portalJSessionId;
+
+ String encriptedPwdDB = app.appPassword;
+ String appUserName = app.username;
+ // String decreptedPwd = CipherUtil.decrypt(encriptedPwdDB,
+ // SystemProperties.getProperty(SystemProperties.Decryption_Key));
+
+ setLocalMDCContext(app, "/timeoutSession", url);
+
+ URL obj = new URL(url);
+ HttpURLConnection con = (HttpURLConnection) obj.openConnection();
+
+ // optional default is GET
+ con.setRequestMethod("POST");
+ con.setConnectTimeout(3000);
+ con.setReadTimeout(15000);
+
+ // add request header
+ con.setRequestProperty("username", appUserName);
+ con.setRequestProperty("password", encriptedPwdDB);
+
+ // con.setRequestProperty("portalJSessionId", portalJSessionId);
+ con.setDoInput(true);
+ con.setDoOutput(true);
+ con.getOutputStream().flush();
+ con.getOutputStream().close();
+
+ responseCode = con.getResponseCode();
+ logger.debug(EELFLoggerDelegate.debugLogger, "Response Code : " + responseCode);
+ } catch (UrlAccessRestrictedException e) {
+ responseCode = HttpServletResponse.SC_UNAUTHORIZED;
+ String message = String.format(
+ "SessionCommunication.timeoutSession received an un-authorized exception. AppName: %s", appName);
+ logger.error(EELFLoggerDelegate.errorLogger, message);
+ EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeRestApiAuthenticationError, e);
+ } catch (Exception e) {
+ responseCode = HttpServletResponse.SC_INTERNAL_SERVER_ERROR;
+ String message = String.format(
+ "SessionCommunication.timeoutSession encountered an Exception. AppName: %s, Details: %s", appName,
+ EcompPortalUtils.getStackTrace(e));
+ EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeHttpConnectionError, e);
+ logger.error(EELFLoggerDelegate.errorLogger, message);
+ } finally {
+ EcompPortalUtils.setExternalAppResponseCode(responseCode);
}
-
- String url = app.restUrl + "/timeoutSession" + "?portalJSessionId=" + portalJSessionId;
-
- String encriptedPwdDB = app.appPassword;
- String appUserName = app.username;
- // String decreptedPwd = CipherUtil.decrypt(encriptedPwdDB,
- // SystemProperties.getProperty(SystemProperties.Decryption_Key));
-
- setLocalMDCContext(app, "/timeoutSession", url);
-
- URL obj = new URL(url);
- HttpURLConnection con = (HttpURLConnection) obj.openConnection();
-
- // optional default is GET
- con.setRequestMethod("POST");
- con.setConnectTimeout(3000);
- con.setReadTimeout(15000);
-
- // add request header
- con.setRequestProperty("username", appUserName);
- con.setRequestProperty("password", encriptedPwdDB);
-
- // con.setRequestProperty("portalJSessionId", portalJSessionId);
- con.setDoInput(true);
- con.setDoOutput(true);
- con.getOutputStream().flush();
- con.getOutputStream().close();
-
- responseCode = con.getResponseCode();
- logger.debug(EELFLoggerDelegate.debugLogger, "Response Code : " + responseCode);
- } catch (UrlAccessRestrictedException e) {
- responseCode = HttpServletResponse.SC_UNAUTHORIZED;
- String message = String.format(
- "SessionCommunication.timeoutSession received an un-authorized exception. AppName: %s", appName);
- logger.error(EELFLoggerDelegate.errorLogger, message);
- EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeRestApiAuthenticationError, e);
- } catch (Exception e) {
- responseCode = HttpServletResponse.SC_INTERNAL_SERVER_ERROR;
- String message = String.format(
- "SessionCommunication.timeoutSession encountered an Exception. AppName: %s, Details: %s", appName,
- EcompPortalUtils.getStackTrace(e));
- EPLogUtil.logEcompError(logger, EPAppMessagesEnum.BeHttpConnectionError, e);
- logger.error(EELFLoggerDelegate.errorLogger, message);
- } finally {
- EcompPortalUtils.setExternalAppResponseCode(responseCode);
+ }else{
+ logger.error(EELFLoggerDelegate.errorLogger, "SessionCommunication pingSession: app is null");
}
return true;
}
diff --git a/ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion/orm/EP.hbm.xml b/ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion/orm/EP.hbm.xml
index 1574a9a2..5526670a 100644
--- a/ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion/orm/EP.hbm.xml
+++ b/ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion/orm/EP.hbm.xml
@@ -371,7 +371,7 @@
</class>
<!-- User Role class mapping details -->
- <class name="EPRole" table="FN_ROLE">
+ <class name="EPRole" table="FN_ROLE" >
<id name="id" column="role_id">
<generator class="native">
<param name="sequence">seq_fn_role</param>
@@ -1800,22 +1800,11 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' and fn_role.active_y
class="org.openecomp.portalapp.portal.domain.CentralRoleFunction" />
<![CDATA[
- SELECT * from ep_app_function where function_cd = :functionCode and app_id =:appId
+ SELECT * from ep_app_function where function_cd like CONCAT('%', :functionCode,'%') and app_id =:appId
;
]]>
</sql-query>
-
- <!-- Gets the record from ep_app_function table and requires two parameters -->
- <sql-query name="getAppFunctionDetails">
- <return alias="appFunctionDetails"
- class="org.openecomp.portalapp.portal.domain.CentralRoleFunction" />
- <![CDATA[
-
- select * from ep_app_function where app_id =:appId and function_cd =:functionCd
- ;
- ]]>
- </sql-query>
<!-- Gets the current user app roles records and requires two parameters -->
<sql-query name="getUserAppCurrentRoles">
@@ -1940,4 +1929,18 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' and fn_role.active_y
]]>
</sql-query>
+ <sql-query name="ApplicationUserRoles">
+ <return alias="ApplicationUserRoles" class="org.openecomp.portalapp.portal.transport.EcompUserRoles" />
+ <![CDATA[
+ select distinct fu.org_id, fu.manager_id, fu.first_name, fu.middle_name, fu.last_name, fu.phone, fu.email, fu.hrid, fu.org_user_id, fu.org_code, fu.org_manager_userid, fu.job_title, fu.login_id,
+ fu.active_yn , fr.app_role_id, fr.role_name
+ from fn_user fu, fn_role fr, fn_user_role fur
+ where fu.user_id = fur.user_id and fu.active_yn='Y' and fur.role_id = fr.role_id and fr.app_id =:appId and fr.active_yn='Y'
+ union
+ select distinct fu.org_id, fu.manager_id, fu.first_name, fu.middle_name, fu.last_name, fu.phone, fu.email, fu.hrid, fu.org_user_id, fu.org_code, fu.org_manager_userid, fu.job_title, fu.login_id, fu.active_yn , fr.role_id, fr.role_name
+ from fn_user fu, fn_role fr, fn_user_role fur
+ where fu.user_id = fur.user_id and fu.active_yn='Y' and fur.app_id=:appId and fr.role_name like 'global%' and fr.active_yn='Y'
+ ;
+ ]]>
+ </sql-query>
</hibernate-mapping>
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/AppCatalogControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/AppCatalogControllerTest.java
new file mode 100644
index 00000000..16d2c8d5
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/AppCatalogControllerTest.java
@@ -0,0 +1,263 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.controller;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
+import org.openecomp.portalapp.portal.controller.AppCatalogController;
+import org.openecomp.portalapp.portal.core.MockEPUser;
+import org.openecomp.portalapp.portal.domain.EPApp;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.ecomp.model.AppCatalogItem;
+import org.openecomp.portalapp.portal.service.AdminRolesService;
+import org.openecomp.portalapp.portal.service.AdminRolesServiceImpl;
+import org.openecomp.portalapp.portal.service.EPAppCommonServiceImpl;
+import org.openecomp.portalapp.portal.service.EPAppService;
+import org.openecomp.portalapp.portal.service.PersUserAppService;
+import org.openecomp.portalapp.portal.service.PersUserAppServiceImpl;
+import org.openecomp.portalapp.portal.transport.AppCatalogPersonalization;
+import org.openecomp.portalapp.portal.transport.FieldsValidator;
+import org.openecomp.portalapp.portal.transport.FieldsValidator.FieldName;
+import org.openecomp.portalapp.util.EPUserUtils;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+
+public class AppCatalogControllerTest extends MockitoTestSuite {
+
+ @Mock
+ AdminRolesService adminRolesService = new AdminRolesServiceImpl();
+
+ @Mock
+ EPAppService appService = new EPAppCommonServiceImpl();
+
+ @InjectMocks
+ AppCatalogController appCatalogController = new AppCatalogController();
+
+ PersUserAppService persUserAppService = Mockito.spy(new PersUserAppServiceImpl());
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+
+ @Mock
+ EPUserUtils ePUserUtils = new EPUserUtils();
+
+ @Mock
+ EPUser epuser;
+
+ NullPointerException nullPointerException = new NullPointerException();
+
+ MockEPUser mockUser = new MockEPUser();
+
+ public AppCatalogItem mockAppCatalogItem() {
+ AppCatalogItem appCatalogItem = new AppCatalogItem();
+ appCatalogItem.setId((long) 1);
+ appCatalogItem.setName("Ecomp Portal");
+ appCatalogItem.setImageUrl("Test_URL");
+ appCatalogItem.setDescription("Testing");
+ appCatalogItem.setNotes("Test");
+ appCatalogItem.setUrl("test");
+ appCatalogItem.setAlternateUrl("test");
+ appCatalogItem.setRestricted(false);
+ appCatalogItem.setOpen(false);
+ appCatalogItem.setAccess(true);
+ appCatalogItem.setSelect(true);
+ appCatalogItem.setPending(false);
+
+ return appCatalogItem;
+ }
+
+ @Test
+ public void getAppCatalogTestIfUserNotAdmin() throws IOException {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ List<AppCatalogItem> actualAppCatalogList = null;
+
+ List<AppCatalogItem> expectedAppCatalog = new ArrayList<>();
+
+ AppCatalogItem appCatalogItem = mockAppCatalogItem();
+ expectedAppCatalog.add(appCatalogItem);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+ Mockito.when(appService.getUserAppCatalog(user)).thenReturn(expectedAppCatalog);
+ actualAppCatalogList = appCatalogController.getAppCatalog(mockedRequest, mockedResponse);
+
+ assertTrue(actualAppCatalogList.contains(appCatalogItem));
+
+ }
+
+ @Test
+ public void getAppCatalogTestIfUserIsAdmin() throws IOException {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ List<AppCatalogItem> actualAppCatalogList = null;
+
+ List<AppCatalogItem> expectedAppCatalog = new ArrayList<>();
+
+ AppCatalogItem appCatalogItem = mockAppCatalogItem();
+
+ expectedAppCatalog.add(appCatalogItem);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ Mockito.when(appService.getAdminAppCatalog(user)).thenReturn(expectedAppCatalog);
+ actualAppCatalogList = appCatalogController.getAppCatalog(mockedRequest, mockedResponse);
+
+ assertTrue(actualAppCatalogList.contains(appCatalogItem));
+
+ }
+
+ @Test
+ public void getAppCatalogTestIfUserisNull() throws IOException {
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(null);
+ List<AppCatalogItem> actualAppCatalogList = new ArrayList<>();
+ ;
+ actualAppCatalogList = appCatalogController.getAppCatalog(mockedRequest, mockedResponse);
+ assertNull(actualAppCatalogList);
+
+ }
+
+ @Test
+ public void getAppCatalogTestIfUserThrowsExceptionTest() throws IOException {
+ EPUser user = new EPUser();
+ user.setFirstName("test");
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ List<AppCatalogItem> actualAppCatalogList = new ArrayList<>();
+ ;
+
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+
+ Mockito.when(appCatalogController.getAppCatalog(mockedRequest, mockedResponse)).thenThrow(nullPointerException);
+
+ actualAppCatalogList = appCatalogController.getAppCatalog(mockedRequest, mockedResponse);
+ assertNull(actualAppCatalogList);
+
+ }
+
+ @Test
+ public void putAppCatalogSelectionTestWhenAppIsNull() throws IOException {
+
+ AppCatalogPersonalization persRequest = new AppCatalogPersonalization();
+ persRequest.setAppId((long) 1);
+ persRequest.setPending(false);
+ persRequest.setSelect(false);
+
+ EPUser user = mockUser.mockEPUser();
+
+ FieldsValidator expectedFieldValidator = new FieldsValidator();
+
+ FieldsValidator actualFieldValidator = new FieldsValidator();
+ List<FieldName> fields = new ArrayList<>();
+ ;
+
+ expectedFieldValidator.setHttpStatusCode((long) 200);
+ expectedFieldValidator.setFields(fields);
+ expectedFieldValidator.setErrorCode(null);
+
+ EPApp app = null;
+
+ Mockito.when(appService.getApp(persRequest.getAppId())).thenReturn(app);
+
+ HttpSession session = mockedRequest.getSession();
+ session.setAttribute(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);
+
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ actualFieldValidator = appCatalogController.putAppCatalogSelection(mockedRequest, persRequest, mockedResponse);
+ assertEquals(expectedFieldValidator, actualFieldValidator);
+
+ }
+
+ @Test
+ public void putAppCatalogSelectionTest() throws IOException {
+
+ AppCatalogPersonalization persRequest = new AppCatalogPersonalization();
+ persRequest.setAppId((long) 1);
+ persRequest.setPending(false);
+ persRequest.setSelect(false);
+
+ EPUser user = mockUser.mockEPUser();
+
+ FieldsValidator expectedFieldValidator = new FieldsValidator();
+
+ FieldsValidator actualFieldValidator = new FieldsValidator();
+ List<FieldName> fields = new ArrayList<>();
+ ;
+
+ expectedFieldValidator.setHttpStatusCode((long) 200);
+ expectedFieldValidator.setFields(fields);
+ expectedFieldValidator.setErrorCode(null);
+
+ EPApp app = new EPApp();
+
+ app.setName("Test");
+ app.setImageUrl("test");
+ app.setDescription("test");
+ app.setNotes("test");
+ app.setUrl("test");
+ app.setId((long) 1);
+ app.setAppRestEndpoint("test");
+ app.setAlternateUrl("test");
+ app.setName("test");
+ app.setMlAppName("test");
+ app.setMlAppAdminId("test");
+ app.setUsername("test");
+ app.setAppPassword("test");
+ app.setOpen(false);
+ app.setEnabled(false);
+ app.setUebKey("test");
+ app.setUebSecret("test");
+ app.setUebTopicName("test");
+ app.setAppType(1);
+
+ Mockito.when(appService.getApp(persRequest.getAppId())).thenReturn(app);
+
+ HttpSession session = mockedRequest.getSession();
+ session.setAttribute(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);
+
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.doNothing().when(persUserAppService).setPersUserAppValue(user, app, persRequest.getSelect(),
+ persRequest.getPending());
+
+ actualFieldValidator = appCatalogController.putAppCatalogSelection(mockedRequest, persRequest, mockedResponse);
+
+ assertEquals(expectedFieldValidator, actualFieldValidator);
+
+ }
+
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/AppContactUsControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/AppContactUsControllerTest.java
new file mode 100644
index 00000000..01cf27e0
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/AppContactUsControllerTest.java
@@ -0,0 +1,274 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.controller;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
+import org.openecomp.portalapp.portal.controller.AppContactUsController;
+import org.openecomp.portalapp.portal.ecomp.model.AppCategoryFunctionsItem;
+import org.openecomp.portalapp.portal.ecomp.model.AppContactUsItem;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.openecomp.portalapp.portal.service.AppContactUsService;
+import org.openecomp.portalapp.portal.service.AppContactUsServiceImpl;
+import org.openecomp.portalapp.util.EPUserUtils;
+
+public class AppContactUsControllerTest extends MockitoTestSuite{
+
+ @Mock
+ AppContactUsService contactUsService = new AppContactUsServiceImpl();
+
+ @InjectMocks
+ AppContactUsController appContactUsController = new AppContactUsController();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+ NullPointerException nullPointerException = new NullPointerException();
+
+ @Mock
+ EPUserUtils ePUserUtils = new EPUserUtils();
+
+ public List<AppContactUsItem> mockResponse() {
+ List<AppContactUsItem> appContactUsItemList = new ArrayList<AppContactUsItem>();
+ AppContactUsItem appContactUsItem = new AppContactUsItem();
+ appContactUsItem.setAppId((long) 1);
+ appContactUsItem.setAppName("ECOMP Portal");
+ appContactUsItem.setDescription("Test");
+ appContactUsItem.setContactName("Test");
+ appContactUsItem.setContactEmail("person@onap.org");
+ appContactUsItem.setUrl("Test_URL");
+ appContactUsItem.setActiveYN("Y");
+ appContactUsItemList.add(appContactUsItem);
+
+ return appContactUsItemList;
+
+ }
+
+ public PortalRestResponse<List<AppContactUsItem>> successPortalRestResponse() {
+ PortalRestResponse<List<AppContactUsItem>> expectedportalRestResponse = new PortalRestResponse<List<AppContactUsItem>>();
+ List<AppContactUsItem> appContactUsItemList = mockResponse();
+ expectedportalRestResponse.setMessage("success");
+ expectedportalRestResponse.setResponse(appContactUsItemList);
+ expectedportalRestResponse.setStatus(PortalRestStatusEnum.OK);
+ return expectedportalRestResponse;
+
+ }
+
+ public PortalRestResponse<List<AppContactUsItem>> exceptionPortalRestResponse() {
+ PortalRestResponse<List<AppContactUsItem>> expectedportalRestResponse = new PortalRestResponse<List<AppContactUsItem>>();
+ expectedportalRestResponse.setMessage(null);
+ expectedportalRestResponse.setResponse(null);
+ expectedportalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
+ return expectedportalRestResponse;
+
+ }
+
+ @Test
+ public void getAppContactUsList() throws Exception {
+ PortalRestResponse<List<AppContactUsItem>> expectedportalRestResponse = successPortalRestResponse();
+ List<AppContactUsItem> appContactUsItemList = mockResponse();
+ PortalRestResponse<List<AppContactUsItem>> actualPortalRestResponse = new PortalRestResponse<List<AppContactUsItem>>();
+ Mockito.when(contactUsService.getAppContactUs()).thenReturn(appContactUsItemList);
+ actualPortalRestResponse = appContactUsController.getAppContactUsList(mockedRequest);
+ assertEquals(actualPortalRestResponse, expectedportalRestResponse);
+ }
+
+ @Test
+ public void getAppContactUsListCatchesExeptionTest() throws Exception {
+
+ PortalRestResponse<List<AppContactUsItem>> expectedportalRestResponse = exceptionPortalRestResponse();
+ PortalRestResponse<List<AppContactUsItem>> actualPortalRestResponse = new PortalRestResponse<List<AppContactUsItem>>();
+ Mockito.when(contactUsService.getAppContactUs()).thenThrow(nullPointerException);
+ actualPortalRestResponse = appContactUsController.getAppContactUsList(mockedRequest);
+ assertEquals(actualPortalRestResponse, expectedportalRestResponse);
+ }
+
+ @Test
+ public void getAppsAndContactsTest() throws Exception {
+ PortalRestResponse<List<AppContactUsItem>> expectedportalRestResponse = successPortalRestResponse();
+ List<AppContactUsItem> appContactUsItemList = mockResponse();
+ PortalRestResponse<List<AppContactUsItem>> actualPortalRestResponse = new PortalRestResponse<List<AppContactUsItem>>();
+ Mockito.when(contactUsService.getAppsAndContacts()).thenReturn(appContactUsItemList);
+ actualPortalRestResponse = appContactUsController.getAppsAndContacts(mockedRequest);
+ assertEquals(actualPortalRestResponse, expectedportalRestResponse);
+
+ }
+
+ @Test
+ public void getAppsAndContactsCatchesExceptionTest() throws Exception {
+ PortalRestResponse<List<AppContactUsItem>> expectedportalRestResponse = exceptionPortalRestResponse();
+ PortalRestResponse<List<AppContactUsItem>> actualPortalRestResponse = new PortalRestResponse<List<AppContactUsItem>>();
+ Mockito.when(contactUsService.getAppsAndContacts()).thenThrow(nullPointerException);
+ actualPortalRestResponse = appContactUsController.getAppsAndContacts(mockedRequest);
+ assertEquals(actualPortalRestResponse, expectedportalRestResponse);
+
+ }
+
+ @Test
+ public void getAppCategoryFunctionsTest() throws Exception {
+ PortalRestResponse<List<AppCategoryFunctionsItem>> actualportalRestResponse = null;
+
+ List<AppCategoryFunctionsItem> contents = new ArrayList<AppCategoryFunctionsItem>();
+
+ AppCategoryFunctionsItem appCategoryFunctionsItem = new AppCategoryFunctionsItem();
+ AppCategoryFunctionsItem appCategoryFunctionsItem1 = new AppCategoryFunctionsItem();
+
+ appCategoryFunctionsItem.setRowId("1");
+ appCategoryFunctionsItem.setAppId("1");
+ appCategoryFunctionsItem.setApplication("Ecomp-portal");
+ appCategoryFunctionsItem.setCategory("test");
+ appCategoryFunctionsItem.setFunctions("test");
+
+ appCategoryFunctionsItem1.setRowId("2");
+ appCategoryFunctionsItem1.setAppId("2");
+ appCategoryFunctionsItem1.setApplication("Ecomp-portal-test");
+ appCategoryFunctionsItem1.setCategory("test");
+ appCategoryFunctionsItem1.setFunctions("test");
+ contents.add(appCategoryFunctionsItem);
+ contents.add(appCategoryFunctionsItem1);
+
+ PortalRestResponse<List<AppCategoryFunctionsItem>> expectedportalRestResponse = new PortalRestResponse<List<AppCategoryFunctionsItem>>();
+ expectedportalRestResponse.setMessage("success");
+ expectedportalRestResponse.setResponse(contents);
+ expectedportalRestResponse.setStatus(PortalRestStatusEnum.OK);
+
+ Mockito.when(contactUsService.getAppCategoryFunctions()).thenReturn(contents);
+ actualportalRestResponse = appContactUsController.getAppCategoryFunctions(mockedRequest);
+ assertEquals(actualportalRestResponse, expectedportalRestResponse);
+
+ }
+
+ @Test
+ public void getAppCategoryFunctionsCatchesExceptionTest() throws Exception {
+ PortalRestResponse<List<AppCategoryFunctionsItem>> actualportalRestResponse = null;
+ PortalRestResponse<List<AppContactUsItem>> expectedportalRestResponse = exceptionPortalRestResponse();
+ Mockito.when(contactUsService.getAppCategoryFunctions()).thenThrow(nullPointerException);
+ actualportalRestResponse = appContactUsController.getAppCategoryFunctions(mockedRequest);
+ assertEquals(actualportalRestResponse, expectedportalRestResponse);
+
+ }
+
+ @Test
+ public void saveTest() throws Exception {
+ PortalRestResponse<String> actualSaveAppContactUS = null;
+
+ AppContactUsItem contactUs = new AppContactUsItem();
+ contactUs.setAppId((long) 1);
+ contactUs.setAppName("Ecomp Portal");
+ contactUs.setDescription("Test");
+ contactUs.setContactName("Test");
+ contactUs.setContactEmail("person@onap.org");
+ contactUs.setUrl("Test_URL");
+ contactUs.setActiveYN("Y");
+
+ Mockito.when(contactUsService.saveAppContactUs(contactUs)).thenReturn("SUCCESS");
+ actualSaveAppContactUS = appContactUsController.save(contactUs);
+ assertEquals(actualSaveAppContactUS.getMessage(), "SUCCESS");
+ }
+
+ @Test
+ public void saveExceptionTest() throws Exception {
+ PortalRestResponse<String> actualSaveAppContactUS = null;
+
+ AppContactUsItem contactUs = new AppContactUsItem();
+ contactUs.setAppId((long) 1);
+ contactUs.setAppName("Ecomp Portal");
+ contactUs.setDescription("Test");
+ contactUs.setContactName("Test");
+ contactUs.setContactEmail("person@onap.org");
+ contactUs.setUrl("Test_URL");
+ contactUs.setActiveYN("Y");
+
+ Mockito.when(contactUsService.saveAppContactUs(contactUs)).thenThrow(new Exception());
+ actualSaveAppContactUS = appContactUsController.save(contactUs);
+ assertEquals(actualSaveAppContactUS.getMessage(), "failure");
+ }
+
+ @Test
+ public void saveWhenAppContactUsItemNullTest() throws Exception {
+ PortalRestResponse<String> actualSaveAppContactUS = null;
+ AppContactUsItem contactUs = null;
+ actualSaveAppContactUS = appContactUsController.save(contactUs);
+ assertEquals(actualSaveAppContactUS.getMessage(), "failure");
+
+ }
+
+ @Test
+ public void saveAllTest() throws Exception {
+
+ List<AppContactUsItem> contactUs = mockResponse();
+ PortalRestResponse<String> actualSaveAppContactUS = null;
+ Mockito.when(contactUsService.saveAppContactUs(contactUs)).thenReturn("SUCCESS");
+ actualSaveAppContactUS = appContactUsController.save(contactUs);
+ assertEquals(actualSaveAppContactUS.getMessage(), "SUCCESS");
+ }
+
+ @Test
+ public void saveAllExceptionTest() throws Exception {
+
+ List<AppContactUsItem> contactUs = mockResponse();
+ PortalRestResponse<String> actualSaveAppContactUS = null;
+ Mockito.when(contactUsService.saveAppContactUs(contactUs)).thenThrow(new Exception());
+ actualSaveAppContactUS = appContactUsController.save(contactUs);
+ assertEquals(actualSaveAppContactUS.getMessage(), "failure");
+ }
+
+ @Test
+ public void deleteTest() throws Exception {
+
+ PortalRestResponse<String> actualSaveAppContactUS = null;
+ Long id = (long) 1;
+ String saveAppContactUs = "SUCCESS";
+ Mockito.when(contactUsService.deleteContactUs(id)).thenReturn(saveAppContactUs);
+ actualSaveAppContactUS = appContactUsController.delete(id);
+ assertEquals(actualSaveAppContactUS.getMessage(), "SUCCESS");
+ }
+
+ @Test
+ public void deleteExceptionTest() throws Exception {
+
+ PortalRestResponse<String> actualSaveAppContactUS = null;
+ Long id = (long) 1;
+ Mockito.when(contactUsService.deleteContactUs(id)).thenThrow(new Exception());
+ actualSaveAppContactUS = appContactUsController.delete(id);
+ assertEquals(actualSaveAppContactUS.getMessage(), "failure");
+ }
+
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/AppsControllerExternalRequestTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/AppsControllerExternalRequestTest.java
new file mode 100644
index 00000000..e62a940c
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/AppsControllerExternalRequestTest.java
@@ -0,0 +1,273 @@
+package org.openecomp.portalapp.portal.controller;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
+import org.openecomp.portalapp.portal.controller.AppsControllerExternalRequest;
+import org.openecomp.portalapp.portal.core.MockEPUser;
+import org.openecomp.portalapp.portal.domain.EPApp;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.openecomp.portalapp.portal.service.AdminRolesService;
+import org.openecomp.portalapp.portal.service.EPAppService;
+import org.openecomp.portalapp.portal.service.PortalAdminService;
+import org.openecomp.portalapp.portal.service.UserService;
+import org.openecomp.portalapp.portal.service.UserServiceImpl;
+import org.openecomp.portalapp.portal.transport.FieldsValidator;
+import org.openecomp.portalapp.portal.transport.OnboardingApp;
+import org.openecomp.portalapp.util.EPUserUtils;
+
+public class AppsControllerExternalRequestTest extends MockitoTestSuite {
+
+ @Mock
+ AdminRolesService adminRolesService;
+
+ @Mock
+ EPAppService appService;
+
+ @Mock
+ PortalAdminService portalAdminService;
+
+ @Mock
+ UserService userService = new UserServiceImpl();
+
+ @InjectMocks
+ AppsControllerExternalRequest appsControllerExternalRequest = new AppsControllerExternalRequest();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+ NullPointerException nullPointerException = new NullPointerException();
+
+ MockEPUser mockUser = new MockEPUser();
+ @Mock
+ EPUserUtils ePUserUtils = new EPUserUtils();
+
+ @Test
+ public void postPortalAdminIfUSerNullTest() {
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("Missing required field: email, loginId, or loginPwd");
+ expectedportalRestResponse.setResponse(null);
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ EPUser user = mockUser.mockEPUser();
+ user.setEmail("guestT@test.portal.onap.org");
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ PortalRestResponse<String> actualPortalRestResponse = appsControllerExternalRequest
+ .postPortalAdmin(mockedRequest, mockedResponse, user);
+ assertEquals(actualPortalRestResponse, expectedportalRestResponse);
+ }
+
+ @Test
+ public void postPortalAdminTest() {
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("java.lang.NullPointerException");
+ expectedportalRestResponse.setResponse(null);
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ EPUser user = mockUser.mockEPUser();
+ user.setEmail("guestT@test.portal.onap.org");
+ user.setLoginPwd("pwd");
+ user.setLoginId("Test");
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(userService.getUserByUserId(user.getOrgUserId())).thenThrow(nullPointerException);
+ PortalRestResponse<String> actualPortalRestResponse = appsControllerExternalRequest
+ .postPortalAdmin(mockedRequest, mockedResponse, user);
+ assertEquals(actualPortalRestResponse, expectedportalRestResponse);
+ }
+
+ @Test
+ public void postPortalAdminCreateUserIfNotFoundTest() throws Exception {
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage(null);
+ expectedportalRestResponse.setResponse(null);
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ EPUser user = mockUser.mockEPUser();
+ user.setEmail("guestT@test.portal.onap.org");
+ user.setLoginPwd("pwd");
+ user.setLoginId("Test");
+ List<EPUser> expectedList = null;
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(userService.getUserByUserId(user.getOrgUserId())).thenReturn(expectedList);
+ Mockito.when(userService.saveNewUser(user, "Yes")).thenReturn(null);
+ PortalRestResponse<String> actualPortalRestResponse = appsControllerExternalRequest
+ .postPortalAdmin(mockedRequest, mockedResponse, user);
+ assertEquals(actualPortalRestResponse, expectedportalRestResponse);
+ }
+
+ @Test
+ public void postPortalAdminCreateUserIfFoundTest() throws Exception {
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage(null);
+ expectedportalRestResponse.setResponse(null);
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
+ EPUser user = mockUser.mockEPUser();
+ user.setEmail("guestT@test.portal.onap.org");
+ user.setLoginPwd("pwd");
+ user.setLoginId("Test");
+ List<EPUser> expectedList = new ArrayList<EPUser>();
+ expectedList.add(user);
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(userService.getUserByUserId(user.getOrgUserId())).thenReturn(expectedList);
+ Mockito.when(userService.saveNewUser(user, "Yes")).thenReturn(null);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ PortalRestResponse<String> actualPortalRestResponse = appsControllerExternalRequest
+ .postPortalAdmin(mockedRequest, mockedResponse, user);
+ assertEquals(actualPortalRestResponse, expectedportalRestResponse);
+ }
+
+ @Test
+ public void postPortalAdminCreateUserIfNotSuperAdminTest() throws Exception {
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage(null);
+ expectedportalRestResponse.setResponse(null);
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
+ EPUser user = mockUser.mockEPUser();
+ user.setEmail("guestT@test.portal.onap.org");
+ user.setLoginPwd("pwd");
+ user.setLoginId("Test");
+ List<EPUser> expectedList = new ArrayList<EPUser>();
+ expectedList.add(user);
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(userService.getUserByUserId(user.getOrgUserId())).thenReturn(expectedList);
+ Mockito.when(userService.saveNewUser(user, "Yes")).thenReturn(null);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+
+ FieldsValidator expectedFieldValidator = new FieldsValidator();
+ expectedFieldValidator.setHttpStatusCode((long) 200);
+ expectedFieldValidator.setFields(null);
+ expectedFieldValidator.setErrorCode(null);
+ Mockito.when(portalAdminService.createPortalAdmin(user.getOrgUserId())).thenReturn(expectedFieldValidator);
+
+ PortalRestResponse<String> actualPortalRestResponse = appsControllerExternalRequest
+ .postPortalAdmin(mockedRequest, mockedResponse, user);
+ assertEquals(actualPortalRestResponse, expectedportalRestResponse);
+ }
+
+ @Test
+ public void postPortalAdminCreateUserIfFieldValidatorErrorTest() throws Exception {
+ FieldsValidator expectedFieldValidator = new FieldsValidator();
+ expectedFieldValidator.setHttpStatusCode((long) 500);
+ expectedFieldValidator.setFields(null);
+ expectedFieldValidator.setErrorCode(null);
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("FieldsValidator [httpStatusCode=500, errorCode=null, fields=null]");
+ expectedportalRestResponse.setResponse(null);
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ EPUser user = mockUser.mockEPUser();
+ user.setEmail("guestT@test.portal.onap.org");
+ user.setLoginPwd("pwd");
+ user.setLoginId("Test");
+ List<EPUser> expectedList = new ArrayList<EPUser>();
+ expectedList.add(user);
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(userService.getUserByUserId(user.getOrgUserId())).thenReturn(expectedList);
+ Mockito.when(userService.saveNewUser(user, "Yes")).thenReturn(null);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+ Mockito.when(portalAdminService.createPortalAdmin(user.getOrgUserId())).thenReturn(expectedFieldValidator);
+ PortalRestResponse<String> actualPortalRestResponse = appsControllerExternalRequest
+ .postPortalAdmin(mockedRequest, mockedResponse, user);
+ assertEquals(actualPortalRestResponse, expectedportalRestResponse);
+ }
+
+ @Test
+ public void getOnboardAppExternalTest() {
+ EPApp epApp = new EPApp();
+ Long appId = (long) 1;
+ Mockito.when(appService.getApp(appId)).thenReturn(epApp);
+ OnboardingApp expectedApp = new OnboardingApp();
+ Mockito.doNothing().when(appService).createOnboardingFromApp(epApp, expectedApp);
+ OnboardingApp actualApp = appsControllerExternalRequest.getOnboardAppExternal(mockedRequest, mockedResponse,
+ appId);
+ assertEquals(expectedApp.getClass(), actualApp.getClass());
+ }
+
+ @Test
+ public void postOnboardAppExternalExceptionTest() {
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("Unexpected field: id");
+ expectedportalRestResponse.setResponse(null);
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+
+ OnboardingApp expectedOnboardingApp = new OnboardingApp();
+ expectedOnboardingApp.id = (long) 1;
+
+ PortalRestResponse<String> actualPortalRestResponse = appsControllerExternalRequest
+ .postOnboardAppExternal(mockedRequest, mockedResponse, expectedOnboardingApp);
+ assertEquals(actualPortalRestResponse, expectedportalRestResponse);
+ }
+
+ @Test
+ public void postOnboardAppExternalTest() {
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage(
+ "Missing required field: name, url, restUrl, restrictedApp, isOpen, isEnabled, myLoginsAppOwner");
+ expectedportalRestResponse.setResponse(null);
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+
+ OnboardingApp expectedOnboardingApp = new OnboardingApp();
+ expectedOnboardingApp.id = null;
+
+ PortalRestResponse<String> actualPortalRestResponse = appsControllerExternalRequest
+ .postOnboardAppExternal(mockedRequest, mockedResponse, expectedOnboardingApp);
+ assertEquals(actualPortalRestResponse, expectedportalRestResponse);
+
+ }
+
+ @Test
+ public void putOnboardAppExternalifAppNullTest() {
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("Unexpected value for field: id");
+ expectedportalRestResponse.setResponse(null);
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ Long appId = null;
+ OnboardingApp expectedOnboardingApp = new OnboardingApp();
+ expectedOnboardingApp.id = null;
+
+ PortalRestResponse<String> actualPortalRestResponse = appsControllerExternalRequest
+ .putOnboardAppExternal(mockedRequest, mockedResponse, appId, expectedOnboardingApp);
+ assertEquals(actualPortalRestResponse, expectedportalRestResponse);
+ }
+
+ @Test
+ public void putOnboardAppExternalIfOnboardingAppDetailsNullTest() {
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage(
+ "Missing required field: name, url, restUrl, restrictedApp, isOpen, isEnabled, myLoginsAppOwner");
+ expectedportalRestResponse.setResponse(null);
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ Long appId = (long) 1;
+ OnboardingApp expectedOnboardingApp = new OnboardingApp();
+ expectedOnboardingApp.id = (long) 1;
+ PortalRestResponse<String> actualPortalRestResponse = appsControllerExternalRequest
+ .putOnboardAppExternal(mockedRequest, mockedResponse, appId, expectedOnboardingApp);
+ assertEquals(actualPortalRestResponse, expectedportalRestResponse);
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/AppsControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/AppsControllerTest.java
new file mode 100644
index 00000000..d4181a62
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/AppsControllerTest.java
@@ -0,0 +1,914 @@
+package org.openecomp.portalapp.portal.controller;
+
+import static org.junit.Assert.*;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
+import org.openecomp.portalapp.portal.controller.AppsController;
+import org.openecomp.portalapp.portal.core.MockEPUser;
+import org.openecomp.portalapp.portal.domain.AdminUserApplications;
+import org.openecomp.portalapp.portal.domain.AppIdAndNameTransportModel;
+import org.openecomp.portalapp.portal.domain.AppsResponse;
+import org.openecomp.portalapp.portal.domain.EPApp;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.domain.EcompApp;
+import org.openecomp.portalapp.portal.domain.UserRole;
+import org.openecomp.portalapp.portal.domain.UserRoles;
+import org.openecomp.portalapp.portal.service.AdminRolesService;
+import org.openecomp.portalapp.portal.service.AdminRolesServiceImpl;
+import org.openecomp.portalapp.portal.service.EPAppCommonServiceImpl;
+import org.openecomp.portalapp.portal.service.EPAppService;
+import org.openecomp.portalapp.portal.service.EPLeftMenuService;
+import org.openecomp.portalapp.portal.service.EPLeftMenuServiceImpl;
+import org.openecomp.portalapp.portal.transport.EPAppsManualPreference;
+import org.openecomp.portalapp.portal.transport.EPAppsSortPreference;
+import org.openecomp.portalapp.portal.transport.EPDeleteAppsManualSortPref;
+import org.openecomp.portalapp.portal.transport.EPWidgetsSortPreference;
+import org.openecomp.portalapp.portal.transport.FieldsValidator;
+import org.openecomp.portalapp.portal.transport.LocalRole;
+import org.openecomp.portalapp.portal.transport.OnboardingApp;
+import org.openecomp.portalapp.util.EPUserUtils;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.openecomp.portalsdk.core.web.support.AppUtils;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.MediaType;
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest({SystemProperties.class,AppUtils.class, EPUserUtils.class, MediaType.class})
+public class AppsControllerTest extends MockitoTestSuite{
+
+ @InjectMocks
+ AppsController appsController = new AppsController();
+
+ @Mock
+ AdminRolesService adminRolesService = new AdminRolesServiceImpl();
+
+ @Mock
+ EPAppService appService = new EPAppCommonServiceImpl();
+
+ @Mock
+ EPLeftMenuService leftMenuService = new EPLeftMenuServiceImpl();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+ NullPointerException nullPointerException = new NullPointerException();
+
+ @Mock
+ EPUserUtils ePUserUtils = new EPUserUtils();
+
+ @Mock
+ AppUtils appUtils = new AppUtils();
+
+ MockEPUser mockUser = new MockEPUser();
+
+ @Test
+ public void getUserAppsTest() {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ List<EcompApp> expectedEcompApps = new ArrayList<EcompApp>();
+
+ EcompApp ecompApp = new EcompApp();
+ ecompApp.setId((long) 1);
+ ecompApp.setName("Test_app");
+ ecompApp.setUrl("Test_URL");
+ ecompApp.setUebKey("Test_key");
+ ecompApp.setAlternateUrl("Test_alt_URL");
+ expectedEcompApps.add(ecompApp);
+ List<EcompApp> actualEcompApps = new ArrayList<EcompApp>();
+ Mockito.when(appService.transformAppsToEcompApps(appService.getUserApps(user))).thenReturn(expectedEcompApps);
+ actualEcompApps = appsController.getUserApps(mockedRequest, mockedResponse);
+ assertEquals(expectedEcompApps, actualEcompApps);
+ }
+
+ @Test
+ public void getUserAppsNoUserTest() {
+ EPUser user = null;
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(appService.transformAppsToEcompApps(appService.getUserApps(user))).thenReturn(null);
+ assertNull(appsController.getUserApps(mockedRequest, mockedResponse));
+
+ }
+
+ @Test
+ public void getUserAppsExceptionTest() {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(appService.transformAppsToEcompApps(appService.getUserApps(user))).thenThrow(nullPointerException);
+ assertNull(appsController.getUserApps(mockedRequest, mockedResponse));
+
+ }
+
+ @Test
+ public void getPersUserAppsIfUserIsAdminTest() throws IOException {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ List<EcompApp> expectedEcompApps = new ArrayList<EcompApp>();
+
+ EcompApp ecompApp = new EcompApp();
+ ecompApp.setId((long) 1);
+ ecompApp.setName("Test_app");
+ ecompApp.setUrl("Test_URL");
+ ecompApp.setUebKey("Test_key");
+ ecompApp.setAlternateUrl("Test_alt_URL");
+ expectedEcompApps.add(ecompApp);
+ List<EcompApp> actualEcompApps = new ArrayList<EcompApp>();
+
+ List<EPApp> expectedApps = new ArrayList<EPApp>();
+
+ EPApp app = new EPApp();
+
+ app.setName("Test");
+ app.setImageUrl("test");
+ app.setDescription("test");
+ app.setNotes("test");
+ app.setUrl("test");
+ app.setId((long) 1);
+ app.setAppRestEndpoint("test");
+ app.setAlternateUrl("test");
+ app.setName("test");
+ app.setMlAppName("test");
+ app.setMlAppAdminId("test");
+ app.setUsername("test");
+ app.setAppPassword("test");
+ app.setOpen(false);
+ app.setEnabled(false);
+ app.setUebKey("test");
+ app.setUebSecret("test");
+ app.setUebTopicName("test");
+ app.setAppType(1);
+
+ expectedApps.add(app);
+
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ Mockito.when(appService.getPersAdminApps(user)).thenReturn(expectedApps);
+
+ Mockito.when(appService.transformAppsToEcompApps(expectedApps)).thenReturn(expectedEcompApps);
+ actualEcompApps = appsController.getPersUserApps(mockedRequest, mockedResponse);
+ assertEquals(expectedEcompApps, actualEcompApps);
+ }
+
+ @Test
+ public void getPersUserAppsIfUserNotAdminTest() throws IOException {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ List<EcompApp> expectedEcompApps = new ArrayList<EcompApp>();
+
+ EcompApp ecompApp = new EcompApp();
+ ecompApp.setId((long) 1);
+ ecompApp.setName("Test_app");
+ ecompApp.setUrl("Test_URL");
+ ecompApp.setUebKey("Test_key");
+ ecompApp.setAlternateUrl("Test_alt_URL");
+ expectedEcompApps.add(ecompApp);
+ List<EcompApp> actualEcompApps = new ArrayList<EcompApp>();
+
+ List<EPApp> expectedApps = new ArrayList<EPApp>();
+
+ EPApp app = new EPApp();
+
+ app.setName("Test");
+ app.setImageUrl("test");
+ app.setDescription("test");
+ app.setNotes("test");
+ app.setUrl("test");
+ app.setId((long) 1);
+ app.setAppRestEndpoint("test");
+ app.setAlternateUrl("test");
+ app.setName("test");
+ app.setMlAppName("test");
+ app.setMlAppAdminId("test");
+ app.setUsername("test");
+ app.setAppPassword("test");
+ app.setOpen(false);
+ app.setEnabled(false);
+ app.setUebKey("test");
+ app.setUebSecret("test");
+ app.setUebTopicName("test");
+ app.setAppType(1);
+
+ expectedApps.add(app);
+
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+ Mockito.when(appService.getPersUserApps(user)).thenReturn(expectedApps);
+ Mockito.when(appService.transformAppsToEcompApps(expectedApps)).thenReturn(expectedEcompApps);
+ actualEcompApps = appsController.getPersUserApps(mockedRequest, mockedResponse);
+ assertEquals(expectedEcompApps, actualEcompApps);
+ }
+
+ @Test
+ public void getPersUserAppsIfUserNullTest() throws IOException {
+ EPUser user = null;
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ assertNull(appsController.getPersUserApps(mockedRequest, mockedResponse));
+ }
+
+ @Test
+ public void getPersUserAppsExceptionTest() throws IOException {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ Mockito.when(appService.getPersAdminApps(user)).thenThrow(nullPointerException);
+ assertNull(appsController.getPersUserApps(mockedRequest, mockedResponse));
+ }
+
+ @Test
+ public void getAdminAppsIfNotAdminTest() {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isAccountAdmin(user)).thenReturn(false);
+ assertNull(appsController.getAdminApps(mockedRequest, mockedResponse));
+ }
+
+ @Test
+ public void getAdminAppsTest() {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ List<AppIdAndNameTransportModel> expectedAdminApps = new ArrayList<AppIdAndNameTransportModel>();
+ AppIdAndNameTransportModel appIdAndNameTransportModel = new AppIdAndNameTransportModel();
+ appIdAndNameTransportModel.setId((long) 1);
+ appIdAndNameTransportModel.setName("Test_app");
+ expectedAdminApps.add(appIdAndNameTransportModel);
+ List<AppIdAndNameTransportModel> actualAdminApps = new ArrayList<AppIdAndNameTransportModel>();
+ Mockito.when(adminRolesService.isAccountAdmin(user)).thenReturn(true);
+ Mockito.when(appService.getAdminApps(user)).thenReturn(expectedAdminApps);
+ actualAdminApps = appsController.getAdminApps(mockedRequest, mockedResponse);
+ assertEquals(actualAdminApps, expectedAdminApps);
+
+ }
+
+ @Test
+ public void getAdminAppsExceptionTest() {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isAccountAdmin(user)).thenReturn(true);
+ Mockito.when(appService.getAdminApps(user)).thenThrow(nullPointerException);
+ assertNull(appsController.getAdminApps(mockedRequest, mockedResponse));
+ }
+
+ @Test
+ public void getAppsForSuperAdminAndAccountAdminifOnlyAccountAdminTest() {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+ Mockito.when(adminRolesService.isAccountAdmin(user)).thenReturn(false);
+ assertNull(appsController.getAppsForSuperAdminAndAccountAdmin(mockedRequest, mockedResponse));
+ }
+
+ @Test
+ public void getAppsForSuperAdminAndAccountAdminTest() {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ List<AppIdAndNameTransportModel> expectedAdminApps = new ArrayList<AppIdAndNameTransportModel>();
+ AppIdAndNameTransportModel appIdAndNameTransportModel = new AppIdAndNameTransportModel();
+ appIdAndNameTransportModel.setId((long) 1);
+ appIdAndNameTransportModel.setName("Test_app");
+ expectedAdminApps.add(appIdAndNameTransportModel);
+ List<AppIdAndNameTransportModel> actualAdminApps = new ArrayList<AppIdAndNameTransportModel>();
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ Mockito.when(adminRolesService.isAccountAdmin(user)).thenReturn(true);
+ Mockito.when(appService.getAppsForSuperAdminAndAccountAdmin(user)).thenReturn(expectedAdminApps);
+ actualAdminApps = appsController.getAppsForSuperAdminAndAccountAdmin(mockedRequest, mockedResponse);
+ assertEquals(actualAdminApps, expectedAdminApps);
+
+ }
+
+ @Test
+ public void getAppsForSuperAdminExceptionTest() {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ Mockito.when(adminRolesService.isAccountAdmin(user)).thenReturn(false);
+ Mockito.when(appService.getAppsForSuperAdminAndAccountAdmin(user)).thenThrow(nullPointerException);
+ assertNull(appsController.getAppsForSuperAdminAndAccountAdmin(mockedRequest, mockedResponse));
+ }
+
+ @Test
+ public void putUserAppsSortingManualTest() throws IOException {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ List<EPAppsManualPreference> ePAppsManualPreference = new ArrayList<EPAppsManualPreference>();
+ FieldsValidator expectedFieldValidator = new FieldsValidator();
+ expectedFieldValidator.setHttpStatusCode((long) 200);
+ expectedFieldValidator.setFields(null);
+ expectedFieldValidator.setErrorCode(null);
+ FieldsValidator actualFieldValidator = new FieldsValidator();
+ Mockito.when(appService.saveAppsSortManual(ePAppsManualPreference, user)).thenReturn(expectedFieldValidator);
+ actualFieldValidator = appsController.putUserAppsSortingManual(mockedRequest, ePAppsManualPreference,
+ mockedResponse);
+ assertEquals(actualFieldValidator, expectedFieldValidator);
+ }
+
+ @Test
+ public void putUserAppsSortingManualExceptionTest() throws IOException {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ List<EPAppsManualPreference> ePAppsManualPreference = new ArrayList<EPAppsManualPreference>();
+ Mockito.when(appService.saveAppsSortManual(ePAppsManualPreference, user)).thenThrow(nullPointerException);
+ assertNull(appsController.putUserAppsSortingManual(mockedRequest, ePAppsManualPreference, mockedResponse));
+ }
+
+ @Test
+ public void putUserWidgetsSortManualTest() throws IOException {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ List<EPWidgetsSortPreference> ePWidgetsSortPreference = new ArrayList<EPWidgetsSortPreference>();
+ FieldsValidator expectedFieldValidator = new FieldsValidator();
+ expectedFieldValidator.setHttpStatusCode((long) 200);
+ expectedFieldValidator.setFields(null);
+ expectedFieldValidator.setErrorCode(null);
+ FieldsValidator actualFieldValidator = new FieldsValidator();
+ Mockito.when(appService.saveWidgetsSortManual(ePWidgetsSortPreference, user))
+ .thenReturn(expectedFieldValidator);
+ actualFieldValidator = appsController.putUserWidgetsSortManual(mockedRequest, ePWidgetsSortPreference,
+ mockedResponse);
+ assertEquals(actualFieldValidator, expectedFieldValidator);
+ }
+
+ @Test
+ public void putUserWidgetsSortManualExceptionTest() throws IOException {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ List<EPAppsManualPreference> ePAppsManualPreference = new ArrayList<EPAppsManualPreference>();
+ Mockito.when(appService.saveAppsSortManual(ePAppsManualPreference, user)).thenThrow(nullPointerException);
+ assertNull(appsController.putUserAppsSortingManual(mockedRequest, ePAppsManualPreference, mockedResponse));
+ }
+
+ @Test
+ public void putUserWidgetsSortPrefTest() throws IOException {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ List<EPWidgetsSortPreference> ePWidgetsSortPreference = new ArrayList<EPWidgetsSortPreference>();
+ FieldsValidator expectedFieldValidator = new FieldsValidator();
+ expectedFieldValidator.setHttpStatusCode((long) 200);
+ expectedFieldValidator.setFields(null);
+ expectedFieldValidator.setErrorCode(null);
+ FieldsValidator actualFieldValidator = new FieldsValidator();
+ Mockito.when(appService.deleteUserWidgetSortPref(ePWidgetsSortPreference, user))
+ .thenReturn(expectedFieldValidator);
+ actualFieldValidator = appsController.putUserWidgetsSortPref(mockedRequest, ePWidgetsSortPreference,
+ mockedResponse);
+ assertEquals(actualFieldValidator, expectedFieldValidator);
+ }
+
+ @Test
+ public void putUserWidgetsSortPrefExceptionTest() throws IOException {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ List<EPWidgetsSortPreference> ePWidgetsSortPreference = new ArrayList<EPWidgetsSortPreference>();
+ Mockito.when(appService.deleteUserWidgetSortPref(ePWidgetsSortPreference, user))
+ .thenThrow(nullPointerException);
+ assertNull(appsController.putUserWidgetsSortPref(mockedRequest, ePWidgetsSortPreference, mockedResponse));
+ }
+
+ @Test
+ public void deleteUserAppSortManualTest() throws IOException {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ EPDeleteAppsManualSortPref epDeleteAppsManualSortPref = new EPDeleteAppsManualSortPref();
+
+ FieldsValidator expectedFieldValidator = new FieldsValidator();
+ expectedFieldValidator.setHttpStatusCode((long) 200);
+ expectedFieldValidator.setFields(null);
+ expectedFieldValidator.setErrorCode(null);
+ FieldsValidator actualFieldValidator = new FieldsValidator();
+ Mockito.when(appService.deleteUserAppSortManual(epDeleteAppsManualSortPref, user))
+ .thenReturn(expectedFieldValidator);
+ actualFieldValidator = appsController.deleteUserAppSortManual(mockedRequest, epDeleteAppsManualSortPref,
+ mockedResponse);
+ assertEquals(actualFieldValidator, expectedFieldValidator);
+ }
+
+ @Test
+ public void deleteUserAppSortManualExceptionTest() throws IOException {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ EPDeleteAppsManualSortPref epDeleteAppsManualSortPref = new EPDeleteAppsManualSortPref();
+ Mockito.when(appService.deleteUserAppSortManual(epDeleteAppsManualSortPref, user))
+ .thenThrow(nullPointerException);
+ assertNull(appsController.deleteUserAppSortManual(mockedRequest, epDeleteAppsManualSortPref, mockedResponse));
+ }
+
+ @Test
+ public void putUserAppsSortingPreferenceTest() throws IOException {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ EPAppsSortPreference userAppsValue = new EPAppsSortPreference();
+
+ FieldsValidator expectedFieldValidator = new FieldsValidator();
+ expectedFieldValidator.setHttpStatusCode((long) 200);
+ expectedFieldValidator.setFields(null);
+ expectedFieldValidator.setErrorCode(null);
+ FieldsValidator actualFieldValidator = new FieldsValidator();
+ Mockito.when(appService.saveAppsSortPreference(userAppsValue, user)).thenReturn(expectedFieldValidator);
+ actualFieldValidator = appsController.putUserAppsSortingPreference(mockedRequest, userAppsValue,
+ mockedResponse);
+ assertEquals(actualFieldValidator, expectedFieldValidator);
+ }
+
+ @Test
+ public void putUserAppsSortingPreferenceExceptionTest() throws IOException {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ EPAppsSortPreference userAppsValue = new EPAppsSortPreference();
+ Mockito.when(appService.saveAppsSortPreference(userAppsValue, user)).thenThrow(nullPointerException);
+ assertNull(appsController.putUserAppsSortingPreference(mockedRequest, userAppsValue, mockedResponse));
+ }
+
+ @Test
+ public void getUserAppsSortTypePreferenceTest() throws IOException {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ String expectedUserSortPreference = "TEST_DECE";
+ String actualUserSortPreference = new String();
+ Mockito.when(appService.getUserAppsSortTypePreference(user)).thenReturn(expectedUserSortPreference);
+ actualUserSortPreference = appsController.getUserAppsSortTypePreference(mockedRequest, mockedResponse);
+ assertEquals(actualUserSortPreference, expectedUserSortPreference);
+ }
+
+ @Test
+ public void getUserAppsSortTypePreferenceExceptionTest() throws IOException {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(appService.getUserAppsSortTypePreference(user)).thenThrow(nullPointerException);
+ assertNull(appsController.getUserAppsSortTypePreference(mockedRequest, mockedResponse));
+ }
+
+ @Test
+ public void getUserAppsSortTypePreferenceIfUserNullTest() throws IOException {
+ EPUser user = null;
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(appService.getUserAppsSortTypePreference(user)).thenThrow(nullPointerException);
+ assertNull(appsController.getUserAppsSortTypePreference(mockedRequest, mockedResponse));
+ }
+
+ @Test
+ public void getAppsAdministratorsTest() throws IOException {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ List<AdminUserApplications> expecteAdminUserApplications = new ArrayList<AdminUserApplications>();
+ List<AdminUserApplications> actualAdminUserApplications = new ArrayList<AdminUserApplications>();
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ Mockito.when(appService.getAppsAdmins()).thenReturn(expecteAdminUserApplications);
+ actualAdminUserApplications = appsController.getAppsAdministrators(mockedRequest, mockedResponse);
+ assertEquals(expecteAdminUserApplications, actualAdminUserApplications);
+ }
+
+ @Test
+ public void getAppsAdministratorsIfUserNotSuperAdminTest() throws IOException {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+ assertNull(appsController.getUserAppsSortTypePreference(mockedRequest, mockedResponse));
+ }
+
+ @Test
+ public void getAppsAdministratorsExceptionTest() throws IOException {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ Mockito.when(appService.getAppsAdmins()).thenThrow(nullPointerException);
+ assertNull(appsController.getUserAppsSortTypePreference(mockedRequest, mockedResponse));
+ }
+
+ @Test
+ public void getAppsTest() throws IOException {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ List<AppsResponse> expectedApps = new ArrayList<AppsResponse>();
+ AppsResponse apps = new AppsResponse((long) 1, "test", true, true);
+ expectedApps.add(apps);
+
+ List<AppsResponse> atualApps = new ArrayList<AppsResponse>();
+
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ Mockito.when(appService.getAllApps(false)).thenReturn(expectedApps);
+ atualApps = appsController.getApps(mockedRequest, mockedResponse);
+ assertEquals(expectedApps, atualApps);
+ }
+
+ @Test
+ public void getAppsExceptionTest() throws IOException {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+ assertNull(appsController.getApps(mockedRequest, mockedResponse));
+ }
+
+ @Test
+ public void getAppsIfUserNotSuperAdminTest() throws IOException {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ Mockito.when(appService.getAllApps(false)).thenThrow(nullPointerException);
+ assertNull(appsController.getApps(mockedRequest, mockedResponse));
+ }
+
+ @Test
+ public void getAllAppsTest() throws IOException {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ List<AppsResponse> expectedApps = new ArrayList<AppsResponse>();
+ AppsResponse apps = new AppsResponse((long) 1, "test", true, true);
+ expectedApps.add(apps);
+ List<AppsResponse> atualApps = new ArrayList<AppsResponse>();
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ Mockito.when(appService.getAllApps(true)).thenReturn(expectedApps);
+ atualApps = appsController.getAllApps(mockedRequest, mockedResponse);
+ assertEquals(expectedApps, atualApps);
+ }
+
+ @Test
+ public void getAllAppsExceptionTest() throws IOException {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+ assertNull(appsController.getAllApps(mockedRequest, mockedResponse));
+ }
+
+ @Test
+ public void getAllAppsIfUserNotSuperAdminTest() throws IOException {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ Mockito.when(appService.getAllApps(true)).thenThrow(nullPointerException);
+ assertNull(appsController.getAllApps(mockedRequest, mockedResponse));
+ }
+
+ @Test
+ public void getAppsFullListTest() {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ List<EcompApp> expectedEcompApps = new ArrayList<EcompApp>();
+
+ EcompApp ecompApp = new EcompApp();
+ ecompApp.setId((long) 1);
+ ecompApp.setName("Test_app");
+ ecompApp.setUrl("Test_URL");
+ ecompApp.setUebKey("Test_key");
+ ecompApp.setAlternateUrl("Test_alt_URL");
+ expectedEcompApps.add(ecompApp);
+ List<EcompApp> actualEcompApps = new ArrayList<EcompApp>();
+ Mockito.when(appService.getEcompAppAppsFullList()).thenReturn(expectedEcompApps);
+ actualEcompApps = appsController.getAppsFullList(mockedRequest, mockedResponse);
+ assertEquals(expectedEcompApps, actualEcompApps);
+ }
+
+// @Test
+// public void getAppsFullListNoUserTest() {
+// EPUser user = null;
+// Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+// Mockito.when(appService.getEcompAppAppsFullList()).thenReturn(null);
+// assertNull(appsController.getAppsFullList(mockedRequest, mockedResponse));
+//
+// }
+
+ @Test
+ public void getUserProfileTest() {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+
+ UserRole userRole = new UserRole();
+ userRole.setUser_Id((long) 1);
+ userRole.setOrgUserId("guest");
+ userRole.setFirstName("Test_User_FirstName");
+ userRole.setLastName("Test_User_LastName");
+ userRole.setRoleId((long) 1);
+ userRole.setRoleName("test");
+
+ UserRoles unexpectedserAndRoles = new UserRoles(userRole);
+ unexpectedserAndRoles.setFirstName("Test_User_FirstName");
+ unexpectedserAndRoles.setLastName("Test_User_LastName");
+ unexpectedserAndRoles.setGuestSession(false);
+ unexpectedserAndRoles.setOrgUserId("guest");
+ List<String> roles = new ArrayList<String>();
+ roles.add("Test");
+ unexpectedserAndRoles.setRoles(roles);
+ Mockito.when(appService.getUserProfileNormalized(user)).thenReturn(unexpectedserAndRoles);
+ UserRoles actualUserAndRoles = appsController.getUserProfile(mockedRequest, mockedResponse);
+ assertEquals(unexpectedserAndRoles, actualUserAndRoles);
+ }
+
+ @Test
+ public void getUserProfileIfUserNullTest() throws IOException {
+ EPUser user = null;
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(appService.getUserProfileNormalized(user)).thenReturn(null);
+ assertNull(appsController.getUserAppsSortTypePreference(mockedRequest, mockedResponse));
+ }
+
+ @Test
+ public void getUserProfileExcpetionTest() throws IOException {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(appService.getUserProfileNormalized(user)).thenThrow(nullPointerException);
+ assertNull(appsController.getUserAppsSortTypePreference(mockedRequest, mockedResponse));
+ }
+
+ @Test
+ public void getAppRolesTest() {
+ List<LocalRole> expectedRoleList = new ArrayList<LocalRole>();
+ LocalRole localRole = new LocalRole();
+ localRole.setRoleId(1);
+ localRole.setRolename("test");
+ expectedRoleList.add(localRole);
+ long appId = 1;
+ Mockito.when(appService.getAppRoles(appId)).thenReturn(expectedRoleList);
+ List<LocalRole> actualRoleList = appsController.getAppRoles(mockedRequest, appId);
+ assertEquals(actualRoleList, expectedRoleList);
+ }
+
+ @Test
+ public void getAppRolesExceptionTest() {
+ long appId = 1;
+ Mockito.when(appService.getAppRoles(appId)).thenThrow(nullPointerException);
+ assertNull(appsController.getAppRoles(mockedRequest, appId));
+ }
+
+ @Test
+ public void getOnboardingAppsTest() {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ List<OnboardingApp> expectedOnboardingApps = new ArrayList<OnboardingApp>();
+ OnboardingApp onboardingApp = new OnboardingApp();
+ onboardingApp.setUebKey("test");
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ Mockito.when(appService.getOnboardingApps()).thenReturn(expectedOnboardingApps);
+ List<OnboardingApp> actualOnboardingApps = appsController.getOnboardingApps(mockedRequest, mockedResponse);
+ assertEquals(expectedOnboardingApps, actualOnboardingApps);
+ }
+
+ @Test
+ public void getOnboardingAppsifSuperAdiminTest() {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+ assertNull(appsController.getOnboardingApps(mockedRequest, mockedResponse));
+ }
+
+ @Test
+ public void getOnboardingAppsExceptionTest() {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(!adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ Mockito.when(appService.getOnboardingApps()).thenThrow(nullPointerException);
+ assertNull(appsController.getOnboardingApps(mockedRequest, mockedResponse));
+ }
+
+ @Test
+ public void putOnboardingAppTest() {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ OnboardingApp OnboardingApp = new OnboardingApp();
+ FieldsValidator expectedFieldValidator = new FieldsValidator();
+ expectedFieldValidator.setHttpStatusCode((long) 200);
+ expectedFieldValidator.setFields(null);
+ expectedFieldValidator.setErrorCode(null);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ Mockito.when(appService.modifyOnboardingApp(OnboardingApp, user)).thenReturn(expectedFieldValidator);
+ FieldsValidator actualFieldValidator = appsController.putOnboardingApp(mockedRequest, OnboardingApp,
+ mockedResponse);
+ assertEquals(expectedFieldValidator, actualFieldValidator);
+ }
+
+ @Test
+ public void putOnboardingAppIfSuperAdminTest() {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ FieldsValidator expectedFieldValidator = null;
+ OnboardingApp OnboardingApp = new OnboardingApp();
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+ Mockito.when(appService.modifyOnboardingApp(OnboardingApp, user)).thenReturn(expectedFieldValidator);
+ assertNull(appsController.putOnboardingApp(mockedRequest, OnboardingApp, mockedResponse));
+ }
+
+ @Test
+ public void putOnboardingAppExceptionTest() {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ OnboardingApp OnboardingApp = new OnboardingApp();
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ Mockito.when(appService.modifyOnboardingApp(OnboardingApp, user)).thenThrow(nullPointerException);
+ assertNull(appsController.putOnboardingApp(mockedRequest, OnboardingApp, mockedResponse));
+ }
+
+ @Test
+ public void postOnboardingAppTest() {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ OnboardingApp OnboardingApp = new OnboardingApp();
+ FieldsValidator expectedFieldValidator = new FieldsValidator();
+ expectedFieldValidator.setHttpStatusCode((long) 200);
+ expectedFieldValidator.setFields(null);
+ expectedFieldValidator.setErrorCode(null);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ Mockito.when(appService.addOnboardingApp(OnboardingApp, user)).thenReturn(expectedFieldValidator);
+ FieldsValidator actualFieldValidator = appsController.postOnboardingApp(mockedRequest, OnboardingApp,
+ mockedResponse);
+ assertEquals(expectedFieldValidator, actualFieldValidator);
+ }
+
+ @Test
+ public void postOnboardingAppIfSuperAdminTest() {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ FieldsValidator expectedFieldValidator = null;
+ OnboardingApp OnboardingApp = new OnboardingApp();
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+ Mockito.when(appService.addOnboardingApp(OnboardingApp, user)).thenReturn(expectedFieldValidator);
+ assertNull(appsController.postOnboardingApp(mockedRequest, OnboardingApp, mockedResponse));
+ }
+
+ @Test
+ public void postOnboardingAppExceptionTest() {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ OnboardingApp OnboardingApp = new OnboardingApp();
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ Mockito.when(appService.addOnboardingApp(OnboardingApp, user)).thenThrow(nullPointerException);
+ assertNull(appsController.postOnboardingApp(mockedRequest, OnboardingApp, mockedResponse));
+ }
+
+ @Test
+ public void deleteOnboardingAppTest() {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ FieldsValidator expectedFieldValidator = new FieldsValidator();
+ expectedFieldValidator.setHttpStatusCode((long) 200);
+ expectedFieldValidator.setFields(null);
+ expectedFieldValidator.setErrorCode(null);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ long appId = 1;
+ Mockito.when(appService.deleteOnboardingApp(user,appId )).thenReturn(expectedFieldValidator);
+ FieldsValidator actualFieldValidator = appsController.deleteOnboardingApp(mockedRequest,appId,
+ mockedResponse);
+ assertEquals(expectedFieldValidator, actualFieldValidator);
+ }
+
+ @Test
+ public void deleteOnboardingAppIfSuperAdminTest() {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ FieldsValidator expectedFieldValidator = null;
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+ long appId = 1;
+ Mockito.when(appService.deleteOnboardingApp(user,appId)).thenReturn(expectedFieldValidator);
+ assertNull(appsController.deleteOnboardingApp(mockedRequest,appId,mockedResponse));
+ }
+
+ @Test
+ public void deleteOnboardingAppExceptionTest() {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ long appId = 1;
+ Mockito.when(appService.deleteOnboardingApp(user,appId)).thenThrow(nullPointerException);
+ assertNull(appsController.deleteOnboardingApp(mockedRequest,appId,mockedResponse));
+ }
+
+ @Test
+ public void getLeftMenuItemsTest()
+ {
+ EPUser user = mockUser.mockEPUser();
+ String menuList = "Test";
+ PowerMockito.mockStatic(EPUserUtils.class);
+ PowerMockito.mockStatic(SystemProperties.class);
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Set menuSet = new HashSet<>();
+ menuSet.add(1);
+ Mockito.when(AppUtils.getSession(mockedRequest)
+ .getAttribute(SystemProperties.getProperty(SystemProperties.APPLICATION_MENU_ATTRIBUTE_NAME))).thenReturn(menuSet);
+ Mockito.when(AppUtils.getSession(mockedRequest)
+ .getAttribute(SystemProperties.getProperty(SystemProperties.ROLE_FUNCTIONS_ATTRIBUTE_NAME))).thenReturn(menuSet);
+ Mockito.when(leftMenuService.getLeftMenuItems(user, menuSet, menuSet)).thenReturn(menuList);
+ String response = appsController.getLeftMenuItems(mockedRequest, mockedResponse);
+ assertTrue(response.equals("Test"));
+ }
+
+ @Test
+ public void getLeftMenuItemsExceptionTest()
+ {
+ EPUser user = mockUser.mockEPUser();
+ String menuList = "Test";
+ PowerMockito.mockStatic(EPUserUtils.class);
+ PowerMockito.mockStatic(SystemProperties.class);
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Set menuSet = new HashSet<>();
+ menuSet.add(1);
+ Mockito.when(AppUtils.getSession(mockedRequest)
+ .getAttribute(SystemProperties.getProperty(SystemProperties.APPLICATION_MENU_ATTRIBUTE_NAME))).thenReturn(menuSet);
+ Mockito.when(AppUtils.getSession(mockedRequest)
+ .getAttribute(SystemProperties.getProperty(SystemProperties.ROLE_FUNCTIONS_ATTRIBUTE_NAME))).thenReturn(menuSet);
+ Mockito.when(leftMenuService.getLeftMenuItems(user, menuSet, menuSet)).thenThrow(nullPointerException);
+ assertNull(appsController.getLeftMenuItems(mockedRequest, mockedResponse));
+ }
+
+ @Test
+ public void getAppThumbnailExceptionTest()
+ {
+ EPApp app = null;
+ assertNull(appsController.getAppThumbnail(mockedRequest, (long) 1, mockedResponse));
+ }
+
+ @Test
+ public void getAppThumbnailTest()
+ {
+ EPApp app = new EPApp();
+ app.setName("Test");
+ app.setImageUrl("test");
+ app.setDescription("test");
+ app.setNotes("test");
+ app.setUrl("test");
+ app.setId((long) 1);
+ app.setAppType(1);
+ app.setImageUrl("www.ecomp.com");
+ app.setThumbnail(new byte[] {1, 6, 3});
+ Mockito.when(appService.getApp((long) 1)).thenReturn(app);
+ HttpEntity<byte[]> response = appsController.getAppThumbnail(mockedRequest, (long) 1, mockedResponse);
+ assertEquals(response.getHeaders().getContentLength(), 3);
+ }
+
+ @Test
+ public void getAppThumbnailForMediaTypePngTest()
+ {
+
+ EPApp app = new EPApp();
+ app.setName("Test");
+ app.setImageUrl("test");
+ app.setDescription("test");
+ app.setNotes("test");
+ app.setUrl("test");
+ app.setId((long) 1);
+ app.setAppType(1);
+ app.setImageUrl("www.ecomp.png");
+ app.setThumbnail(new byte[] {1, 6, 3});
+ Mockito.when(appService.getApp((long) 1)).thenReturn(app);
+ PowerMockito.mockStatic(MediaType.class);
+ HttpEntity<byte[]> response = appsController.getAppThumbnail(mockedRequest, (long) 1, mockedResponse);
+ assertEquals(response.getHeaders().getContentLength(), 3);
+ }
+
+ @Test
+ public void getUserAppsOrderBySortPrefIfUSerNullTest(){
+ List<EcompApp> listOfApps = new ArrayList<EcompApp>();
+
+ EcompApp app = new EcompApp();
+ listOfApps.add(app);
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(null);
+ assertNull(appsController.getUserAppsOrderBySortPref(mockedRequest, mockedResponse));
+ }
+
+ @Test
+ public void getUserAppsOrderBySortPrefTest(){
+ List<EcompApp> listOfApps = new ArrayList<EcompApp>();
+
+ EcompApp app = new EcompApp();
+ listOfApps.add(app);
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(mockedRequest.getParameter("mparams")).thenReturn("");
+ Mockito.when(appService.transformAppsToEcompApps(appService.getAppsOrderByName(user))).thenReturn(listOfApps);
+ List<EcompApp> listOfActualApps = appsController.getUserAppsOrderBySortPref(mockedRequest, mockedResponse);
+ assertEquals(listOfActualApps.size(), 1);
+ }
+
+ @Test
+ public void getUserAppsOrderBySortPrefIfusrSortPrefIsMTest(){
+ List<EcompApp> listOfApps = new ArrayList<EcompApp>();
+
+ EcompApp app = new EcompApp();
+ listOfApps.add(app);
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(mockedRequest.getParameter("mparams")).thenReturn("M");
+ Mockito.when(appService.transformAppsToEcompApps(appService.getAppsOrderByName(user))).thenReturn(listOfApps);
+ List<EcompApp> listOfActualApps = appsController.getUserAppsOrderBySortPref(mockedRequest, mockedResponse);
+ assertEquals(listOfActualApps.size(), 1);
+ }
+
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/AuditLogControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/AuditLogControllerTest.java
new file mode 100644
index 00000000..971089ee
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/AuditLogControllerTest.java
@@ -0,0 +1,102 @@
+package org.openecomp.portalapp.portal.controller;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
+import org.openecomp.portalapp.portal.controller.AuditLogController;
+import org.openecomp.portalapp.portal.core.MockEPUser;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.util.EPUserUtils;
+import org.openecomp.portalsdk.core.service.AuditService;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest(EPUserUtils.class)
+public class AuditLogControllerTest {
+
+
+ @Mock
+ AuditService auditService;
+
+ @InjectMocks
+ AuditLogController auditLogController = new AuditLogController();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+ NullPointerException nullPointerException = new NullPointerException();
+ MockEPUser mockUser = new MockEPUser();
+ @Test
+ public void auditLogTest()
+ {
+ PowerMockito.mockStatic(EPUserUtils.class);
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(EPUserUtils.getUserId(mockedRequest)).thenReturn((int)1);
+ auditLogController.auditLog(mockedRequest, "1", "app", "test");
+ }
+
+ @Test
+ public void auditLogTabTest()
+ {
+ PowerMockito.mockStatic(EPUserUtils.class);
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(EPUserUtils.getUserId(mockedRequest)).thenReturn((int)1);
+ auditLogController.auditLog(mockedRequest, "1", "tab", "test");
+ }
+
+ @Test
+ public void auditLogfunctionalTest()
+ {
+ PowerMockito.mockStatic(EPUserUtils.class);
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(EPUserUtils.getUserId(mockedRequest)).thenReturn((int)1);
+ auditLogController.auditLog(mockedRequest, "1", "functional", "test");
+ }
+
+ @Test
+ public void auditLogleftMenuTest()
+ {
+ PowerMockito.mockStatic(EPUserUtils.class);
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(EPUserUtils.getUserId(mockedRequest)).thenReturn((int)1);
+ auditLogController.auditLog(mockedRequest, "1", "leftMenu", "test");
+ }
+
+ @Test(expected = NumberFormatException.class)
+ public void auditLogExceptionTest()
+ {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(EPUserUtils.getUserId(mockedRequest)).thenReturn((int)1);
+ auditLogController.auditLog(mockedRequest, "1", "app", "test");
+ }
+
+ @Test
+ public void auditLogerrorTest()
+ {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenThrow(nullPointerException);
+ auditLogController.auditLog(mockedRequest, "1", "app", "test");
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/BEPropertyReaderControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/BEPropertyReaderControllerTest.java
new file mode 100644
index 00000000..ec8d0e79
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/BEPropertyReaderControllerTest.java
@@ -0,0 +1,72 @@
+package org.openecomp.portalapp.portal.controller;
+
+import static org.junit.Assert.assertTrue;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
+import org.openecomp.portalapp.portal.controller.BEPropertyReaderController;
+import org.openecomp.portalapp.portal.domain.BEProperty;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest(SystemProperties.class)
+public class BEPropertyReaderControllerTest extends MockitoTestSuite {
+
+ @InjectMocks
+ BEPropertyReaderController bEPropertyReaderController = new BEPropertyReaderController();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+
+ NullPointerException nullPointerException = new NullPointerException();
+
+ @Test
+ public void readPropertyTest() {
+ String key = "DOMAIN_CLASS_LOCATION";
+ BEProperty beProperty = new BEProperty("DOMAIN_CLASS_LOCATION", "domain_class_location");
+ PortalRestResponse<BEProperty> ecpectedPortalRestResponse = new PortalRestResponse<BEProperty>();
+ ecpectedPortalRestResponse.setMessage("success");
+ ecpectedPortalRestResponse.setResponse(beProperty);
+ ecpectedPortalRestResponse.setStatus(PortalRestStatusEnum.OK);
+ PortalRestResponse<BEProperty> actualPortalRestResponse = null;
+ PowerMockito.mockStatic(SystemProperties.class);
+ Mockito.when(SystemProperties.getProperty("DOMAIN_CLASS_LOCATION")).thenReturn("domain_class_location");
+ actualPortalRestResponse = bEPropertyReaderController.readProperty(mockedRequest, key);
+ assertTrue(actualPortalRestResponse.equals(ecpectedPortalRestResponse));
+
+ }
+
+ @Test
+ public void readPropertyExceptionTest() {
+ String key =null;
+ //BEProperty beProperty = new BEProperty("DOMAIN_CLASS_LOCATION", "domain_class_location");
+ PortalRestResponse<BEProperty> ecpectedPortalRestResponse = new PortalRestResponse<BEProperty>();
+ ecpectedPortalRestResponse.setMessage("java.lang.NullPointerException");
+ ecpectedPortalRestResponse.setResponse(null);
+ ecpectedPortalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
+ PortalRestResponse<BEProperty> actualPortalRestResponse = null;
+ PowerMockito.mockStatic(SystemProperties.class);
+ Mockito.when(new BEProperty(key, SystemProperties.getProperty(key))).thenThrow(nullPointerException);
+ actualPortalRestResponse = bEPropertyReaderController.readProperty(mockedRequest, key);
+ assertTrue(actualPortalRestResponse.equals(ecpectedPortalRestResponse));
+
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/BasicAuthAccountControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/BasicAuthAccountControllerTest.java
new file mode 100644
index 00000000..793d6878
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/BasicAuthAccountControllerTest.java
@@ -0,0 +1,264 @@
+package org.openecomp.portalapp.portal.controller;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
+import org.openecomp.portalapp.portal.controller.BasicAuthAccountController;
+import org.openecomp.portalapp.portal.core.MockEPUser;
+import org.openecomp.portalapp.portal.domain.BasicAuthCredentials;
+import org.openecomp.portalapp.portal.domain.EPEndpoint;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.openecomp.portalapp.portal.service.AdminRolesService;
+import org.openecomp.portalapp.portal.service.AdminRolesServiceImpl;
+import org.openecomp.portalapp.portal.service.BasicAuthAccountService;
+import org.openecomp.portalapp.portal.service.BasicAuthAccountServiceImpl;
+import org.openecomp.portalapp.util.EPUserUtils;
+
+public class BasicAuthAccountControllerTest extends MockitoTestSuite {
+
+ @Mock
+ BasicAuthAccountService basicAuthAccountService = new BasicAuthAccountServiceImpl();
+
+ @Mock
+ AdminRolesService adminRolesService = new AdminRolesServiceImpl();
+
+ @InjectMocks
+ BasicAuthAccountController basicAuthAccountController = new BasicAuthAccountController();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+ NullPointerException nullPointerException = new NullPointerException();
+
+ @Mock
+ EPUserUtils ePUserUtils = new EPUserUtils();
+
+ MockEPUser mockUser = new MockEPUser();
+
+ public BasicAuthCredentials basicAuthCredentials() {
+ BasicAuthCredentials basicAuthCredentials = new BasicAuthCredentials();
+
+ basicAuthCredentials.setId((long) 1);
+ basicAuthCredentials.setApplicationName("test");
+ basicAuthCredentials.setUsername("Test");
+ basicAuthCredentials.setPassword("Password");
+ basicAuthCredentials.setIsActive("YES");
+
+ List<EPEndpoint> endpoints = new ArrayList<EPEndpoint>();
+
+ EPEndpoint ePEndpoint = new EPEndpoint();
+ ePEndpoint.setId((long) 1);
+ ePEndpoint.setName("Test");
+ endpoints.add(ePEndpoint);
+ basicAuthCredentials.setEndpoints(endpoints);
+
+ return basicAuthCredentials;
+
+ }
+
+ @Test
+ public void createBasicAuthAccountTest() throws Exception {
+ BasicAuthCredentials basicAuthCredentials = basicAuthCredentials();
+
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ PortalRestResponse<String> expectedResponse = new PortalRestResponse<String>();
+ expectedResponse.setMessage("SUCCESS");
+ expectedResponse.setResponse("");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedResponse.setStatus(portalRestStatusEnum.OK);
+ long accountd = 1;
+
+ Mockito.when(basicAuthAccountService.saveBasicAuthAccount(basicAuthCredentials)).thenReturn(accountd);
+
+ PortalRestResponse<String> actualResponse = basicAuthAccountController.createBasicAuthAccount(mockedRequest,
+ mockedResponse, basicAuthCredentials);
+ assertEquals(actualResponse, expectedResponse);
+ }
+
+ @Test
+ public void createBasicAuthAccountAdminTest() throws Exception {
+ BasicAuthCredentials basicAuthCredentials = basicAuthCredentials();
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+ PortalRestResponse<String> expectedResponse = new PortalRestResponse<String>();
+ expectedResponse.setMessage("Authorization Required");
+ expectedResponse.setResponse("Admin Only Operation! ");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedResponse.setStatus(portalRestStatusEnum.ERROR);
+
+ PortalRestResponse<String> actualResponse = basicAuthAccountController.createBasicAuthAccount(mockedRequest,
+ mockedResponse, basicAuthCredentials);
+ assertEquals(actualResponse, expectedResponse);
+ }
+
+ @Test
+ public void createBasicAuthAccountIfInputNullTest() throws Exception {
+ BasicAuthCredentials basicAuthCredentials = null;
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ PortalRestResponse<String> expectedResponse = new PortalRestResponse<String>();
+ expectedResponse.setMessage("FAILURE");
+ expectedResponse.setResponse("newBasicAuthAccount cannot be null or empty");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedResponse.setStatus(portalRestStatusEnum.ERROR);
+ PortalRestResponse<String> actualResponse = basicAuthAccountController.createBasicAuthAccount(mockedRequest,
+ mockedResponse, basicAuthCredentials);
+ assertEquals(actualResponse, expectedResponse);
+ }
+
+ @Test
+ public void getBasicAuthAccountTest() throws Exception {
+ PortalRestResponse<List<BasicAuthCredentials>> expectedPortalResponse = new PortalRestResponse<List<BasicAuthCredentials>>();
+ List<BasicAuthCredentials> basicAuthCredentialsList = new ArrayList<BasicAuthCredentials>();
+ BasicAuthCredentials basicAuthCredentials = basicAuthCredentials();
+ basicAuthCredentialsList.add(basicAuthCredentials);
+
+ expectedPortalResponse.setMessage("Success");
+ expectedPortalResponse.setResponse(null);
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedPortalResponse.setStatus(portalRestStatusEnum.OK);
+
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ Mockito.when(basicAuthAccountService.getAccountData()).thenReturn(null);
+ PortalRestResponse<List<BasicAuthCredentials>> actualResponse = basicAuthAccountController
+ .getBasicAuthAccount(mockedRequest, mockedResponse);
+ assertEquals(expectedPortalResponse, actualResponse);
+ }
+
+ @Test
+ public void getBasicAuthAccountIfSuperAdminTest() throws Exception {
+ PortalRestResponse<List<BasicAuthCredentials>> expectedPortalResponse = new PortalRestResponse<List<BasicAuthCredentials>>();
+ List<BasicAuthCredentials> basicAuthCredentialsList = new ArrayList<BasicAuthCredentials>();
+ BasicAuthCredentials basicAuthCredentials = basicAuthCredentials();
+ basicAuthCredentialsList.add(basicAuthCredentials);
+
+ expectedPortalResponse.setMessage("UnAuthorized! Admin Only Operation");
+ expectedPortalResponse.setResponse(new ArrayList<>());
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedPortalResponse.setStatus(portalRestStatusEnum.ERROR);
+
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+ Mockito.when(basicAuthAccountService.getAccountData()).thenReturn(null);
+ PortalRestResponse<List<BasicAuthCredentials>> actualResponse = basicAuthAccountController
+ .getBasicAuthAccount(mockedRequest, mockedResponse);
+ assertEquals(expectedPortalResponse, actualResponse);
+ }
+
+ @Test
+ public void updateAccountTest() throws Exception {
+ BasicAuthCredentials basicAuthCredentials = basicAuthCredentials();
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ PortalRestResponse<String> expectedResponse = new PortalRestResponse<String>();
+ expectedResponse.setMessage("SUCCESS");
+ expectedResponse.setResponse("");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedResponse.setStatus(portalRestStatusEnum.OK);
+ long accountd = 1;
+ PortalRestResponse<String> actualResponse = basicAuthAccountController.updateAccount(mockedRequest,
+ mockedResponse, accountd, basicAuthCredentials);
+ assertEquals(actualResponse, expectedResponse);
+ }
+
+ @Test
+ public void updateAccountIfSuperAdminTest() throws Exception {
+ BasicAuthCredentials basicAuthCredentials = basicAuthCredentials();
+
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+ PortalRestResponse<String> expectedResponse = new PortalRestResponse<String>();
+ expectedResponse.setMessage("Authorization Required");
+ expectedResponse.setResponse("Admin Only Operation! ");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedResponse.setStatus(portalRestStatusEnum.ERROR);
+ long accountd = 1;
+ PortalRestResponse<String> actualResponse = basicAuthAccountController.updateAccount(mockedRequest,
+ mockedResponse, accountd, basicAuthCredentials);
+ assertEquals(actualResponse, expectedResponse);
+ }
+
+ @Test
+ public void updateAccountIfInputNullTest() throws Exception {
+ BasicAuthCredentials basicAuthCredentials = null;
+
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ PortalRestResponse<String> expectedResponse = new PortalRestResponse<String>();
+ expectedResponse.setMessage("FAILURE");
+ expectedResponse.setResponse("BasicAuthCredentials cannot be null or empty");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedResponse.setStatus(portalRestStatusEnum.ERROR);
+ long accountd = 1;
+ PortalRestResponse<String> actualResponse = basicAuthAccountController.updateAccount(mockedRequest,
+ mockedResponse, accountd, basicAuthCredentials);
+ assertEquals(actualResponse, expectedResponse);
+ }
+
+ @Test
+ public void deleteAccountTest() throws Exception {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+
+ PortalRestResponse<String> expectedResponse = new PortalRestResponse<String>();
+ expectedResponse.setMessage("SUCCESS");
+ expectedResponse.setResponse("");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedResponse.setStatus(portalRestStatusEnum.OK);
+ long accountd = 1;
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ PortalRestResponse<String> actualResponse = basicAuthAccountController.deleteAccount(mockedRequest,
+ mockedResponse, accountd);
+ assertEquals(actualResponse, expectedResponse);
+ }
+
+ @Test
+ public void deleteAccountIfNotSuperAdminTest() throws Exception {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+
+ PortalRestResponse<String> expectedResponse = new PortalRestResponse<String>();
+ expectedResponse.setMessage("Authorization Required");
+ expectedResponse.setResponse("Admin Only Operation! ");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedResponse.setStatus(portalRestStatusEnum.ERROR);
+ long accountd = 1;
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+ PortalRestResponse<String> actualResponse = basicAuthAccountController.deleteAccount(mockedRequest,
+ mockedResponse, accountd);
+ System.out.println(actualResponse);
+ assertEquals(actualResponse, expectedResponse);
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/CommonWidgetControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/CommonWidgetControllerTest.java
new file mode 100644
index 00000000..d6d149a4
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/CommonWidgetControllerTest.java
@@ -0,0 +1,84 @@
+package org.openecomp.portalapp.portal.controller;
+
+import static org.junit.Assert.assertTrue;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
+import org.openecomp.portalapp.portal.controller.CommonWidgetController;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.openecomp.portalapp.portal.service.DashboardSearchService;
+import org.openecomp.portalapp.portal.service.DashboardSearchServiceImpl;
+import org.openecomp.portalapp.portal.transport.CommonWidgetMeta;
+
+public class CommonWidgetControllerTest {
+
+ @Mock
+ DashboardSearchService dashboardSearchService = new DashboardSearchServiceImpl();
+
+ @InjectMocks
+ CommonWidgetController commonWidgetController = new CommonWidgetController();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+ NullPointerException nullPointerException = new NullPointerException();
+
+ @SuppressWarnings("unchecked")
+ @Test
+ public void getWidgetDataTest() {
+ String resourceType = "Test";
+ PortalRestResponse<CommonWidgetMeta> acutualPoratlRestResponse = null;
+ @SuppressWarnings("rawtypes")
+ PortalRestResponse ecpectedPortalRestResponse = new PortalRestResponse();
+ ecpectedPortalRestResponse.setMessage("Unexpected resource type Test");
+ ecpectedPortalRestResponse.setResponse(null);
+ ecpectedPortalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
+ acutualPoratlRestResponse = commonWidgetController.getWidgetData(mockedRequest, resourceType);
+ assertTrue(acutualPoratlRestResponse.equals(ecpectedPortalRestResponse));
+
+ }
+
+ @SuppressWarnings("unchecked")
+ @Test
+ public void getWidgetDataTestNew() {
+ String resourceType = "EVENTS";
+ PortalRestResponse<CommonWidgetMeta> acutualPoratlRestResponse = null;
+ @SuppressWarnings("rawtypes")
+ PortalRestResponse ecpectedPortalRestResponse = new PortalRestResponse();
+ ecpectedPortalRestResponse.setMessage("success");
+ ecpectedPortalRestResponse.setResponse(null);
+ ecpectedPortalRestResponse.setStatus(PortalRestStatusEnum.OK);
+ acutualPoratlRestResponse = commonWidgetController.getWidgetData(mockedRequest, resourceType);
+ assertTrue(acutualPoratlRestResponse.equals(ecpectedPortalRestResponse));
+
+ }
+
+ @SuppressWarnings("unchecked")
+ @Test
+ public void getWidgetDataExceptionTest() {
+ String resourceType = "null";
+ PortalRestResponse<CommonWidgetMeta> acutualPoratlRestResponse = null;
+ @SuppressWarnings("rawtypes")
+ PortalRestResponse ecpectedPortalRestResponse = new PortalRestResponse();
+ ecpectedPortalRestResponse.setMessage("Unexpected resource type null");
+ ecpectedPortalRestResponse.setResponse(null);
+ ecpectedPortalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
+ acutualPoratlRestResponse = commonWidgetController.getWidgetData(mockedRequest, resourceType);
+ assertTrue(acutualPoratlRestResponse.equals(ecpectedPortalRestResponse));
+
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/ConsulClientControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/ConsulClientControllerTest.java
new file mode 100644
index 00000000..672f4212
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/ConsulClientControllerTest.java
@@ -0,0 +1,142 @@
+package org.openecomp.portalapp.portal.controller;
+
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
+import org.openecomp.portalapp.portal.controller.ConsulClientController;
+import org.openecomp.portalapp.portal.domain.BEProperty;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.openecomp.portalapp.portal.service.ConsulHealthService;
+import org.openecomp.portalapp.portal.service.ConsulHealthServiceImpl;
+
+import com.orbitz.consul.ConsulException;
+import com.orbitz.consul.model.health.ServiceHealth;
+
+import io.searchbox.client.config.exception.NoServerConfiguredException;
+
+public class ConsulClientControllerTest {
+
+ @Mock
+ ConsulHealthService consulHealthService = new ConsulHealthServiceImpl();
+
+ @InjectMocks
+ ConsulClientController consulClientController = new ConsulClientController();
+
+ NoServerConfiguredException noServerConfiguredException = new NoServerConfiguredException(null);
+
+ String service = "Test";
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+ NullPointerException nullPointerException = new NullPointerException();
+ ConsulException consulException = new ConsulException(nullPointerException);
+
+ @Test
+ public void getServiceLocationTest() {
+ PortalRestResponse<BEProperty> ecpectedPortalRestResponse = new PortalRestResponse<BEProperty>();
+ ecpectedPortalRestResponse.setMessage("Success!");
+ ecpectedPortalRestResponse.setResponse(null);
+ ecpectedPortalRestResponse.setStatus(PortalRestStatusEnum.OK);
+ PortalRestResponse<String> actualPortalRestRespone = new PortalRestResponse<String>();
+ actualPortalRestRespone = consulClientController.getServiceLocation(mockedRequest, mockedResponse, service);
+ assertTrue(actualPortalRestRespone.equals(ecpectedPortalRestResponse));
+ }
+
+ @Test
+ public void getServiceLocationExceptionTest() {
+ PortalRestResponse<BEProperty> ecpectedPortalRestResponse = new PortalRestResponse<BEProperty>();
+ ecpectedPortalRestResponse.setMessage("Warning!");
+ ecpectedPortalRestResponse.setStatus(PortalRestStatusEnum.WARN);
+ PortalRestResponse<String> actualPortalRestRespone = new PortalRestResponse<String>();
+ Mockito.when(consulHealthService.getServiceLocation(service, null)).thenThrow(noServerConfiguredException);
+ actualPortalRestRespone = consulClientController.getServiceLocation(mockedRequest, mockedResponse, service);
+ assertTrue(actualPortalRestRespone.getMessage().equals(ecpectedPortalRestResponse.getMessage()));
+ assertTrue(actualPortalRestRespone.getStatus().equals(ecpectedPortalRestResponse.getStatus()));
+
+ }
+
+ @Test
+ public void getServiceLocationExceptionConsulExceptionTest() {
+ PortalRestResponse<BEProperty> ecpectedPortalRestResponse = new PortalRestResponse<BEProperty>();
+ ecpectedPortalRestResponse.setMessage("Error!");
+ ecpectedPortalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
+ PortalRestResponse<String> actualPortalRestRespone = new PortalRestResponse<String>();
+ Mockito.when(consulHealthService.getServiceLocation(service, null)).thenThrow(consulException);
+ actualPortalRestRespone = consulClientController.getServiceLocation(mockedRequest, mockedResponse, service);
+ assertTrue(actualPortalRestRespone.getMessage().equals(ecpectedPortalRestResponse.getMessage()));
+ assertTrue(actualPortalRestRespone.getStatus().equals(ecpectedPortalRestResponse.getStatus()));
+ }
+
+ public PortalRestResponse<List<ServiceHealth>> successResponse() {
+ PortalRestResponse<List<ServiceHealth>> ecpectedPortalRestResponse = new PortalRestResponse<List<ServiceHealth>>();
+ List<ServiceHealth> healths = new ArrayList<ServiceHealth>();
+ ecpectedPortalRestResponse.setMessage("Success!");
+ ecpectedPortalRestResponse.setResponse(healths);
+ ecpectedPortalRestResponse.setStatus(PortalRestStatusEnum.OK);
+ return ecpectedPortalRestResponse;
+ }
+
+ public PortalRestResponse<List<ServiceHealth>> errorResponse() {
+ PortalRestResponse<List<ServiceHealth>> ecpectedPortalRestResponse = new PortalRestResponse<List<ServiceHealth>>();
+ List<ServiceHealth> healths = new ArrayList<ServiceHealth>();
+ ecpectedPortalRestResponse.setMessage("Error!");
+ ecpectedPortalRestResponse.setResponse(healths);
+ ecpectedPortalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
+ return ecpectedPortalRestResponse;
+ }
+
+ @Test
+ public void getAllHealthyNodesTest() {
+ PortalRestResponse<List<ServiceHealth>> ecpectedPortalRestResponse = successResponse();
+ PortalRestResponse<List<ServiceHealth>> actualPortalRestRespone = new PortalRestResponse<List<ServiceHealth>>();
+ actualPortalRestRespone = consulClientController.getAllHealthyNodes(mockedRequest, mockedResponse, service);
+ assertTrue(actualPortalRestRespone.equals(ecpectedPortalRestResponse));
+
+ }
+
+ @Test
+ public void getAllHealthyNodesExceptionTest() {
+ PortalRestResponse<List<ServiceHealth>> ecpectedPortalRestResponse = errorResponse();
+ PortalRestResponse<List<ServiceHealth>> actualPortalRestRespone = new PortalRestResponse<List<ServiceHealth>>();
+ Mockito.when(consulHealthService.getAllHealthyNodes(service)).thenThrow(consulException);
+ actualPortalRestRespone = consulClientController.getAllHealthyNodes(mockedRequest, mockedResponse, service);
+ assertTrue(actualPortalRestRespone.equals(ecpectedPortalRestResponse));
+ }
+
+ @Test
+ public void getAllNodesTest() {
+ PortalRestResponse<List<ServiceHealth>> ecpectedPortalRestResponse = successResponse();
+ PortalRestResponse<List<ServiceHealth>> actualPortalRestRespone = new PortalRestResponse<List<ServiceHealth>>();
+ actualPortalRestRespone = consulClientController.getAllNodes(mockedRequest, mockedResponse, service);
+ assertTrue(actualPortalRestRespone.equals(ecpectedPortalRestResponse));
+ }
+
+ @Test
+ public void getAllNodesExceptionTest() {
+ PortalRestResponse<List<ServiceHealth>> ecpectedPortalRestResponse = errorResponse();
+ PortalRestResponse<List<ServiceHealth>> actualPortalRestRespone = new PortalRestResponse<List<ServiceHealth>>();
+ Mockito.when(consulHealthService.getAllNodes(service)).thenThrow(consulException);
+ actualPortalRestRespone = consulClientController.getAllNodes(mockedRequest, mockedResponse, service);
+ assertTrue(actualPortalRestRespone.equals(ecpectedPortalRestResponse));
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/DashboardControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/DashboardControllerTest.java
new file mode 100644
index 00000000..d861955c
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/DashboardControllerTest.java
@@ -0,0 +1,427 @@
+package org.openecomp.portalapp.portal.controller;
+
+import static org.junit.Assert.assertEquals;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
+import org.openecomp.portalapp.portal.controller.DashboardController;
+import org.openecomp.portalapp.portal.core.MockEPUser;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.openecomp.portalapp.portal.service.DashboardSearchService;
+import org.openecomp.portalapp.portal.service.DashboardSearchServiceImpl;
+import org.openecomp.portalapp.portal.transport.CommonWidget;
+import org.openecomp.portalapp.portal.transport.CommonWidgetMeta;
+import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;
+import org.openecomp.portalapp.util.EPUserUtils;
+import org.openecomp.portalsdk.core.domain.support.CollaborateList;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest({EPUserUtils.class, CollaborateList.class, SystemProperties.class, EPCommonSystemProperties.class})
+public class DashboardControllerTest {
+
+ @Mock
+ DashboardSearchService searchService = new DashboardSearchServiceImpl();
+
+ @InjectMocks
+ DashboardController dashboardController = new DashboardController();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+
+ NullPointerException nullPointerException = new NullPointerException();
+
+ MockEPUser mockUser = new MockEPUser();
+
+ public CommonWidgetMeta mockCommonWidgetMeta() {
+ CommonWidgetMeta commonWidgetMeta= new CommonWidgetMeta();
+ List<CommonWidget> widgetList = new ArrayList<>();
+ CommonWidget commonWidget = new CommonWidget();
+ commonWidget.setId((long) 1);
+ commonWidget.setCategory("test");
+ commonWidget.setHref("testhref");
+ commonWidget.setTitle("testTitle");
+ commonWidget.setContent("testcontent");
+ commonWidget.setEventDate("testDate");
+ commonWidget.setSortOrder(1);
+ widgetList.add(commonWidget);
+ commonWidgetMeta.setItems(widgetList);
+
+ return commonWidgetMeta;
+ }
+
+ public CommonWidget mockCommonWidget() {
+
+ CommonWidget commonWidget = new CommonWidget();
+ commonWidget.setId((long) 1);
+ commonWidget.setCategory("test");
+ commonWidget.setHref("testhref");
+ commonWidget.setTitle("testTitle");
+ commonWidget.setContent("testcontent");
+ commonWidget.setEventDate("testDate");
+ commonWidget.setSortOrder(1);
+
+ return commonWidget;
+ }
+
+
+ @Test
+ public void getWidgetDataTest() throws IOException {
+
+ String resourceType = null;
+ PortalRestResponse<CommonWidgetMeta> expectedData = new PortalRestResponse<CommonWidgetMeta>();
+ expectedData.setStatus(PortalRestStatusEnum.ERROR);
+ expectedData.setMessage("Unexpected resource type null");
+ expectedData.setResponse(null);
+
+ PortalRestResponse<CommonWidgetMeta> actualResponse = dashboardController.getWidgetData(mockedRequest, resourceType);
+ assertEquals(expectedData,actualResponse);
+ }
+
+ @Test
+ public void getWidgetDataWithValidResourceTest() throws IOException {
+ String resourceType = "EVENTS";
+ CommonWidgetMeta commonWidgetMeta= mockCommonWidgetMeta();
+ commonWidgetMeta.setCategory(null);
+
+ Mockito.when(searchService.getWidgetData(resourceType)).thenReturn(commonWidgetMeta);
+ PortalRestResponse<CommonWidgetMeta> expectedData = new PortalRestResponse<CommonWidgetMeta>();
+ expectedData.setStatus(PortalRestStatusEnum.OK);
+ expectedData.setMessage("success");
+ expectedData.setResponse(commonWidgetMeta);
+
+ PortalRestResponse<CommonWidgetMeta> actualResponse = dashboardController.getWidgetData(mockedRequest, resourceType);
+ System.out.println(actualResponse);
+ assertEquals(expectedData,actualResponse);
+ }
+
+ @Test
+ public void saveWidgetDataBulkNullTest() throws IOException {
+ CommonWidgetMeta commonWidgetMeta= mockCommonWidgetMeta();
+ commonWidgetMeta.setCategory(null);
+
+ PortalRestResponse<String> expectedData = new PortalRestResponse<String>();
+ expectedData.setStatus(PortalRestStatusEnum.ERROR);
+ expectedData.setMessage("ERROR");
+ expectedData.setResponse("Category cannot be null or empty");
+
+ PortalRestResponse<String> actualResponse = dashboardController.saveWidgetDataBulk(commonWidgetMeta);
+ assertEquals(expectedData,actualResponse);
+ }
+
+ @Test
+ public void saveWidgetUnexpectedDataBulkTest() throws IOException {
+ CommonWidgetMeta commonWidgetMeta= mockCommonWidgetMeta();
+ commonWidgetMeta.setCategory("Unexpected Data");
+
+ PortalRestResponse<String> expectedData = new PortalRestResponse<String>();
+ expectedData.setStatus(PortalRestStatusEnum.ERROR);
+ expectedData.setMessage("Unexpected resource type Unexpected Data");
+ expectedData.setResponse(null);
+
+ PortalRestResponse<String> actualResponse = dashboardController.saveWidgetDataBulk(commonWidgetMeta);
+ assertEquals(expectedData,actualResponse);
+
+ }
+
+ @Test
+ public void saveWidgetInvalidDataBulkTest() throws IOException {
+ CommonWidgetMeta commonWidgetMeta= mockCommonWidgetMeta();
+ commonWidgetMeta.setCategory("EVENTS");
+
+ PortalRestResponse<String> expectedData = new PortalRestResponse<String>();
+ expectedData.setStatus(PortalRestStatusEnum.ERROR);
+ expectedData.setMessage("Invalid category: test");
+ expectedData.setResponse(null);
+
+ PortalRestResponse<String> actualResponse = dashboardController.saveWidgetDataBulk(commonWidgetMeta);
+ assertEquals(expectedData,actualResponse);
+ }
+
+ @Test
+ public void saveWidgetDataBulkTest() throws IOException {
+
+ List<CommonWidget> widgetList = new ArrayList<>();
+ CommonWidget commonWidget = new CommonWidget("EVENTS", "http://test.com", "testTitle", "testcontent", "2017-07-01", 1);
+ widgetList.add(commonWidget);
+ CommonWidgetMeta commonWidgetMeta= new CommonWidgetMeta("EVENTS", widgetList);
+
+
+
+ /* commonWidgetMeta.setItems(widgetList);
+
+ commonWidgetMeta.setCategory("EVENTS");*/
+
+ PortalRestResponse<String> expectedData = new PortalRestResponse<String>();
+ expectedData.setStatus(PortalRestStatusEnum.OK);
+ expectedData.setMessage("success");
+ expectedData.setResponse("success");
+
+ Mockito.when(searchService.saveWidgetDataBulk(commonWidgetMeta)).thenReturn("success");
+
+ PortalRestResponse<String> actualResponse = dashboardController.saveWidgetDataBulk(commonWidgetMeta);
+ assertEquals(expectedData,actualResponse);
+ }
+
+ @Test
+ public void saveWidgetDataNullTest() throws IOException {
+
+ CommonWidget commonWidget = mockCommonWidget();
+ commonWidget.setId((long)1);
+ commonWidget.setContent("test");
+ commonWidget.setCategory(null);
+ PortalRestResponse<String> expectedData = new PortalRestResponse<String>();
+ expectedData.setStatus(PortalRestStatusEnum.ERROR);
+ expectedData.setMessage("ERROR");
+ expectedData.setResponse("Category cannot be null or empty");
+
+ PortalRestResponse<String> actualResponse = dashboardController.saveWidgetData(commonWidget);
+ assertEquals(expectedData,actualResponse);
+
+ }
+
+ @Test
+ public void saveWidgetDataErrorTest() throws IOException {
+
+ CommonWidget commonWidget = mockCommonWidget();
+ PortalRestResponse<String> expectedData = new PortalRestResponse<String>();
+ expectedData.setStatus(PortalRestStatusEnum.ERROR);
+ expectedData.setMessage("Invalid category: test");
+ expectedData.setResponse(null);
+
+ PortalRestResponse<String> actualResponse = dashboardController.saveWidgetData(commonWidget);
+ assertEquals(expectedData,actualResponse);
+ }
+
+ @Test
+ public void saveWidgetDataTest() throws IOException {
+
+ CommonWidgetMeta commonWidgetMeta= new CommonWidgetMeta();
+ List<CommonWidget> widgetList = new ArrayList<>();
+ CommonWidget commonWidget = new CommonWidget();
+ commonWidget.setId((long) 1);
+ commonWidget.setCategory("EVENTS");
+ commonWidget.setHref("http://test.com");
+ commonWidget.setTitle("testTitle");
+ commonWidget.setContent("testcontent");
+ commonWidget.setEventDate("2017-07-01");
+ commonWidget.setSortOrder(1);
+ widgetList.add(commonWidget);
+ commonWidgetMeta.setItems(widgetList);
+
+ commonWidgetMeta.setCategory("EVENTS");
+
+ PortalRestResponse<String> expectedData = new PortalRestResponse<String>();
+ expectedData.setStatus(PortalRestStatusEnum.OK);
+ expectedData.setMessage("success");
+ expectedData.setResponse("success");
+
+ Mockito.when(searchService.saveWidgetData(commonWidget)).thenReturn("success");
+
+ PortalRestResponse<String> actualResponse = dashboardController.saveWidgetData(commonWidget);
+ assertEquals(expectedData,actualResponse);
+
+ }
+
+ @Test
+ public void deleteWidgetDataTest() throws IOException {
+
+ CommonWidget commonWidget = mockCommonWidget();
+
+ PortalRestResponse<String> expectedData = new PortalRestResponse<String>();
+ expectedData.setStatus(PortalRestStatusEnum.OK);
+ expectedData.setMessage("success");
+ expectedData.setResponse(null);
+
+ Mockito.when(searchService.saveWidgetData(commonWidget)).thenReturn("success");
+
+ PortalRestResponse<String> actualResponse = dashboardController.deleteWidgetData(commonWidget);
+ assertEquals(expectedData,actualResponse);
+
+ }
+
+ @Test
+ public void getActiveUsersTest(){
+ List<String> activeUsers = new ArrayList<>();
+ List<String> expectedUsersList = new ArrayList<>();
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ String userId = user.getOrgUserId();
+ Mockito.when(searchService.getRelatedUsers(userId)).thenReturn(activeUsers);
+ expectedUsersList= dashboardController.getActiveUsers(mockedRequest);
+ assertEquals(expectedUsersList, activeUsers);
+ }
+
+
+ @Test
+ public void getActiveUsersExceptionTest(){
+ List<String> activeUsers = new ArrayList<>();
+ List<String> expectedUsersList = new ArrayList<>();
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ String userId = user.getOrgUserId();
+ Mockito.when(searchService.getRelatedUsers(userId)).thenThrow(nullPointerException);
+ expectedUsersList = dashboardController.getActiveUsers(mockedRequest);
+ assertEquals(expectedUsersList, activeUsers);
+ }
+
+ @Test
+ public void getOnlineUserUpdateRateTest(){
+ PortalRestResponse<String> expectedData = new PortalRestResponse<String>();
+ expectedData.setStatus(PortalRestStatusEnum.OK);
+ expectedData.setMessage("success");
+ expectedData.setResponse("{onlineUserUpdateRate=1400000, onlineUserUpdateDuration=1400000}");
+
+ PowerMockito.mockStatic(SystemProperties.class);
+ PowerMockito.mockStatic(EPCommonSystemProperties.class);
+ Mockito.when(SystemProperties.getProperty(EPCommonSystemProperties.ONLINE_USER_UPDATE_RATE)).thenReturn("1400");
+ Mockito.when(SystemProperties.getProperty(EPCommonSystemProperties.ONLINE_USER_UPDATE_DURATION)).thenReturn("1400");
+
+ PortalRestResponse<Map<String, String>> actualResponse = dashboardController.getOnlineUserUpdateRate(mockedRequest);
+ assertEquals(expectedData.getStatus(),actualResponse.getStatus());
+ }
+
+ @Test
+ public void getOnlineUserUpdateRateExceptionTest(){
+ PortalRestResponse<String> expectedData = new PortalRestResponse<String>();
+ expectedData.setStatus(PortalRestStatusEnum.ERROR);
+ expectedData.setMessage("java.lang.NullPointerException");
+ expectedData.setResponse(null);
+
+ PowerMockito.mockStatic(SystemProperties.class);
+ PowerMockito.mockStatic(EPCommonSystemProperties.class);
+ Mockito.when(SystemProperties.getProperty(EPCommonSystemProperties.ONLINE_USER_UPDATE_RATE)).thenThrow(nullPointerException);
+ Mockito.when(SystemProperties.getProperty(EPCommonSystemProperties.ONLINE_USER_UPDATE_DURATION)).thenThrow(nullPointerException);
+
+ PortalRestResponse<Map<String, String>> actualResponse = dashboardController.getOnlineUserUpdateRate(mockedRequest);
+ assertEquals(expectedData,actualResponse);
+ }
+
+ @Test
+ public void getWindowWidthThresholdForRightMenuTest(){
+ PortalRestResponse<String> expectedData = new PortalRestResponse<String>();
+ expectedData.setStatus(PortalRestStatusEnum.OK);
+ expectedData.setMessage("success");
+ expectedData.setResponse("{windowWidth=1400}");
+
+ PowerMockito.mockStatic(SystemProperties.class);
+ PowerMockito.mockStatic(EPCommonSystemProperties.class);
+ Mockito.when(SystemProperties.getProperty(EPCommonSystemProperties.WINDOW_WIDTH_THRESHOLD_RIGHT_MENU)).thenReturn("1400");
+
+ PortalRestResponse<Map<String, String>> actualResponse = dashboardController.getWindowWidthThresholdForRightMenu(mockedRequest);
+ assertEquals(expectedData.getStatus(),actualResponse.getStatus());
+ }
+
+ @Test
+ public void getWindowWidthThresholdForRightMenuExceptionTest(){
+ PortalRestResponse<String> expectedData = new PortalRestResponse<String>();
+ expectedData.setStatus(PortalRestStatusEnum.ERROR);
+ expectedData.setMessage("java.lang.NullPointerException");
+ expectedData.setResponse(null);
+
+ PowerMockito.mockStatic(SystemProperties.class);
+ PowerMockito.mockStatic(EPCommonSystemProperties.class);
+ Mockito.when(SystemProperties.getProperty(EPCommonSystemProperties.WINDOW_WIDTH_THRESHOLD_RIGHT_MENU)).thenThrow(nullPointerException);
+
+ PortalRestResponse<Map<String, String>> actualResponse = dashboardController.getWindowWidthThresholdForRightMenu(mockedRequest);
+ assertEquals(expectedData,actualResponse);
+ }
+
+ @Test
+ public void getWindowWidthThresholdForLeftMenuTest(){
+ PortalRestResponse<String> expectedData = new PortalRestResponse<String>();
+ expectedData.setStatus(PortalRestStatusEnum.OK);
+ expectedData.setMessage("success");
+ expectedData.setResponse("{windowWidth=1400}");
+
+ PowerMockito.mockStatic(SystemProperties.class);
+ PowerMockito.mockStatic(EPCommonSystemProperties.class);
+ Mockito.when(SystemProperties.getProperty(EPCommonSystemProperties.WINDOW_WIDTH_THRESHOLD_LEFT_MENU)).thenReturn("1400");
+
+ PortalRestResponse<Map<String, String>> actualResponse = dashboardController.getWindowWidthThresholdForLeftMenu(mockedRequest);
+ assertEquals(expectedData.getStatus(),actualResponse.getStatus());
+ }
+
+ @Test
+ public void getWindowWidthThresholdForLeftMenuExceptionTest(){
+ PortalRestResponse<String> expectedData = new PortalRestResponse<String>();
+ expectedData.setStatus(PortalRestStatusEnum.ERROR);
+ expectedData.setMessage("java.lang.NullPointerException");
+ expectedData.setResponse(null);
+
+ PowerMockito.mockStatic(SystemProperties.class);
+ PowerMockito.mockStatic(EPCommonSystemProperties.class);
+ Mockito.when(SystemProperties.getProperty(EPCommonSystemProperties.WINDOW_WIDTH_THRESHOLD_LEFT_MENU)).thenThrow(nullPointerException);
+
+ PortalRestResponse<Map<String, String>> actualResponse = dashboardController.getWindowWidthThresholdForLeftMenu(mockedRequest);
+ assertEquals(expectedData,actualResponse);
+ }
+
+ @Test
+ public void getActiveUsersNullTest(){
+ PortalRestResponse<List<String>> expectedData = new PortalRestResponse<List<String>>();
+ expectedData.setStatus(PortalRestStatusEnum.ERROR);
+ expectedData.setMessage("User object is null? - check logs");
+ expectedData.setResponse(new ArrayList<>());
+
+ PortalRestResponse<List<String>> actualResponse = dashboardController.activeUsers(mockedRequest);
+ assertEquals(expectedData,actualResponse);
+ }
+
+ @Test
+ public void activeUsersTest(){
+ EPUser user = mockUser.mockEPUser();
+ PortalRestResponse<List<String>> expectedData = new PortalRestResponse<List<String>>();
+ expectedData.setStatus(PortalRestStatusEnum.OK);
+ expectedData.setMessage("success");
+ expectedData.setResponse(new ArrayList<>());
+ PowerMockito.mockStatic(EPUserUtils.class);
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ PortalRestResponse<List<String>> actualResponse = dashboardController.activeUsers(mockedRequest);
+ assertEquals(expectedData,actualResponse);
+ }
+
+// @Test
+// public void activeUsersExceptionTest(){
+// EPUser user = mockUser.mockEPUser();
+// user.setLoginId("test");
+// String loginId = "abc";
+// PortalRestResponse<List<String>> expectedData = new PortalRestResponse<List<String>>();
+// expectedData.setStatus(PortalRestStatusEnum.ERROR);
+// expectedData.setMessage("java.lang.NullPointerException");
+// expectedData.setResponse(null);
+//
+//// PowerMockito.mockStatic(EPUserUtils.class);
+// Mockito.when(searchService.getRelatedUsers(user.getLoginId(user.getLoginId()))).thenReturn(nullPointerException);
+// PortalRestResponse<List<String>> actualResponse = dashboardController.activeUsers(mockedRequest);
+// System.out.println(actualResponse);
+// //assertEquals(expectedData,actualResponse);
+// }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/DashboardSearchResultControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/DashboardSearchResultControllerTest.java
new file mode 100644
index 00000000..7f87c151
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/DashboardSearchResultControllerTest.java
@@ -0,0 +1,366 @@
+package org.openecomp.portalapp.portal.controller;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
+import org.openecomp.portalapp.portal.controller.DashboardSearchResultController;
+import org.openecomp.portalapp.portal.core.MockEPUser;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.openecomp.portalapp.portal.ecomp.model.SearchResultItem;
+import org.openecomp.portalapp.portal.service.DashboardSearchService;
+import org.openecomp.portalapp.portal.service.DashboardSearchServiceImpl;
+import org.openecomp.portalapp.portal.transport.CommonWidget;
+import org.openecomp.portalapp.portal.transport.CommonWidgetMeta;
+import org.openecomp.portalapp.util.EPUserUtils;
+
+public class DashboardSearchResultControllerTest {
+
+ @Mock
+ DashboardSearchService searchService = new DashboardSearchServiceImpl();
+
+ @InjectMocks
+ DashboardSearchResultController dashboardSearchResultController = new DashboardSearchResultController();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+ NullPointerException nullPointerException = new NullPointerException();
+
+ @Mock
+ EPUserUtils ePUserUtils = new EPUserUtils();
+
+ MockEPUser mockUser = new MockEPUser();
+
+ @Test
+ public void getWidgetDataTest() {
+ String resourceType = "test";
+ PortalRestResponse<CommonWidgetMeta> ecpectedPortalRestResponse = new PortalRestResponse<CommonWidgetMeta>();
+ ecpectedPortalRestResponse.setMessage("success");
+ ecpectedPortalRestResponse.setResponse(null);
+ ecpectedPortalRestResponse.setStatus(PortalRestStatusEnum.OK);
+ Mockito.when(searchService.getWidgetData(resourceType)).thenReturn(null);
+ PortalRestResponse<CommonWidgetMeta> acutualPoratlRestResponse = dashboardSearchResultController
+ .getWidgetData(mockedRequest, resourceType);
+ assertEquals(acutualPoratlRestResponse, ecpectedPortalRestResponse);
+
+ }
+
+ @Test
+ public void saveWidgetDataBulkTest() {
+ PortalRestResponse<String> ecpectedPortalRestResponse = new PortalRestResponse<String>();
+ ecpectedPortalRestResponse.setMessage("success");
+ ecpectedPortalRestResponse.setResponse(null);
+ ecpectedPortalRestResponse.setStatus(PortalRestStatusEnum.OK);
+
+ CommonWidgetMeta commonWidgetMeta = new CommonWidgetMeta();
+ commonWidgetMeta.setCategory("test");
+
+ List<CommonWidget> commonWidgetList = new ArrayList<CommonWidget>();
+ CommonWidget commonWidget = new CommonWidget();
+ commonWidget.setId((long) 1);
+ commonWidget.setCategory("test");
+ commonWidget.setHref("test_href");
+ commonWidget.setTitle("test_title");
+ commonWidget.setContent("test_content");
+ commonWidget.setEventDate(null);
+ commonWidget.setSortOrder(1);
+
+ commonWidgetList.add(commonWidget);
+
+ commonWidgetMeta.setItems(commonWidgetList);
+
+ Mockito.when(searchService.saveWidgetDataBulk(commonWidgetMeta)).thenReturn(null);
+
+ PortalRestResponse<String> actualPortalRestResponse = dashboardSearchResultController
+ .saveWidgetDataBulk(commonWidgetMeta);
+ assertEquals(actualPortalRestResponse, ecpectedPortalRestResponse);
+ }
+
+ @Test
+ public void saveWidgetDataBulkIfCategoryNullTest() {
+ PortalRestResponse<String> ecpectedPortalRestResponse = new PortalRestResponse<String>();
+ ecpectedPortalRestResponse.setMessage("java.text.ParseException: Unparseable date: \"1\"");
+ ecpectedPortalRestResponse.setResponse(null);
+ ecpectedPortalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
+
+ CommonWidgetMeta commonWidgetMeta = new CommonWidgetMeta();
+ commonWidgetMeta.setCategory("test");
+
+ List<CommonWidget> commonWidgetList = new ArrayList<CommonWidget>();
+ CommonWidget commonWidget = new CommonWidget();
+ commonWidget.setId(null);
+ commonWidget.setCategory(null);
+ commonWidget.setHref(null);
+ commonWidget.setTitle(null);
+ commonWidget.setContent("test_content");
+ commonWidget.setEventDate("1");
+ commonWidget.setSortOrder(1);
+ commonWidgetList.add(commonWidget);
+ commonWidgetMeta.setItems(commonWidgetList);
+
+ Mockito.when(searchService.saveWidgetDataBulk(commonWidgetMeta)).thenReturn(null);
+
+ PortalRestResponse<String> actualPortalRestResponse = dashboardSearchResultController
+ .saveWidgetDataBulk(commonWidgetMeta);
+ assertEquals(actualPortalRestResponse, ecpectedPortalRestResponse);
+ }
+
+ @Test
+ public void saveWidgetDataTest() {
+ PortalRestResponse<String> ecpectedPortalRestResponse = new PortalRestResponse<String>();
+ ecpectedPortalRestResponse.setMessage("success");
+ ecpectedPortalRestResponse.setResponse(null);
+ ecpectedPortalRestResponse.setStatus(PortalRestStatusEnum.OK);
+ CommonWidget commonWidget = new CommonWidget();
+ commonWidget.setId((long) 1);
+ commonWidget.setCategory("test");
+ commonWidget.setHref("test_href");
+ commonWidget.setTitle("test_title");
+ commonWidget.setContent("test_content");
+ commonWidget.setEventDate(null);
+ commonWidget.setSortOrder(1);
+
+ Mockito.when(searchService.saveWidgetData(commonWidget)).thenReturn(null);
+
+ PortalRestResponse<String> actualPortalRestResponse = dashboardSearchResultController
+ .saveWidgetData(commonWidget);
+ assertEquals(actualPortalRestResponse, ecpectedPortalRestResponse);
+
+ }
+
+ @Test
+ public void saveWidgetDataExceptionTest() {
+ PortalRestResponse<String> ecpectedPortalRestResponse = new PortalRestResponse<String>();
+ ecpectedPortalRestResponse.setMessage("ERROR");
+ ecpectedPortalRestResponse.setResponse("Cateogry cannot be null or empty");
+ ecpectedPortalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
+ CommonWidget commonWidget = new CommonWidget();
+ commonWidget.setId((long) 1);
+ commonWidget.setCategory("");
+ commonWidget.setHref("test_href");
+ commonWidget.setTitle("test_title");
+ commonWidget.setContent("test_content");
+ commonWidget.setEventDate(null);
+ commonWidget.setSortOrder(1);
+
+ Mockito.when(searchService.saveWidgetData(commonWidget)).thenReturn(null);
+
+ PortalRestResponse<String> actualPortalRestResponse = dashboardSearchResultController
+ .saveWidgetData(commonWidget);
+ assertEquals(actualPortalRestResponse, ecpectedPortalRestResponse);
+
+ }
+
+ @Test
+ public void saveWidgetDataDateErrorTest() {
+ PortalRestResponse<String> ecpectedPortalRestResponse = new PortalRestResponse<String>();
+ ecpectedPortalRestResponse.setMessage("java.text.ParseException: Unparseable date: \"1\"");
+ ecpectedPortalRestResponse.setResponse(null);
+ ecpectedPortalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
+ CommonWidget commonWidget = new CommonWidget();
+ commonWidget.setId((long) 1);
+ commonWidget.setCategory("test");
+ commonWidget.setHref("test_href");
+ commonWidget.setTitle("test_title");
+ commonWidget.setContent("test_content");
+ commonWidget.setEventDate("1");
+ commonWidget.setSortOrder(1);
+
+ Mockito.when(searchService.saveWidgetData(commonWidget)).thenReturn(null);
+
+ PortalRestResponse<String> actualPortalRestResponse = dashboardSearchResultController
+ .saveWidgetData(commonWidget);
+ assertEquals(actualPortalRestResponse, ecpectedPortalRestResponse);
+
+ }
+
+ public void deleteWidgetDataTest() {
+ PortalRestResponse<String> ecpectedPortalRestResponse = new PortalRestResponse<String>();
+ ecpectedPortalRestResponse.setMessage("success");
+ ecpectedPortalRestResponse.setResponse(null);
+ ecpectedPortalRestResponse.setStatus(PortalRestStatusEnum.OK);
+ CommonWidget commonWidget = new CommonWidget();
+ commonWidget.setId((long) 1);
+ commonWidget.setCategory("test");
+ commonWidget.setHref("test_href");
+ commonWidget.setTitle("test_title");
+ commonWidget.setContent("test_content");
+ commonWidget.setEventDate(null);
+ commonWidget.setSortOrder(1);
+ Mockito.when(searchService.deleteWidgetData(commonWidget)).thenReturn(null);
+
+ PortalRestResponse<String> actualPortalRestResponse = dashboardSearchResultController
+ .deleteWidgetData(commonWidget);
+ System.out.println(actualPortalRestResponse);
+ assertEquals(actualPortalRestResponse, ecpectedPortalRestResponse);
+ }
+
+ @Test
+ public void searchPortalIfUserIsNull() {
+ EPUser user = null;
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ String searchString = "test";
+
+ PortalRestResponse<Map<String, List<SearchResultItem>>> expectedResult = new PortalRestResponse<Map<String, List<SearchResultItem>>>();
+ expectedResult.setMessage("searchPortal: User object is null? - check logs");
+ expectedResult.setResponse(new HashMap<String, List<SearchResultItem>>());
+ expectedResult.setStatus(PortalRestStatusEnum.ERROR);
+ PortalRestResponse<Map<String, List<SearchResultItem>>> actualResult = dashboardSearchResultController
+ .searchPortal(mockedRequest, searchString);
+ assertEquals(expectedResult, actualResult);
+ }
+
+ @Test
+ public void searchPortalIfSearchStringNullTest() {
+ EPUser user = mockUser.mockEPUser();
+ ;
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ String searchString = null;
+
+ PortalRestResponse<Map<String, List<SearchResultItem>>> expectedResult = new PortalRestResponse<Map<String, List<SearchResultItem>>>();
+ expectedResult.setMessage("searchPortal: String string is null");
+ expectedResult.setResponse(new HashMap<String, List<SearchResultItem>>());
+ expectedResult.setStatus(PortalRestStatusEnum.ERROR);
+
+ PortalRestResponse<Map<String, List<SearchResultItem>>> actualResult = dashboardSearchResultController
+ .searchPortal(mockedRequest, searchString);
+ assertEquals(expectedResult, actualResult);
+ }
+
+ @Test
+ public void searchPortalIfSearchTest() {
+ EPUser user = mockUser.mockEPUser();
+ ;
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ String searchString = "test";
+ List<SearchResultItem> searchResultItemList = new ArrayList<SearchResultItem>();
+ SearchResultItem searchResultItem = new SearchResultItem();
+
+ searchResultItem.setId((long) 1);
+ searchResultItem.setCategory("test");
+ searchResultItem.setName("test_name");
+ searchResultItem.setTarget("test_target");
+ searchResultItem.setUuid("test_UUId");
+ searchResultItemList.add(searchResultItem);
+ Map<String, List<SearchResultItem>> expectedResultMap = new HashMap<String, List<SearchResultItem>>();
+ expectedResultMap.put(searchString, searchResultItemList);
+
+ PortalRestResponse<Map<String, List<SearchResultItem>>> expectedResult = new PortalRestResponse<Map<String, List<SearchResultItem>>>();
+ expectedResult.setMessage("success");
+ expectedResult.setResponse(expectedResultMap);
+ expectedResult.setStatus(PortalRestStatusEnum.OK);
+
+ Mockito.when(searchService.searchResults(user.getLoginId(), searchString)).thenReturn(expectedResultMap);
+ PortalRestResponse<Map<String, List<SearchResultItem>>> actualResult = dashboardSearchResultController
+ .searchPortal(mockedRequest, searchString);
+ assertEquals(expectedResult, actualResult);
+
+ }
+
+ @Test
+ public void searchPortalIfSearchExcptionTest() {
+ EPUser user = mockUser.mockEPUser();
+ ;
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ String searchString = "test";
+
+ PortalRestResponse<Map<String, List<SearchResultItem>>> expectedResult = new PortalRestResponse<Map<String, List<SearchResultItem>>>();
+ expectedResult.setMessage("null - check logs.");
+ expectedResult.setResponse(new HashMap<String, List<SearchResultItem>>());
+ expectedResult.setStatus(PortalRestStatusEnum.ERROR);
+
+ Mockito.when(searchService.searchResults(user.getLoginId(), searchString)).thenThrow(nullPointerException);
+ PortalRestResponse<Map<String, List<SearchResultItem>>> actualResult = dashboardSearchResultController
+ .searchPortal(mockedRequest, searchString);
+ assertEquals(expectedResult, actualResult);
+ }
+
+ @Test
+ public void getActiveUsersTest() {
+ List<String> expectedActiveUsers = new ArrayList<String>();
+ EPUser user = mockUser.mockEPUser();
+ ;
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ String userId = user.getOrgUserId();
+ Mockito.when(searchService.getRelatedUsers(userId)).thenReturn(expectedActiveUsers);
+ List<String> actualOnlineUsers = dashboardSearchResultController.getActiveUsers(mockedRequest);
+ assertEquals(expectedActiveUsers, actualOnlineUsers);
+
+ }
+
+ @Test
+ public void getActiveUsersExceptionTest() {
+ List<String> expectedActiveUsers = new ArrayList<String>();
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ String userId = user.getOrgUserId();
+ Mockito.when(searchService.getRelatedUsers(userId)).thenThrow(nullPointerException);
+ List<String> actualOnlineUsers = dashboardSearchResultController.getActiveUsers(mockedRequest);
+ assertEquals(expectedActiveUsers, actualOnlineUsers);
+
+ }
+
+ @Test
+ public void activeUsersTest() {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ PortalRestResponse<List<String>> expectedResult = new PortalRestResponse<List<String>>();
+ expectedResult.setMessage("success");
+ expectedResult.setResponse(new ArrayList<>());
+ expectedResult.setStatus(PortalRestStatusEnum.OK);
+ PortalRestResponse<List<String>> actualResult = dashboardSearchResultController.activeUsers(mockedRequest);
+
+ assertEquals(actualResult, expectedResult);
+
+ }
+
+ @Test
+ public void activeUsersIfUserNullTest() {
+ EPUser user = null;
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ PortalRestResponse<List<String>> expectedResult = new PortalRestResponse<List<String>>();
+ expectedResult.setMessage("User object is null? - check logs");
+ expectedResult.setResponse(new ArrayList<>());
+ expectedResult.setStatus(PortalRestStatusEnum.ERROR);
+ PortalRestResponse<List<String>> actualResult = dashboardSearchResultController.activeUsers(mockedRequest);
+ assertEquals(actualResult, expectedResult);
+
+ }
+
+ @Test
+ public void activeUsersExceptionTest() {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ PortalRestResponse<List<String>> expectedResult = new PortalRestResponse<List<String>>();
+ expectedResult.setMessage("null - check logs.");
+ expectedResult.setResponse(new ArrayList<>());
+ expectedResult.setStatus(PortalRestStatusEnum.ERROR);
+ Mockito.when(searchService.getRelatedUsers(user.getLoginId())).thenThrow(nullPointerException);
+ PortalRestResponse<List<String>> actualResult = dashboardSearchResultController.activeUsers(mockedRequest);
+ assertEquals(actualResult, expectedResult);
+
+ }
+
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/EPFusionBaseControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/EPFusionBaseControllerTest.java
new file mode 100644
index 00000000..e6db1d07
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/EPFusionBaseControllerTest.java
@@ -0,0 +1,63 @@
+//package org.openecomp.portalapp.portal.test.controller;
+//
+//import java.util.HashMap;
+//import java.util.Map;
+//
+//import javax.servlet.http.HttpServletRequest;
+//import javax.servlet.http.HttpServletResponse;
+//
+//import org.junit.Before;
+//import org.junit.Test;
+//import org.junit.runner.RunWith;
+//import org.mockito.InjectMocks;
+//import org.mockito.Mock;
+//import org.mockito.Mockito;
+//import org.mockito.MockitoAnnotations;
+//import org.openecomp.portalapp.controller.EPFusionBaseController;
+//import org.openecomp.portalapp.portal.core.MockEPUser;
+//import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
+//import org.openecomp.portalapp.portal.service.DashboardSearchService;
+//import org.openecomp.portalapp.portal.service.DashboardSearchServiceImpl;
+//import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;
+//import org.openecomp.portalapp.util.EPUserUtils;
+//import org.openecomp.portalsdk.core.util.SystemProperties;
+//import org.powermock.api.mockito.PowerMockito;
+//import org.powermock.core.classloader.annotations.PrepareForTest;
+//import org.powermock.modules.junit4.PowerMockRunner;
+//
+//@RunWith(PowerMockRunner.class)
+//@PrepareForTest({EPUserUtils.class, SystemProperties.class})
+//public class EPFusionBaseControllerTest {
+//
+// @Mock
+// DashboardSearchService searchService = new DashboardSearchServiceImpl();
+//
+// @InjectMocks
+// EPFusionBaseController epFusionBaseController; /*= mock(EPFusionBaseController.class);*/
+//
+// @Before
+// public void setup() {
+// MockitoAnnotations.initMocks(this);
+// }
+//
+// MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+//
+// HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+// HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+//
+// NullPointerException nullPointerException = new NullPointerException();
+//
+// MockEPUser mockUser = new MockEPUser();
+//
+// @Test
+// public void messagesTest(){
+// Map<String, Object> expectedData = new HashMap<String, Object>();
+// Map<String, Object> actualData = null;
+//
+// PowerMockito.mockStatic(SystemProperties.class);
+// Mockito.when(SystemProperties.getProperty(EPCommonSystemProperties.APPLICATION_MENU_ATTRIBUTE_NAME)).then(null);
+// actualData = epFusionBaseController.messages(mockedRequest);
+// System.out.println();
+//
+// }
+//}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/ExternalAccessRolesControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/ExternalAccessRolesControllerTest.java
new file mode 100644
index 00000000..81962240
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/ExternalAccessRolesControllerTest.java
@@ -0,0 +1,532 @@
+package org.openecomp.portalapp.portal.controller;
+
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.core.MockEPUser;
+import org.openecomp.portalapp.portal.domain.CentralRoleFunction;
+import org.openecomp.portalapp.portal.domain.EPApp;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
+import org.openecomp.portalapp.portal.service.ExternalAccessRolesService;
+import org.openecomp.portalapp.portal.service.ExternalAccessRolesServiceImpl;
+import org.openecomp.portalapp.portal.transport.CentralRole;
+import org.openecomp.portalsdk.core.domain.AuditLog;
+import org.openecomp.portalsdk.core.domain.Role;
+import org.openecomp.portalsdk.core.restful.domain.EcompUser;
+import org.springframework.http.HttpStatus;
+import org.springframework.web.client.HttpClientErrorException;
+public class ExternalAccessRolesControllerTest {
+
+ @Mock
+ ExternalAccessRolesService externalAccessRolesService = new ExternalAccessRolesServiceImpl();
+
+ @InjectMocks
+ ExternalAccessRolesController externalAccessRolesController = new ExternalAccessRolesController();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+ @Mock
+ AuditLog auditLog = new AuditLog();
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+ NullPointerException nullPointerException = new NullPointerException();
+ HttpClientErrorException httpClientErrorException = new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Failed");
+
+ MockEPUser mockUser = new MockEPUser();
+ String loginId = "guestT";
+ String uebKey = "testUebKey";
+
+ @Test
+ public void getUserTest() throws Exception {
+ List<EPUser> userList = new ArrayList<>();
+ Mockito.when(externalAccessRolesService.getUser(loginId)).thenReturn(userList);
+ assertNull(externalAccessRolesController.getUser(mockedRequest, mockedResponse, loginId));
+ }
+
+ @Test
+ public void getUserExceptionTest() throws Exception {
+ Mockito.when(externalAccessRolesService.getUser(loginId))
+ .thenThrow(nullPointerException);
+ assertNull(externalAccessRolesController.getUser(mockedRequest, mockedResponse, loginId));
+ }
+
+ public EPApp mockApp()
+ {
+ EPApp app = new EPApp();
+ app.setName("Test");
+ app.setImageUrl("test");
+ app.setDescription("test");
+ app.setNotes("test");
+ app.setUrl("test");
+ app.setId((long) 1);
+ app.setAppRestEndpoint("test");
+ app.setAlternateUrl("test");
+ app.setName("test");
+ app.setMlAppName("test");
+ app.setMlAppAdminId("test");
+ app.setUsername("test");
+ app.setAppPassword("test");
+ app.setOpen(false);
+ app.setEnabled(false);
+ app.setUebKey("test");
+ app.setUebSecret("test");
+ app.setUebTopicName("test");
+ app.setAppType(1);
+ return app;
+ }
+
+ @Test
+ public void getRolesForAppTest() throws Exception {
+ List<EPApp> applicationList = new ArrayList<EPApp>();
+ List<CentralRole> answer = new ArrayList<>();
+ EPApp app = mockApp();
+ applicationList.add(app);
+ Mockito.when(externalAccessRolesService.getApp(mockedRequest.getHeader(uebKey))).thenReturn(applicationList);
+ Mockito.doNothing().when(externalAccessRolesService).syncApplicationRolesWithEcompDB(app);
+ Mockito.when(externalAccessRolesService.getRolesForApp(mockedRequest.getHeader(uebKey))).thenReturn(answer);
+ assertEquals(externalAccessRolesController.getRolesForApp(mockedRequest, mockedResponse), answer);
+ }
+
+ @Test
+ public void getRolesForAppExceptionTest() throws Exception {
+ List<EPApp> applicationList = new ArrayList<EPApp>();
+ List<CentralRole> answer = new ArrayList<>();
+ EPApp app = mockApp();
+ applicationList.add(app);
+ Mockito.when(externalAccessRolesService.getApp(mockedRequest.getHeader(uebKey))).thenReturn(applicationList);
+ Mockito.doNothing().when(externalAccessRolesService).syncApplicationRolesWithEcompDB(app);
+ Mockito.when(externalAccessRolesService.getRolesForApp(mockedRequest.getHeader(uebKey)))
+ .thenThrow(httpClientErrorException);
+ assertNull(externalAccessRolesController.getRolesForApp(mockedRequest, mockedResponse));
+ }
+
+ @Test
+ public void getRoleFunctionsListTest() throws Exception {
+ List<CentralRoleFunction> answer = new ArrayList<>();
+ Mockito.when(externalAccessRolesService.getRoleFuncList(mockedRequest.getHeader(uebKey))).thenReturn(answer);
+ assertEquals(externalAccessRolesController.getRoleFunctionsList(mockedRequest, mockedResponse), answer);
+ }
+
+ @Test
+ public void getRoleFunctionsListExceptionTest() throws Exception {
+ Mockito.when(externalAccessRolesService.getRoleFuncList(mockedRequest.getHeader(uebKey)))
+ .thenThrow(httpClientErrorException);
+ assertNull(externalAccessRolesController.getRoleFunctionsList(mockedRequest, mockedResponse));
+ }
+
+ @Test
+ public void getRoleInfoTest() throws Exception {
+ CentralRole answer = new CentralRole();
+ long roleId = 1;
+ Mockito.when(externalAccessRolesService.getRoleInfo(roleId, mockedRequest.getHeader(uebKey)))
+ .thenReturn(answer);
+ assertEquals(externalAccessRolesController.getRoleInfo(mockedRequest, mockedResponse, roleId), answer);
+ }
+
+ @Test
+ public void getRoleInfoExceptionTest() throws Exception {
+ long roleId = 1;
+ Mockito.when(externalAccessRolesService.getRoleInfo(roleId, mockedRequest.getHeader(uebKey)))
+ .thenThrow(httpClientErrorException);
+ assertNull(externalAccessRolesController.getRoleInfo(mockedRequest, mockedResponse, roleId));
+ }
+
+ @Test
+ public void getRoleFunctionTest() throws Exception {
+ CentralRoleFunction centralRoleFunction = new CentralRoleFunction();
+ String code = "test_menu";
+ Mockito.when(externalAccessRolesService.getRoleFunction(code, mockedRequest.getHeader(uebKey)))
+ .thenReturn(centralRoleFunction);
+ assertEquals(externalAccessRolesController.getRoleFunction(mockedRequest, mockedResponse, code),
+ centralRoleFunction);
+ }
+
+ @Test
+ public void getRoleFunctionExceptionTest() throws Exception {
+ String code = "test_menu";
+ Mockito.when(externalAccessRolesService.getRoleFunction(code, mockedRequest.getHeader(uebKey)))
+ .thenThrow(httpClientErrorException);
+ assertNull(externalAccessRolesController.getRoleFunction(mockedRequest, mockedResponse, code));
+ }
+
+ @Test
+ public void saveRoleFunctionIfIsIsNotDeletedTest() throws Exception {
+ List<EPApp> applicationList = new ArrayList<EPApp>();
+ EPApp app = mockApp();
+ applicationList.add(app);
+ Mockito.when(externalAccessRolesService.getApp(mockedRequest.getHeader(uebKey))).thenReturn(applicationList);
+ PortalRestResponse<String> portalRestResponse = null;
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage(null);
+ expectedportalRestResponse.setResponse("Failed");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ String data = null;
+ CentralRoleFunction centralRoleFunction = new CentralRoleFunction();
+ Mockito.when(externalAccessRolesService.saveCentralRoleFunction(centralRoleFunction, app)).thenReturn(false);
+ portalRestResponse = externalAccessRolesController.saveRoleFunction(mockedRequest, mockedResponse, data);
+ assertEquals(portalRestResponse, expectedportalRestResponse);
+ }
+
+ @Test
+ public void saveRoleFunctionExceptionTest() throws Exception {
+ List<EPApp> applicationList = new ArrayList<EPApp>();
+ EPApp app = mockApp();
+ applicationList.add(app);
+ Mockito.when(externalAccessRolesService.getApp(mockedRequest.getHeader(uebKey))).thenReturn(applicationList);
+ PortalRestResponse<String> portalRestResponse = null;
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage(null);
+ expectedportalRestResponse.setResponse("Failed");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ String data = null;
+ CentralRoleFunction centralRoleFunction = new CentralRoleFunction();
+ Mockito.when(externalAccessRolesService.saveCentralRoleFunction(centralRoleFunction, app)).thenThrow(nullPointerException);
+ portalRestResponse = externalAccessRolesController.saveRoleFunction(mockedRequest, mockedResponse, data);
+ System.out.println(portalRestResponse);
+ assertEquals(portalRestResponse, expectedportalRestResponse);
+ }
+
+ @Test
+ public void saveRoleFunctionTest() throws Exception {
+ List<EPApp> applicationList = new ArrayList<EPApp>();
+ List<CentralRole> answer = new ArrayList<>();
+ EPApp app = mockApp();
+ applicationList.add(app);
+ Mockito.when(externalAccessRolesService.getApp(mockedRequest.getHeader(uebKey))).thenReturn(applicationList);
+ PortalRestResponse<String> portalRestResponse = null;
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage(null);
+ expectedportalRestResponse.setResponse("Failed");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ String data = null;
+ CentralRoleFunction centralRoleFunction = new CentralRoleFunction();
+ Mockito.when(externalAccessRolesService.saveCentralRoleFunction(centralRoleFunction, app)).thenReturn(true);
+ portalRestResponse = externalAccessRolesController.saveRoleFunction(mockedRequest, mockedResponse, data);
+ System.out.println(portalRestResponse);
+ assertEquals(portalRestResponse, expectedportalRestResponse);
+ }
+
+// @Test
+// public void deleteRoleFunctionTest() throws Exception {
+// PortalRestResponse<String> portalRestResponse = null;
+// PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+// expectedportalRestResponse.setMessage("Successfully Deleted");
+// expectedportalRestResponse.setResponse("Success");
+// PortalRestStatusEnum portalRestStatusEnum = null;
+// EPUser user = mockUser.mockEPUser();
+// EPApp app = mockApp();
+// expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
+// String code ="testNew";
+// Mockito.when(externalAccessRolesService.getUser(mockedRequest.getHeader("LOGIN_ID"))).thenReturn((List<EPUser>) user);
+// Mockito.when(externalAccessRolesService.getApp(mockedRequest.getHeader("UEBKEY")).get(0)).thenReturn(app);
+// Mockito.when(externalAccessRolesService.deleteCentralRoleFunction(code, app)).thenReturn(true);
+// portalRestResponse = externalAccessRolesController.deleteRoleFunction(mockedRequest, mockedResponse, code);
+// assertEquals(portalRestResponse, expectedportalRestResponse);
+// }
+
+ @Test
+ public void getActiveRolesTest() throws Exception {
+ List<CentralRole> cenRole = new ArrayList<>();
+ Mockito.when(externalAccessRolesService.getActiveRoles(mockedRequest.getHeader(uebKey))).thenReturn(cenRole);
+ List<CentralRole> expectedCenRole = externalAccessRolesController.getActiveRoles(mockedRequest, mockedResponse);
+ assertEquals(expectedCenRole, cenRole);
+ }
+
+ @Test
+ public void getActiveRolesExceptionTest() throws Exception {
+ Mockito.when(externalAccessRolesService.getActiveRoles(mockedRequest.getHeader(uebKey)))
+ .thenThrow(httpClientErrorException);
+ assertNull(externalAccessRolesController.getActiveRoles(mockedRequest, mockedResponse));
+ }
+
+ @Test
+ public void deleteDependcyRoleRecordExceptionTest() throws Exception {
+ PortalRestResponse<String> portalRestResponse = null;
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("Failed to deleteDependencyRoleRecord");
+ expectedportalRestResponse.setResponse("Failed");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ long roleId = 123;
+ portalRestResponse = externalAccessRolesController.deleteDependencyRoleRecord(mockedRequest, mockedResponse, roleId);
+ assertEquals(expectedportalRestResponse, portalRestResponse);
+ }
+
+ @Test
+ public void bulkUploadFunctionsTest() throws Exception {
+ Integer result = 0;
+ Mockito.when(externalAccessRolesService.bulkUploadFunctions(mockedRequest.getHeader(uebKey)))
+ .thenReturn(result);
+ PortalRestResponse<String> portalRestResponse = null;
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("Successfully added: 0");
+ expectedportalRestResponse.setResponse("Success");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
+ portalRestResponse = externalAccessRolesController.bulkUploadFunctions(mockedRequest, mockedResponse);
+ assertEquals(portalRestResponse, expectedportalRestResponse);
+ }
+
+ @Test
+ public void bulkUploadFunctionsExceptionTest() throws Exception {
+ Mockito.when(externalAccessRolesService.bulkUploadFunctions(mockedRequest.getHeader(uebKey)))
+ .thenThrow(httpClientErrorException);
+ PortalRestResponse<String> portalRestResponse = null;
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("Failed to bulkUploadFunctions");
+ expectedportalRestResponse.setResponse("Failed");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ portalRestResponse = externalAccessRolesController.bulkUploadFunctions(mockedRequest, mockedResponse);
+ assertEquals(portalRestResponse, expectedportalRestResponse);
+ }
+
+ @Test
+ public void bulkUploadRolesTest() throws Exception {
+ Integer result = 0;
+ PortalRestResponse<String> portalRestResponse = null;
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("Successfully added: 0");
+ expectedportalRestResponse.setResponse("Success");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
+ Mockito.when(externalAccessRolesService.bulkUploadRoles(mockedRequest.getHeader(uebKey))).thenReturn(result);
+ portalRestResponse = externalAccessRolesController.bulkUploadRoles(mockedRequest, mockedResponse);
+ assertEquals(portalRestResponse, expectedportalRestResponse);
+ }
+
+ @Test
+ public void bulkUploadRolesTestException() throws Exception {
+ Mockito.when(externalAccessRolesService.bulkUploadRoles(mockedRequest.getHeader(uebKey)))
+ .thenThrow(httpClientErrorException);
+ PortalRestResponse<String> portalRestResponse = null;
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("Failed to bulkUploadRoles");
+ expectedportalRestResponse.setResponse("Failed");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ portalRestResponse = externalAccessRolesController.bulkUploadRoles(mockedRequest, mockedResponse);
+ assertEquals(portalRestResponse, expectedportalRestResponse);
+ }
+
+ @Test
+ public void bulkUploadRoleFunctionsTest() throws Exception {
+ Integer result = 0;
+ PortalRestResponse<String> portalRestResponse = null;
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("Successfully added: 0");
+ expectedportalRestResponse.setResponse("Success");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
+ Mockito.when(externalAccessRolesService.bulkUploadRolesFunctions(mockedRequest.getHeader(uebKey)))
+ .thenReturn(result);
+ portalRestResponse = externalAccessRolesController.bulkUploadRoleFunctions(mockedRequest, mockedResponse);
+ assertEquals(portalRestResponse, expectedportalRestResponse);
+ }
+
+ @Test
+ public void bulkUploadRoleFunctionsException() throws Exception {
+ Mockito.when(externalAccessRolesService.bulkUploadRolesFunctions(mockedRequest.getHeader(uebKey)))
+ .thenThrow(httpClientErrorException);
+ PortalRestResponse<String> portalRestResponse = null;
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("Failed to bulkUploadRoleFunctions");
+ expectedportalRestResponse.setResponse("Failed");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ portalRestResponse = externalAccessRolesController.bulkUploadRoleFunctions(mockedRequest, mockedResponse);
+ assertEquals(portalRestResponse, expectedportalRestResponse);
+ }
+
+ @Test
+ public void bulkUploadUserRolesTest() throws Exception {
+ Integer result = 0;
+ PortalRestResponse<String> portalRestResponse = null;
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("Successfully added: 0");
+ expectedportalRestResponse.setResponse("Success");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
+ Mockito.when(externalAccessRolesService.bulkUploadUserRoles(mockedRequest.getHeader(uebKey)))
+ .thenReturn(result);
+ portalRestResponse = externalAccessRolesController.bulkUploadUserRoles(mockedRequest, mockedResponse);
+ assertEquals(portalRestResponse, expectedportalRestResponse);
+ }
+
+ @Test
+ public void bulkUploadUserRolesExceptionTest() throws Exception {
+ Mockito.when(externalAccessRolesService.bulkUploadUserRoles(mockedRequest.getHeader(uebKey)))
+ .thenThrow(httpClientErrorException);
+ PortalRestResponse<String> portalRestResponse = null;
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("Failed to bulkUploadUserRoles");
+ expectedportalRestResponse.setResponse("Failed");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ portalRestResponse = externalAccessRolesController.bulkUploadUserRoles(mockedRequest, mockedResponse);
+ assertEquals(portalRestResponse, expectedportalRestResponse);
+ }
+
+ @Test
+ public void bulkUploadPartnerFunctionsTest() throws Exception {
+ PortalRestResponse<String> portalRestResponse = null;
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("Successfully added");
+ expectedportalRestResponse.setResponse("Success");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
+ portalRestResponse = externalAccessRolesController.bulkUploadPartnerFunctions(mockedRequest, mockedResponse, null);
+ assertEquals(portalRestResponse, expectedportalRestResponse);
+ }
+
+
+ @Test
+ public void bulkUploadPartnerRolesTest() throws Exception {
+ PortalRestResponse<String> portalRestResponse = null;
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("Successfully added");
+ expectedportalRestResponse.setResponse("Success");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
+ List<Role> upload = new ArrayList<>();
+ portalRestResponse = externalAccessRolesController.bulkUploadPartnerRoles(mockedRequest, mockedResponse,
+ upload);
+ assertEquals(portalRestResponse, expectedportalRestResponse);
+ }
+
+ @Test
+ public void bulkUploadPartnerRolesExceptionTest() throws Exception
+ {
+ ExternalAccessRolesService externalAccessRolesService = null;
+ PortalRestResponse<String> portalRestResponse = null;
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("Successfully added");
+ expectedportalRestResponse.setResponse("Success");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
+ List<Role> upload = new ArrayList<>();
+ portalRestResponse = externalAccessRolesController.bulkUploadPartnerRoles(mockedRequest, mockedResponse,
+ upload);
+ assertEquals(portalRestResponse, expectedportalRestResponse);
+ }
+
+ @Test
+ public void getMenuFunctionsTest() throws Exception {
+ List<String> functionsList = new ArrayList<>();
+ Mockito.when(externalAccessRolesService.getMenuFunctionsList(mockedRequest.getHeader(uebKey)))
+ .thenReturn(functionsList);
+ List<String> expectedFunctionsList = externalAccessRolesController.getMenuFunctions(mockedRequest,
+ mockedResponse);
+ assertEquals(functionsList, expectedFunctionsList);
+ }
+
+ @Test
+ public void getMenuFunctionsExceptionTest() throws Exception {
+ Mockito.when(externalAccessRolesService.getMenuFunctionsList(mockedRequest.getHeader(uebKey)))
+ .thenThrow(httpClientErrorException);
+ assertNull(externalAccessRolesController.getMenuFunctions(mockedRequest, mockedResponse));
+ }
+
+// @Test
+// public void getUsersOfApplicationTest() throws Exception {
+// List<String> users = new ArrayList<>();
+// Mockito.when(externalAccessRolesService.getAllUsers(mockedRequest.getHeader(uebKey))).thenReturn(users);
+// List<String> expectedusers = externalAccessRolesController.getUsersOfApplication(mockedRequest, mockedResponse);
+// assertEquals(users, expectedusers);
+// }
+
+// @Test
+// public void getUsersOfApplicationExceptionTest() throws Exception {
+// Mockito.when(externalAccessRolesService.getAllUsers(mockedRequest.getHeader(uebKey)))
+// .thenThrow(httpClientErrorException);
+// assertNull(externalAccessRolesController.getUsersOfApplication(mockedRequest, mockedResponse));
+// }
+
+ @Test
+ public void saveRoleExceptionTest() throws Exception {
+ Role role = new Role();
+ PortalRestResponse<String> portalRestResponse = null;
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("Failed to saveRole");
+ expectedportalRestResponse.setResponse("Failed");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ List<Role> upload = new ArrayList<>();
+ portalRestResponse = externalAccessRolesController.saveRole(mockedRequest, mockedResponse,role);
+ assertEquals(portalRestResponse, expectedportalRestResponse);
+ }
+
+ @Test
+ public void deleteRoleExceptionTest() throws Exception {
+ String role = "TestNew";
+ PortalRestResponse<String> portalRestResponse = null;
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("Failed to deleteRole for 'TestNew'");
+ expectedportalRestResponse.setResponse("Failed");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ portalRestResponse = externalAccessRolesController.deleteRole(mockedRequest, mockedResponse,role);
+ assertEquals(portalRestResponse, expectedportalRestResponse);
+ }
+
+
+ @Test
+ public void bulkUploadPartnerRoleFunctionsTest() throws Exception {
+ PortalRestResponse<String> portalRestResponse = null;
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("Successfully added");
+ expectedportalRestResponse.setResponse("Success");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
+ List<Role> upload = new ArrayList<>();
+ portalRestResponse = externalAccessRolesController.bulkUploadPartnerRoleFunctions(mockedRequest, mockedResponse,upload);
+ assertEquals(portalRestResponse, expectedportalRestResponse);
+ }
+
+ @Test
+ public void getUsersOfApplicationTest() throws Exception
+ {
+ List<EcompUser> users = new ArrayList<>();
+ EcompUser user = new EcompUser();
+ user.setOrgUserId("guestT");
+ users.add(user);
+ Mockito.when(externalAccessRolesService.getAllAppUsers(mockedRequest.getHeader(uebKey))).thenReturn(users);
+ List<EcompUser> expectedUsers = externalAccessRolesController.getUsersOfApplication(mockedRequest, mockedResponse);
+ assertEquals(expectedUsers, users);
+ }
+
+ @Test(expected = Exception.class)
+ public void getUsersOfApplicationExceptionTest() throws Exception
+ {
+ List<EcompUser> users = new ArrayList<>();
+ EcompUser user = new EcompUser();
+ user.setOrgUserId("guestT");
+ users.add(user);
+ Mockito.when(externalAccessRolesService.getAllAppUsers(mockedRequest.getHeader(uebKey))).thenThrow(nullPointerException);
+ assertNull(externalAccessRolesController.getUsersOfApplication(mockedRequest, mockedResponse));
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/ExternalAppsRestfulControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/ExternalAppsRestfulControllerTest.java
new file mode 100644
index 00000000..9bc44174
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/ExternalAppsRestfulControllerTest.java
@@ -0,0 +1,174 @@
+package org.openecomp.portalapp.portal.controller;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
+import org.openecomp.portalapp.portal.controller.ExternalAppsRestfulController;
+import org.openecomp.portalapp.portal.core.MockEPUser;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.service.AdminRolesService;
+import org.openecomp.portalapp.portal.service.AdminRolesServiceImpl;
+import org.openecomp.portalapp.portal.service.EPLoginService;
+import org.openecomp.portalapp.portal.service.EPLoginServiceImpl;
+import org.openecomp.portalapp.portal.service.EPRoleService;
+import org.openecomp.portalapp.portal.service.EPRoleServiceImpl;
+import org.openecomp.portalapp.portal.service.FunctionalMenuService;
+import org.openecomp.portalapp.portal.service.FunctionalMenuServiceImpl;
+import org.openecomp.portalapp.portal.service.UserNotificationService;
+import org.openecomp.portalapp.portal.service.UserNotificationServiceImpl;
+import org.openecomp.portalapp.portal.transport.FavoritesFunctionalMenuItemJson;
+import org.openecomp.portalapp.portal.transport.FunctionalMenuItem;
+import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;
+import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
+import org.openecomp.portalsdk.core.service.DataAccessService;
+import org.openecomp.portalsdk.core.service.DataAccessServiceImpl;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+import org.slf4j.MDC;
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest({ MDC.class, EPCommonSystemProperties.class })
+public class ExternalAppsRestfulControllerTest {
+
+ @InjectMocks
+ ExternalAppsRestfulController externalAppsRestfulController = new ExternalAppsRestfulController();
+ @Mock
+ FunctionalMenuService functionalMenuService = new FunctionalMenuServiceImpl();
+
+ @Mock
+ EPLoginService epLoginService = new EPLoginServiceImpl();
+
+ @Mock
+ AdminRolesService adminRolesService = new AdminRolesServiceImpl();
+
+ @Mock
+ UserNotificationService userNotificationService = new UserNotificationServiceImpl();
+
+ @Mock
+ EPRoleService epRoleService = new EPRoleServiceImpl();
+
+ @Mock
+ EcompPortalUtils EcompPortalUtils = new EcompPortalUtils();
+
+ @Mock
+ DataAccessService DataAccessService = new DataAccessServiceImpl();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+ NullPointerException nullPointerException = new NullPointerException();
+
+ MockEPUser mockUser = new MockEPUser();
+
+ @Test(expected = Exception.class)
+ public void getFunctionalMenuItemsForUserIfUSerNullTest() throws
+ Exception
+ {
+ PowerMockito.mockStatic(EPCommonSystemProperties.class);
+ PowerMockito.mockStatic(MDC.class);
+ EPUser epUser = null;
+ String loginId = "guestT";
+ Mockito.when(MDC.get(EPCommonSystemProperties.PARTNER_NAME)).thenReturn("Test");
+ Mockito.when(epLoginService.findUserWithoutPwd(loginId)).thenReturn(epUser);
+ externalAppsRestfulController.getFunctionalMenuItemsForUser(mockedRequest,
+ mockedResponse);
+ }
+
+ @Test
+ public void getFunctionalMenuItemsForUserIfSuperAdminTest() throws Exception {
+ PowerMockito.mockStatic(EPCommonSystemProperties.class);
+ PowerMockito.mockStatic(MDC.class);
+ EPUser epUser = mockUser.mockEPUser();
+ epUser.setId((long) 1);
+ epUser.setLoginId("guestT");
+ String loginId = "guestT";
+ Mockito.when(MDC.get(EPCommonSystemProperties.PARTNER_NAME)).thenReturn("Test");
+ Mockito.when(epLoginService.findUserWithoutPwd(loginId)).thenReturn(epUser);
+ List<FunctionalMenuItem> expectedList = new ArrayList<FunctionalMenuItem>();
+ FunctionalMenuItem functionalMenuItem = new FunctionalMenuItem();
+ expectedList.add(functionalMenuItem);
+ Mockito.when(mockedRequest.getHeader("LoginId")).thenReturn("guestT");
+ Mockito.when(adminRolesService.isSuperAdmin(epUser)).thenReturn(true);
+ Mockito.when(functionalMenuService.getFunctionalMenuItems()).thenReturn(expectedList);
+ List<FunctionalMenuItem> actualList = externalAppsRestfulController.getFunctionalMenuItemsForUser(mockedRequest,
+ mockedResponse);
+ assertNull(actualList.get(0).menuId);
+ }
+
+ @Test
+ public void getFunctionalMenuItemsForUserTest() throws Exception {
+ PowerMockito.mockStatic(EPCommonSystemProperties.class);
+ PowerMockito.mockStatic(MDC.class);
+ EPUser epUser = mockUser.mockEPUser();
+ epUser.setId((long) 1);
+ epUser.setLoginId("guestT");
+ String loginId = "guestT";
+ Mockito.when(MDC.get(EPCommonSystemProperties.PARTNER_NAME)).thenReturn("Test");
+ Mockito.when(epLoginService.findUserWithoutPwd(loginId)).thenReturn(epUser);
+ List<FunctionalMenuItem> expectedList = new ArrayList<FunctionalMenuItem>();
+ FunctionalMenuItem functionalMenuItem = new FunctionalMenuItem();
+ expectedList.add(functionalMenuItem);
+ Mockito.when(mockedRequest.getHeader("LoginId")).thenReturn("guestT");
+ Mockito.when(adminRolesService.isSuperAdmin(epUser)).thenReturn(false);
+ Mockito.when(functionalMenuService.getFunctionalMenuItemsForUser(epUser.getOrgUserId()))
+ .thenReturn(expectedList);
+ List<FunctionalMenuItem> actualList = externalAppsRestfulController.getFunctionalMenuItemsForUser(mockedRequest,
+ mockedResponse);
+ assertNull(actualList.get(0).menuId);
+ }
+
+ @Test(expected = Exception.class)
+ public void getFavoritesForUserIfUserNullTest() throws Exception {
+ List<FavoritesFunctionalMenuItemJson> favorites = new ArrayList<FavoritesFunctionalMenuItemJson>();
+ FavoritesFunctionalMenuItemJson favoritesFunctionalMenuItemJson = new FavoritesFunctionalMenuItemJson();
+ favorites.add(favoritesFunctionalMenuItemJson);
+ PowerMockito.mockStatic(EPCommonSystemProperties.class);
+ PowerMockito.mockStatic(MDC.class);
+ Mockito.when(mockedRequest.getHeader(EPCommonSystemProperties.MDC_LOGIN_ID)).thenReturn("Login_URL");
+ Mockito.when(MDC.get(EPCommonSystemProperties.PARTNER_NAME)).thenReturn("Test");
+ EPUser epUser = null;
+ externalAppsRestfulController.getFavoritesForUser(mockedRequest, mockedResponse);
+ }
+
+ @Test
+ public void getFavoritesForUserTest() throws Exception {
+ PowerMockito.mockStatic(EPCommonSystemProperties.class);
+ PowerMockito.mockStatic(MDC.class);
+ EPUser epUser = mockUser.mockEPUser();
+ epUser.setId((long) 1);
+ epUser.setLoginId("guestT");
+ String loginId = "guestT";
+ Mockito.when(MDC.get(EPCommonSystemProperties.PARTNER_NAME)).thenReturn("Test");
+ List<FavoritesFunctionalMenuItemJson> favorites = new ArrayList<FavoritesFunctionalMenuItemJson>();
+ FavoritesFunctionalMenuItemJson favoritesFunctionalMenuItemJson = new FavoritesFunctionalMenuItemJson();
+ favorites.add(favoritesFunctionalMenuItemJson);
+ Mockito.when(mockedRequest.getHeader(EPCommonSystemProperties.MDC_LOGIN_ID)).thenReturn("Login_URL");
+ Mockito.when(MDC.get(EPCommonSystemProperties.PARTNER_NAME)).thenReturn("Test");
+ Mockito.when(epLoginService.findUserWithoutPwd("Login_URL")).thenReturn(epUser);
+ Mockito.when(functionalMenuService.getFavoriteItems(epUser.getId())).thenReturn(favorites);
+ List<FavoritesFunctionalMenuItemJson> actaulFavorites = externalAppsRestfulController
+ .getFavoritesForUser(mockedRequest, mockedResponse);
+ assertEquals(actaulFavorites.size(), 1);
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/FunctionalMenuControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/FunctionalMenuControllerTest.java
new file mode 100644
index 00000000..af0a588f
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/FunctionalMenuControllerTest.java
@@ -0,0 +1,506 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.controller;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.mockito.runners.MockitoJUnitRunner;
+import org.openecomp.portalapp.portal.controller.FunctionalMenuController;
+import org.openecomp.portalapp.portal.core.MockEPUser;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
+import org.openecomp.portalapp.portal.service.AdminRolesService;
+import org.openecomp.portalapp.portal.service.AdminRolesServiceImpl;
+import org.openecomp.portalapp.portal.service.FunctionalMenuService;
+import org.openecomp.portalapp.portal.service.FunctionalMenuServiceImpl;
+import org.openecomp.portalapp.portal.service.SearchService;
+import org.openecomp.portalapp.portal.transport.BusinessCardApplicationRole;
+import org.openecomp.portalapp.portal.transport.BusinessCardApplicationRolesList;
+import org.openecomp.portalapp.portal.transport.FavoritesFunctionalMenuItem;
+import org.openecomp.portalapp.portal.transport.FavoritesFunctionalMenuItemJson;
+import org.openecomp.portalapp.portal.transport.FieldsValidator;
+import org.openecomp.portalapp.portal.transport.FieldsValidator.FieldName;
+import org.openecomp.portalapp.portal.transport.FunctionalMenuItem;
+import org.openecomp.portalapp.portal.transport.FunctionalMenuItemWithRoles;
+import org.openecomp.portalapp.util.EPUserUtils;
+import org.openecomp.portalsdk.core.service.DataAccessService;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest(SystemProperties.class)
+public class FunctionalMenuControllerTest extends MockitoTestSuite {
+
+ String userid = "ab1234";
+
+ @Mock
+ FunctionalMenuService functionalMenuService = new FunctionalMenuServiceImpl();
+
+ @InjectMocks
+ FunctionalMenuController functionalMenuController = new FunctionalMenuController();
+
+ @Mock
+ private DataAccessService dataAccessService;
+
+ @Mock
+ SearchService searchService;
+
+ @Mock
+ AdminRolesService adminRolesService = new AdminRolesServiceImpl();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+
+ @InjectMocks
+ EPUserUtils ePUserUtils = new EPUserUtils();
+
+ @Mock
+ EPUser epuser;
+
+ MockEPUser mockUser = new MockEPUser();
+
+ List<BusinessCardApplicationRolesList> appRoles = new ArrayList<BusinessCardApplicationRolesList>();
+ List<BusinessCardApplicationRolesList> appRolesActual = new ArrayList<BusinessCardApplicationRolesList>();
+
+ List<BusinessCardApplicationRole> userAppRoleList = new ArrayList<BusinessCardApplicationRole>();
+
+ public List<BusinessCardApplicationRole> mockBusinessCardApplicationRole() {
+ List<BusinessCardApplicationRole> userAppRoleList = new ArrayList<BusinessCardApplicationRole>();
+
+ BusinessCardApplicationRole businessCardApplicationRole = new BusinessCardApplicationRole();
+ businessCardApplicationRole.setRoleName("ADMIN");
+ businessCardApplicationRole.setAppName("ASDC");
+
+ BusinessCardApplicationRole businessCardApplicationRole1 = new BusinessCardApplicationRole();
+ businessCardApplicationRole1.setAppName("ASDC");
+ businessCardApplicationRole1.setRoleName("Tester");
+
+ userAppRoleList.add(businessCardApplicationRole);
+ userAppRoleList.add(businessCardApplicationRole1);
+ return userAppRoleList;
+ }
+
+ public List<BusinessCardApplicationRolesList> mockBusinessCardApplicationRolesList() {
+ List<BusinessCardApplicationRolesList> appRolesActual = new ArrayList<BusinessCardApplicationRolesList>();
+
+ BusinessCardApplicationRolesList businessCardApplicationRolesList = new BusinessCardApplicationRolesList();
+ businessCardApplicationRolesList.setAppName("ASDC");
+
+ List<String> roleNames = new ArrayList<String>();
+ roleNames.add("ADMIN");
+ roleNames.add("Tester");
+ businessCardApplicationRolesList.setRoleNames(roleNames);
+
+ appRolesActual.add(businessCardApplicationRolesList);
+ return appRolesActual;
+ }
+
+ @Test
+ public void getAppListTestIfAppAlredyExistsBusinessCardApplicationRolesList() throws IOException {
+
+ userAppRoleList = mockBusinessCardApplicationRole();
+ appRolesActual = mockBusinessCardApplicationRolesList();
+
+ Mockito.when(functionalMenuService.getUserAppRolesList(userid)).thenReturn(userAppRoleList);
+
+ appRoles = functionalMenuController.getAppList(mockedRequest, userid);
+
+ assertEquals(appRolesActual.size(), appRoles.size());
+ assertEquals(appRolesActual.get(0).getAppName(), appRoles.get(0).getAppName());
+ assertEquals(appRolesActual.get(0).getRoleNames(), appRoles.get(0).getRoleNames());
+
+ }
+
+ @Test
+ public void getAppListTestIfAppDoesnotExistsInBusinessCardApplicationRolesList() throws IOException {
+
+ userAppRoleList = mockBusinessCardApplicationRole();
+ BusinessCardApplicationRole businessCardApplicationRole = new BusinessCardApplicationRole();
+ businessCardApplicationRole.setAppName("CCD");
+ businessCardApplicationRole.setRoleName("ADMIN");
+ userAppRoleList.add(businessCardApplicationRole);
+ appRolesActual = mockBusinessCardApplicationRolesList();
+ BusinessCardApplicationRolesList businessCardApplicationRolesList = new BusinessCardApplicationRolesList();
+ businessCardApplicationRolesList.setAppName("CCD");
+ List<String> roleNames1 = new ArrayList<String>();
+ roleNames1.add("ADMIN");
+ businessCardApplicationRolesList.setRoleNames(roleNames1);
+ appRolesActual.add(businessCardApplicationRolesList);
+ Mockito.when(functionalMenuService.getUserAppRolesList(userid)).thenReturn(userAppRoleList);
+ appRoles = functionalMenuController.getAppList(mockedRequest, userid);
+ assertEquals(appRolesActual.size(), appRoles.size());
+ assertEquals(appRolesActual.get(0).getAppName(), appRoles.get(0).getAppName());
+ assertEquals(appRolesActual.get(0).getRoleNames(), appRoles.get(0).getRoleNames());
+ assertEquals(appRolesActual.get(1).getAppName(), appRoles.get(1).getAppName());
+ assertEquals(appRolesActual.get(1).getRoleNames(), appRoles.get(1).getRoleNames());
+
+ }
+
+ @Test
+ public void regenerateAncestorTableTest() {
+ EPUser user = mockUser.mockEPUser();
+
+ HttpSession session = mockedRequest.getSession();
+ session.setAttribute(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ FieldsValidator acutualFieldValidator = null;
+ FieldsValidator expectedFieldValidator = new FieldsValidator();
+ List<FieldName> fields = new ArrayList<>();
+ expectedFieldValidator.setHttpStatusCode((long) 200);
+ expectedFieldValidator.setFields(fields);
+ expectedFieldValidator.setErrorCode(null);
+ Mockito.when(!adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ Mockito.when(functionalMenuService.regenerateAncestorTable()).thenReturn(expectedFieldValidator);
+ acutualFieldValidator = functionalMenuController.regenerateAncestorTable(mockedRequest, mockedResponse);
+ assertTrue(acutualFieldValidator.equals(expectedFieldValidator));
+ }
+
+ @Test
+ public void getFunctionalMenuStaticInfoExceptionTest(){
+ String fnMenuStaticactualResponse = null;
+ String fnMenuStaticexpectedResponse = null;
+ String orgUserIdStr = null;
+
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(searchService.searchUserByUserId(orgUserIdStr)).thenReturn(user);
+ fnMenuStaticactualResponse = functionalMenuController.getFunctionalMenuStaticInfo(mockedRequest, mockedResponse);
+
+ assertEquals(fnMenuStaticactualResponse, fnMenuStaticexpectedResponse);
+
+ }
+
+ @Test
+ public void getFunctionalMenuStaticInfoTest(){
+ String fnMenuStaticactualResponse = null;
+ String fnMenuStaticexpectedResponse = "{\"firstName\":\"test\",\"lastName\":\"test\",\"last_login\":\"09/08/2017 03:48:13-0400\",\"userId\":\"guestT\",\"email\":\"test\"}";
+ String orgUserIdStr = null;
+
+ EPUser user = mockUser.mockEPUser();
+ user.setEmail("test");
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(searchService.searchUserByUserId(orgUserIdStr)).thenReturn(user);
+ fnMenuStaticactualResponse = functionalMenuController.getFunctionalMenuStaticInfo(mockedRequest, mockedResponse);
+ assertEquals(fnMenuStaticactualResponse.length(), fnMenuStaticexpectedResponse.length());
+ }
+
+ @Test
+ public void getMenuItemsForAuthUserNullTest(){
+ List<FunctionalMenuItem> actualmenuItems = null;
+ List<FunctionalMenuItem> expectedmenuItems = null;
+
+ actualmenuItems = functionalMenuController.getMenuItemsForAuthUser(mockedRequest, mockedResponse);
+ assertEquals(actualmenuItems, expectedmenuItems);
+ }
+
+ @Test
+ public void getMenuItemsForAuthUserIsSuperAdminTest(){
+ List<FunctionalMenuItem> actualmenuItems = null;
+ List<FunctionalMenuItem> expectedmenuItems = new ArrayList<FunctionalMenuItem>();
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+
+ actualmenuItems = functionalMenuController.getMenuItemsForAuthUser(mockedRequest, mockedResponse);
+ assertEquals(actualmenuItems, expectedmenuItems);
+ }
+
+ @Test
+ public void getMenuItemsForAuthUserTest(){
+ List<FunctionalMenuItem> actualmenuItems = null;
+ List<FunctionalMenuItem> expectedmenuItems = new ArrayList<FunctionalMenuItem>();
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+
+ actualmenuItems = functionalMenuController.getMenuItemsForAuthUser(mockedRequest, mockedResponse);
+ assertEquals(actualmenuItems, expectedmenuItems);
+ }
+
+ @Test
+ public void getFunctionalMenuItemDetailsBadPermissionTest(){
+ Integer menuId = 1234;
+ FunctionalMenuItem actualmenuItem = null;
+ FunctionalMenuItem expectedmenuItem = null;
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+
+ actualmenuItem = functionalMenuController.getFunctionalMenuItemDetails(mockedRequest, menuId, mockedResponse);
+ assertEquals(actualmenuItem, expectedmenuItem);
+ }
+
+ @Test
+ public void getFunctionalMenuItemDetailsTest(){
+ Integer menuId = 1234;
+ FunctionalMenuItem actualmenuItem = null;
+ FunctionalMenuItem expectedmenuItem = null;
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(functionalMenuService.getFunctionalMenuItemDetails(menuId)).thenReturn(actualmenuItem);
+
+ actualmenuItem = functionalMenuController.getFunctionalMenuItemDetails(mockedRequest, menuId, mockedResponse);
+ assertEquals(actualmenuItem, expectedmenuItem);
+ }
+
+ @Test
+ public void getMenuItemsForEditingTest(){
+ List<FunctionalMenuItem> actualMenuItems = null;
+ List<FunctionalMenuItem> expectedMenuItems = null;
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(functionalMenuService.getFunctionalMenuItems(true)).thenReturn(actualMenuItems);
+
+ actualMenuItems = functionalMenuController.getMenuItemsForEditing(mockedRequest, mockedResponse);
+ assertEquals(actualMenuItems, expectedMenuItems);
+ }
+
+ @Test
+ public void getMenuItemsForEditingBadPermissionsTest(){
+ List<FunctionalMenuItem> actualMenuItems = null;
+ List<FunctionalMenuItem> expectedMenuItems = null;
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(functionalMenuService.getFunctionalMenuItems(true)).thenReturn(actualMenuItems);
+
+ actualMenuItems = functionalMenuController.getMenuItemsForEditing(mockedRequest, mockedResponse);
+ assertEquals(actualMenuItems, expectedMenuItems);
+ }
+
+ @Test
+ public void getMenuItemsForNotificationsTest(){
+ List<FunctionalMenuItem> actualMenuItems = null;
+ List<FunctionalMenuItem> expectedMenuItems = new ArrayList<FunctionalMenuItem>();
+ Mockito.when(functionalMenuService.getFunctionalMenuItemsForNotificationTree(false)).thenReturn(actualMenuItems);
+
+ actualMenuItems = functionalMenuController.getMenuItemsForNotifications(mockedRequest, mockedResponse);
+ assertEquals(actualMenuItems, expectedMenuItems);
+ }
+
+ @Test
+ public void getMenuItemsForAppTest(){
+ Integer appId = 1234;
+ List<FunctionalMenuItem> actualMenuItems = null;
+ List<FunctionalMenuItem> expectedMenuItems = null;
+ Mockito.when(functionalMenuService.getFunctionalMenuItemsForApp(appId)).thenReturn(actualMenuItems);
+
+ actualMenuItems = functionalMenuController.getMenuItemsForApp(mockedRequest, appId);
+ assertEquals(actualMenuItems, expectedMenuItems);
+ }
+
+ @Test
+ public void getMenuItemsForUserTest(){
+ String orgUserId ="test";
+ List<FunctionalMenuItem> actualMenuItems = null;
+ List<FunctionalMenuItem> expectedMenuItems = null;
+ Mockito.when(functionalMenuService.getFunctionalMenuItemsForUser(orgUserId)).thenReturn(actualMenuItems);
+
+ actualMenuItems = functionalMenuController.getMenuItemsForUser(mockedRequest, orgUserId);
+ assertEquals(actualMenuItems, expectedMenuItems);
+ }
+
+ @Test
+ public void createFunctionalMenuItemTest(){
+ FieldsValidator actualFieldsValidator = new FieldsValidator();
+ FieldsValidator expectedFieldsValidator = new FieldsValidator();
+ List<FieldName> fields = new ArrayList<>();
+ expectedFieldsValidator.setHttpStatusCode((long) 200);
+ expectedFieldsValidator.setFields(fields);
+ expectedFieldsValidator.setErrorCode(null);
+ FunctionalMenuItemWithRoles menuItemJson = new FunctionalMenuItemWithRoles();
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ Mockito.when(functionalMenuService.createFunctionalMenuItem(menuItemJson)).thenReturn(expectedFieldsValidator);
+ actualFieldsValidator = functionalMenuController.createFunctionalMenuItem(mockedRequest, menuItemJson, mockedResponse);
+ assertEquals(actualFieldsValidator, expectedFieldsValidator);
+ }
+
+ @Test
+ public void createFunctionalMenuItemBadPermisssionsTest(){
+ FieldsValidator actualFieldsValidator = null;
+ FieldsValidator expectedFieldsValidator = null;
+ FunctionalMenuItemWithRoles menuItemJson = new FunctionalMenuItemWithRoles();
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+ Mockito.when(functionalMenuService.createFunctionalMenuItem(menuItemJson)).thenReturn(expectedFieldsValidator);
+ actualFieldsValidator = functionalMenuController.createFunctionalMenuItem(mockedRequest, menuItemJson, mockedResponse);
+ assertEquals(actualFieldsValidator, expectedFieldsValidator);
+ }
+
+ @Test
+ public void getFavoritesForUserTest(){
+ List<FavoritesFunctionalMenuItemJson> actualFavoritesFunctionalMenuItemsJson = null;
+ List<FavoritesFunctionalMenuItemJson> expectedFunctionalMenuItemsJson = new ArrayList<FavoritesFunctionalMenuItemJson>();
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+ Mockito.when(functionalMenuService.getFavoriteItems(user.getId())).thenReturn(expectedFunctionalMenuItemsJson);
+ actualFavoritesFunctionalMenuItemsJson = functionalMenuController.getFavoritesForUser(mockedRequest, mockedResponse);
+ assertEquals(actualFavoritesFunctionalMenuItemsJson, expectedFunctionalMenuItemsJson);
+ }
+
+ @Test
+ public void deleteFavoriteItemTest(){
+ Long userId = (long)1;
+ Long menuId = (long)1;
+ FieldsValidator actualFieldsValidator = new FieldsValidator();
+ FieldsValidator expectedFieldsValidator = new FieldsValidator();
+ List<FieldName> fields = new ArrayList<>();
+ expectedFieldsValidator.setHttpStatusCode((long) 200);
+ expectedFieldsValidator.setFields(fields);
+ expectedFieldsValidator.setErrorCode(null);
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(functionalMenuService.removeFavoriteItem(user.getId(), menuId)).thenReturn(actualFieldsValidator);
+ actualFieldsValidator = functionalMenuController.deleteFavoriteItem(mockedRequest, menuId, mockedResponse);
+ assertEquals(actualFieldsValidator, expectedFieldsValidator);
+ }
+
+ @Test
+ public void addFavoriteItemTest(){
+ FavoritesFunctionalMenuItem menuItemJson = new FavoritesFunctionalMenuItem();
+ FieldsValidator actualFieldsValidator = new FieldsValidator();
+ FieldsValidator expectedFieldsValidator = new FieldsValidator();
+ List<FieldName> fields = new ArrayList<>();
+ expectedFieldsValidator.setHttpStatusCode((long) 200);
+ expectedFieldsValidator.setFields(fields);
+ expectedFieldsValidator.setErrorCode(null);
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(functionalMenuService.setFavoriteItem(menuItemJson)).thenReturn(actualFieldsValidator);
+ actualFieldsValidator = functionalMenuController.addFavoriteItem(mockedRequest, menuItemJson, mockedResponse);
+ assertEquals(actualFieldsValidator, expectedFieldsValidator);
+ }
+
+ @Test
+ public void getMenuItemsTest(){
+ List<FunctionalMenuItem> actualFunctionalMenuItems = new ArrayList<FunctionalMenuItem>();
+ List<FunctionalMenuItem> expectedFunctionalMenuItems = new ArrayList<FunctionalMenuItem>();
+ List<FunctionalMenuItem> menuItems = new ArrayList<FunctionalMenuItem>();
+ Mockito.when(functionalMenuService.getFunctionalMenuItems()).thenReturn(menuItems);
+ actualFunctionalMenuItems = functionalMenuController.getMenuItems(mockedRequest, mockedResponse);
+ assertEquals(actualFunctionalMenuItems, expectedFunctionalMenuItems);
+ }
+
+ @Test
+ public void deleteFunctionalMenuItemTest(){
+ Long menuId = (long)1;
+ FieldsValidator actualFieldsValidator = new FieldsValidator();
+ FieldsValidator expectedFieldsValidator = new FieldsValidator();
+ List<FieldName> fields = new ArrayList<>();
+ expectedFieldsValidator.setHttpStatusCode((long) 200);
+ expectedFieldsValidator.setFields(fields);
+ expectedFieldsValidator.setErrorCode(null);
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ Mockito.when(functionalMenuService.deleteFunctionalMenuItem(menuId)).thenReturn(actualFieldsValidator);
+ actualFieldsValidator = functionalMenuController.deleteFunctionalMenuItem(mockedRequest, menuId, mockedResponse);
+ assertEquals(actualFieldsValidator, expectedFieldsValidator);
+ }
+
+ @Test
+ public void deleteFunctionalMenuItemBadPermissionsTest(){
+ Long menuId = (long)1;
+ FieldsValidator actualFieldsValidator = null;
+ FieldsValidator expectedFieldsValidator = null;
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+ Mockito.when(functionalMenuService.deleteFunctionalMenuItem(menuId)).thenReturn(actualFieldsValidator);
+ actualFieldsValidator = functionalMenuController.deleteFunctionalMenuItem(mockedRequest, menuId, mockedResponse);
+ assertEquals(actualFieldsValidator, expectedFieldsValidator);
+ }
+
+ @Test
+ public void editFunctionalMenuItemTest(){
+ FunctionalMenuItemWithRoles menuItemJson = new FunctionalMenuItemWithRoles();
+ FieldsValidator actualFieldsValidator = new FieldsValidator();
+ FieldsValidator expectedFieldsValidator = new FieldsValidator();
+ List<FieldName> fields = new ArrayList<>();
+ expectedFieldsValidator.setHttpStatusCode((long) 200);
+ expectedFieldsValidator.setFields(fields);
+ expectedFieldsValidator.setErrorCode(null);
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ Mockito.when(functionalMenuService.editFunctionalMenuItem(menuItemJson)).thenReturn(actualFieldsValidator);
+ actualFieldsValidator = functionalMenuController.editFunctionalMenuItem(mockedRequest, menuItemJson, mockedResponse);
+ assertEquals(actualFieldsValidator, expectedFieldsValidator);
+ }
+
+ @Test
+ public void editFunctionalMenuItemBadPermissionsTest(){
+ FunctionalMenuItemWithRoles menuItemJson = new FunctionalMenuItemWithRoles();
+ FieldsValidator actualFieldsValidator = null;
+ FieldsValidator expectedFieldsValidator = null;
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+ Mockito.when(functionalMenuService.editFunctionalMenuItem(menuItemJson)).thenReturn(actualFieldsValidator);
+ actualFieldsValidator = functionalMenuController.editFunctionalMenuItem(mockedRequest, menuItemJson, mockedResponse);
+ assertEquals(actualFieldsValidator, expectedFieldsValidator);
+ }
+
+ @Test
+ public void getECOMPTitleTest(){
+ PortalRestResponse<String> actualportalRestResponse = null;
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setStatus(PortalRestStatusEnum.OK);
+ expectedportalRestResponse.setMessage("success");
+ expectedportalRestResponse.setResponse("Portal");
+ PowerMockito.mockStatic(SystemProperties.class);
+ Mockito.when(SystemProperties.getProperty(SystemProperties.APP_DISPLAY_NAME)).thenReturn("Portal");
+ actualportalRestResponse = functionalMenuController.getECOMPTitle(mockedRequest, mockedResponse);
+ assertEquals(actualportalRestResponse, expectedportalRestResponse);
+ }
+
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/GetAccessControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/GetAccessControllerTest.java
new file mode 100644
index 00000000..8ee27f8d
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/GetAccessControllerTest.java
@@ -0,0 +1,71 @@
+package org.openecomp.portalapp.portal.controller;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
+import org.openecomp.portalapp.portal.controller.GetAccessController;
+import org.openecomp.portalapp.portal.core.MockEPUser;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.domain.GetAccessResult;
+import org.openecomp.portalapp.portal.service.GetAccessService;
+import org.openecomp.portalapp.portal.service.GetAccessServiceImpl;
+import org.openecomp.portalapp.util.EPUserUtils;
+
+public class GetAccessControllerTest {
+
+ @Mock
+ GetAccessService getAccessService = new GetAccessServiceImpl();
+
+ @InjectMocks
+ GetAccessController getAccessController = new GetAccessController();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+ MockEPUser mockUser = new MockEPUser();
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+ NullPointerException nullPointerException = new NullPointerException();
+
+
+ @Test
+ public void getAppList() throws IOException
+ {
+ List<GetAccessResult> expectedAppsList = new ArrayList<GetAccessResult>();
+ EPUser user = mockUser.mockEPUser();
+ GetAccessResult getAccessResult = new GetAccessResult();
+ getAccessResult.setRowId("1");
+ getAccessResult.setRoleId((long) 1);
+ getAccessResult.setEcompFunction("test");
+ getAccessResult.setAppName("Test_App");
+ getAccessResult.setAppMotsId(1);
+ getAccessResult.setRoleName("Test_role");
+ getAccessResult.setRoleActive("N");
+ getAccessResult.setReqType("test");
+
+ expectedAppsList.add(getAccessResult);
+
+ List<GetAccessResult> actualAppsList = null;
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(getAccessService.getAppAccessList(user)).thenReturn(expectedAppsList);
+ actualAppsList = getAccessController.getAppList(mockedRequest);
+ assertTrue(actualAppsList.contains(getAccessResult));
+ }
+
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/ManifestControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/ManifestControllerTest.java
new file mode 100644
index 00000000..c7a870cf
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/ManifestControllerTest.java
@@ -0,0 +1,56 @@
+package org.openecomp.portalapp.portal.controller;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.jar.Attributes;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
+import org.openecomp.portalapp.portal.controller.ManifestController;
+import org.openecomp.portalapp.portal.service.ManifestService;
+import org.openecomp.portalapp.portal.service.ManifestServiceImpl;
+
+public class ManifestControllerTest extends MockitoTestSuite{
+
+
+ @Mock
+ ManifestService manifestService = new ManifestServiceImpl();
+
+ @InjectMocks
+ ManifestController manifestController = new ManifestController();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+ NullPointerException nullPointerException = new NullPointerException();
+
+ @Test
+ public void getManifestTest() throws IOException
+ {
+ Map<String, Object> expectedResponse = new HashMap<String, Object>();
+ Attributes attributes = new Attributes();
+ expectedResponse.put("test", attributes);
+ Mockito.when(manifestService.getWebappManifest()).thenReturn(attributes);
+ Map<String, Object> actualResponse = manifestController.getManifest(mockedRequest);
+ assertTrue((actualResponse.keySet().toArray().length) == 1);
+
+ }
+
+ @Test
+ public void getManifestExceptionTest() throws IOException
+ {
+ Mockito.when(manifestService.getWebappManifest()).thenThrow(nullPointerException);
+ Map<String, Object> actualResponse = manifestController.getManifest(mockedRequest);
+ assertTrue((actualResponse.keySet().toArray().length) == 1);
+ assertTrue(actualResponse.get("error").equals("failed to get manifest: java.lang.NullPointerException"));
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/MicroserviceControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/MicroserviceControllerTest.java
new file mode 100644
index 00000000..0b12e3bc
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/MicroserviceControllerTest.java
@@ -0,0 +1,232 @@
+package org.openecomp.portalapp.portal.controller;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
+import org.openecomp.portalapp.portal.controller.MicroserviceController;
+import org.openecomp.portalapp.portal.domain.MicroserviceData;
+import org.openecomp.portalapp.portal.domain.WidgetCatalog;
+import org.openecomp.portalapp.portal.domain.WidgetServiceHeaders;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.openecomp.portalapp.portal.service.ConsulHealthService;
+import org.openecomp.portalapp.portal.service.ConsulHealthServiceImpl;
+import org.openecomp.portalapp.portal.service.MicroserviceService;
+import org.openecomp.portalapp.portal.service.MicroserviceServiceImpl;
+import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+import org.springframework.core.ParameterizedTypeReference;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.client.RestTemplate;
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest(WidgetServiceHeaders.class)
+public class MicroserviceControllerTest extends MockitoTestSuite{
+
+ @InjectMocks
+ MicroserviceController microserviceController = new MicroserviceController();
+
+ @Mock
+ ConsulHealthService consulHealthService = new ConsulHealthServiceImpl();
+
+ @Mock
+ MicroserviceService microserviceService = new MicroserviceServiceImpl();
+
+ @Mock
+ RestTemplate template = new RestTemplate();
+
+ @Mock
+ MicroserviceData microserviceData = new MicroserviceData();
+
+ @SuppressWarnings("rawtypes")
+ @Mock
+ ResponseEntity<List<WidgetCatalog>> ans = new ResponseEntity<List<WidgetCatalog>>(HttpStatus.OK);
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ @Mock
+ EcompPortalUtils EcompPortalUtils = new EcompPortalUtils();
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+ NullPointerException nullPointerException = new NullPointerException();
+
+ @Test
+ public void createMicroserviceIfServiceDataNullTest() throws Exception {
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("FAILURE");
+ expectedportalRestResponse.setResponse("MicroserviceData cannot be null or empty");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ MicroserviceData microserviceData = null;
+ PortalRestResponse<String> actualportalRestResponse = microserviceController.createMicroservice(mockedRequest,
+ mockedResponse, microserviceData);
+ assertEquals(actualportalRestResponse, expectedportalRestResponse);
+ }
+
+ @Test
+ public void createMicroserviceTest() throws Exception {
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("SUCCESS");
+ expectedportalRestResponse.setResponse("");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
+ PortalRestResponse<String> actualportalRestResponse = microserviceController.createMicroservice(mockedRequest,
+ mockedResponse, microserviceData);
+ assertEquals(actualportalRestResponse, expectedportalRestResponse);
+ }
+
+ @Test
+ public void createMicroserviceExceptionTest() throws Exception {
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("FAILURE");
+ expectedportalRestResponse.setResponse(null);
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ Mockito.when(microserviceService.saveMicroservice(microserviceData)).thenReturn((long) 1);
+ Mockito.when(microserviceData.getParameterList()).thenThrow(nullPointerException);
+ PortalRestResponse<String> actualportalRestResponse = microserviceController.createMicroservice(mockedRequest,
+ mockedResponse, microserviceData);
+ assertEquals(actualportalRestResponse, expectedportalRestResponse);
+ }
+
+ @Test
+ public void getMicroserviceTest() throws Exception {
+ Mockito.when(microserviceService.getMicroserviceData()).thenReturn(null);
+ List<MicroserviceData> list = microserviceController.getMicroservice(mockedRequest, mockedResponse);
+ assertEquals(list, null);
+ }
+
+ @Test
+ public void updateMicroserviceIfServiceISNullTest() throws Exception {
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("FAILURE");
+ expectedportalRestResponse.setResponse("MicroserviceData cannot be null or empty");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ MicroserviceData microserviceData = null;
+ PortalRestResponse<String> actualportalRestResponse = microserviceController.updateMicroservice(mockedRequest,
+ mockedResponse, 1, microserviceData);
+ assertEquals(actualportalRestResponse, expectedportalRestResponse);
+ }
+
+ @Test
+ public void updateMicroserviceTest() throws Exception {
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("SUCCESS");
+ expectedportalRestResponse.setResponse("");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
+ PortalRestResponse<String> actualportalRestResponse = microserviceController.updateMicroservice(mockedRequest,
+ mockedResponse, 1, microserviceData);
+ assertEquals(actualportalRestResponse, expectedportalRestResponse);
+ }
+
+ @Test
+ public void updateMicroserviceExceptionTest() throws Exception {
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("FAILURE");
+ expectedportalRestResponse.setResponse(null);
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ Mockito.when(microserviceController.updateMicroservice(mockedRequest, mockedResponse, 1, microserviceData))
+ .thenThrow(nullPointerException);
+ PortalRestResponse<String> actualportalRestResponse = microserviceController.updateMicroservice(mockedRequest,
+ mockedResponse, 1, microserviceData);
+ assertEquals(actualportalRestResponse, expectedportalRestResponse);
+ }
+
+ @Test
+ public void deleteMicroserviceExceptionTest() throws Exception {
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("FAILURE");
+ expectedportalRestResponse.setResponse(
+ "I/O error on GET request for \"" + EcompPortalUtils.widgetMsProtocol() + "://null/widget/microservices/widgetCatalog/service/1\":null; nested exception is java.net.UnknownHostException: null");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ PowerMockito.mockStatic(WidgetServiceHeaders.class);
+ PortalRestResponse<String> actuaPportalRestResponse = microserviceController.deleteMicroservice(mockedRequest,
+ mockedResponse, 1);
+ assertEquals(actuaPportalRestResponse.getStatus(), expectedportalRestResponse.getStatus());
+ }
+
+ @SuppressWarnings("unchecked")
+ @Test
+ public void deleteMicroserviceTest() throws Exception {
+ String HTTPS = "https://";
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("SOME WIDGETS ASSOICATE WITH THIS SERVICE");
+ expectedportalRestResponse.setResponse("'null' ,'null' ");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.WARN);
+ List<WidgetCatalog> List = new ArrayList<WidgetCatalog>();
+ WidgetCatalog widgetCatalog = new WidgetCatalog();
+ widgetCatalog.setId(1);
+ WidgetCatalog widgetCatalog1 = new WidgetCatalog();
+ widgetCatalog.setId(2);
+ List.add(widgetCatalog);
+ List.add(widgetCatalog1);
+ PowerMockito.mockStatic(WidgetServiceHeaders.class);
+ String whatService = "widgets-service";
+ Mockito.when(consulHealthService.getServiceLocation(whatService, SystemProperties.getProperty("microservices.widget.local.port"))).thenReturn("Test");
+ Mockito.when(ans.getBody()).thenReturn(List);
+ ParameterizedTypeReference<List<WidgetCatalog>> typeRef = new ParameterizedTypeReference<List<WidgetCatalog>>() {
+ };
+ Mockito.when(template.exchange(
+ HTTPS + consulHealthService.getServiceLocation(whatService, SystemProperties.getProperty("microservices.widget.local.port"))
+ + "/widget/microservices/widgetCatalog/service/" + 1,
+ HttpMethod.GET, new HttpEntity(WidgetServiceHeaders.getInstance()), typeRef)).thenReturn(ans);
+
+ PortalRestResponse<String> actuaPportalRestResponse = microserviceController.deleteMicroservice(mockedRequest,
+ mockedResponse, 1);
+ assertEquals(actuaPportalRestResponse, expectedportalRestResponse);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Test
+ public void deleteMicroserviceWhenNoWidgetsAssociatedTest() throws Exception {
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("SUCCESS");
+ expectedportalRestResponse.setResponse("");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
+ List<WidgetCatalog> List = new ArrayList<WidgetCatalog>();
+ PowerMockito.mockStatic(WidgetServiceHeaders.class);
+ String whatService = "widgets-service";
+ Mockito.when(consulHealthService.getServiceLocation(whatService, SystemProperties.getProperty("microservices.widget.local.port"))).thenReturn("Test");
+ Mockito.when(ans.getBody()).thenReturn(List);
+ ParameterizedTypeReference<List<WidgetCatalog>> typeRef = new ParameterizedTypeReference<List<WidgetCatalog>>() {
+ };
+ Mockito.when(template.exchange(
+ EcompPortalUtils.widgetMsProtocol() + "://" + consulHealthService.getServiceLocation(whatService, SystemProperties.getProperty("microservices.widget.local.port"))
+ + "/widget/microservices/widgetCatalog/service/" + 1,
+ HttpMethod.GET, new HttpEntity(WidgetServiceHeaders.getInstance()), typeRef)).thenReturn(ans);
+ PortalRestResponse<String> actuaPportalRestResponse = microserviceController.deleteMicroservice(mockedRequest,
+ mockedResponse, 1);
+ assertEquals(actuaPportalRestResponse, expectedportalRestResponse);
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/MicroserviceProxyControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/MicroserviceProxyControllerTest.java
new file mode 100644
index 00000000..0cb8dcdb
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/MicroserviceProxyControllerTest.java
@@ -0,0 +1,106 @@
+package org.openecomp.portalapp.portal.controller;
+
+import static org.junit.Assert.assertTrue;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
+import org.openecomp.portalapp.portal.controller.MicroserviceProxyController;
+import org.openecomp.portalapp.portal.core.MockEPUser;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.service.MicroserviceProxyService;
+import org.openecomp.portalapp.portal.service.MicroserviceProxyServiceImpl;
+import org.openecomp.portalapp.util.EPUserUtils;
+import org.springframework.http.HttpStatus;
+import org.springframework.web.client.HttpClientErrorException;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+
+
+public class MicroserviceProxyControllerTest extends MockitoTestSuite {
+
+ @Mock
+ MicroserviceProxyService microserviceProxyService = new MicroserviceProxyServiceImpl();
+
+ @InjectMocks
+ MicroserviceProxyController microserviceProxyController = new MicroserviceProxyController();
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+ NullPointerException nullPointerException = new NullPointerException();
+
+ @Mock
+ EPUserUtils ePUserUtils = new EPUserUtils();
+ @Mock
+ ObjectMapper objectMapper = new ObjectMapper();
+ MockEPUser mockUser = new MockEPUser();
+
+ @Test
+ public void getMicroserviceProxyTest() throws Exception {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(microserviceProxyService.proxyToDestination(1, user, mockedRequest)).thenReturn("Success");
+ String acutualString = microserviceProxyController.getMicroserviceProxy(mockedRequest, getMockedResponse(), 1);
+ assertTrue(acutualString.equals("{\"error\":\"Success\"}"));
+ }
+
+ @Test(expected = NullPointerException.class)
+ public void getMicroserviceProxyNullPoniterExceptionTest() throws Exception {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(microserviceProxyService.proxyToDestination(1, user, mockedRequest))
+ .thenThrow(nullPointerException);
+ microserviceProxyController.getMicroserviceProxy(mockedRequest, getMockedResponse(), 1);
+ }
+
+ @Test
+ public void getMicroserviceProxyExceptionTest() throws Exception {
+ HttpClientErrorException httpClientErrorException = new HttpClientErrorException(HttpStatus.OK, "Success");
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(microserviceProxyService.proxyToDestination(1, user, mockedRequest))
+ .thenThrow(httpClientErrorException);
+ String acutualString = microserviceProxyController.getMicroserviceProxy(mockedRequest, getMockedResponse(), 1);
+ assertTrue(acutualString.equals("{\"error\":\"\"}"));
+ }
+
+ @Test
+ public void getMicroserviceProxyByWidgetIdTest() throws Exception {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(microserviceProxyService.proxyToDestinationByWidgetId(1, user, mockedRequest))
+ .thenReturn("Success");
+ String acutualString = microserviceProxyController.getMicroserviceProxyByWidgetId(mockedRequest,
+ getMockedResponse(), 1);
+ assertTrue(acutualString.equals("{\"error\":\"Success\"}"));
+ }
+
+ @Test(expected = NullPointerException.class)
+ public void getMicroserviceProxyByWidgetIdNullPointerExceptionTest() throws Exception {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(microserviceProxyService.proxyToDestinationByWidgetId(1, user, mockedRequest))
+ .thenThrow(nullPointerException);
+ microserviceProxyController.getMicroserviceProxyByWidgetId(mockedRequest, getMockedResponse(), 1);
+ }
+
+ @Test
+ public void getMicroserviceProxyByWidgetIdExceptionTest() throws Exception {
+ HttpClientErrorException httpClientErrorException = new HttpClientErrorException(HttpStatus.OK, "Success");
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(microserviceProxyService.proxyToDestinationByWidgetId(1, user, mockedRequest))
+ .thenThrow(httpClientErrorException);
+ String acutualString = microserviceProxyController.getMicroserviceProxyByWidgetId(mockedRequest,
+ getMockedResponse(), 1);
+ assertTrue(acutualString.equals("{\"error\":\"\"}"));
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/PortalAdminControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/PortalAdminControllerTest.java
new file mode 100644
index 00000000..6917b6e7
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/PortalAdminControllerTest.java
@@ -0,0 +1,155 @@
+package org.openecomp.portalapp.portal.controller;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
+import org.openecomp.portalapp.portal.controller.PortalAdminController;
+import org.openecomp.portalapp.portal.core.MockEPUser;
+import org.openecomp.portalapp.portal.domain.EPRole;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.exceptions.NoHealthyServiceException;
+import org.openecomp.portalapp.portal.service.AdminRolesService;
+import org.openecomp.portalapp.portal.service.AdminRolesServiceImpl;
+import org.openecomp.portalapp.portal.service.PortalAdminService;
+import org.openecomp.portalapp.portal.service.PortalAdminServiceImpl;
+import org.openecomp.portalapp.portal.transport.FieldsValidator;
+import org.openecomp.portalapp.portal.transport.PortalAdmin;
+import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
+import org.openecomp.portalapp.util.EPUserUtils;
+import org.openecomp.portalsdk.core.service.AuditService;
+import org.openecomp.portalsdk.core.service.AuditServiceImpl;
+
+public class PortalAdminControllerTest extends MockitoTestSuite{
+
+ @InjectMocks
+ PortalAdminController portalAdminController = new PortalAdminController();
+
+ @Mock
+ AdminRolesService adminRolesService = new AdminRolesServiceImpl();
+
+ @Mock
+ PortalAdminService portalAdminService = new PortalAdminServiceImpl();
+
+ @Mock
+ AuditService auditService = new AuditServiceImpl();
+
+
+ @Mock
+ EcompPortalUtils ecompPortalUtils = new EcompPortalUtils();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+ NullPointerException nullPointerException = new NullPointerException();
+
+ @Mock
+ EPUserUtils ePUserUtils = new EPUserUtils();
+
+ MockEPUser mockUser = new MockEPUser();
+
+
+ @Test
+ public void getPortalAdminsTest()
+ {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ List<PortalAdmin> expectedPortalAdminsList = new ArrayList<PortalAdmin>();
+ PortalAdmin portalAdmin= new PortalAdmin();
+
+ portalAdmin.setUserId((long) 1);
+ portalAdmin.setLoginId("guestT");
+ portalAdmin.setFirstName("Test_FirstName");
+ portalAdmin.setLastName("Test_LastName");
+
+ expectedPortalAdminsList.add(portalAdmin);
+
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+
+ Mockito.when(portalAdminService.getPortalAdmins()).thenReturn(expectedPortalAdminsList);
+ List<PortalAdmin> actualPortalAdminsList = portalAdminController.getPortalAdmins(mockedRequest, mockedResponse);
+ assertEquals(actualPortalAdminsList,expectedPortalAdminsList);
+
+ }
+// @Test
+// public void getPortalAdminsIfUserIsNullTest()
+// {
+// EPUser user = null;
+// Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+//
+// assertNull(portalAdminController.getPortalAdmins(mockedRequest, mockedResponse));
+//
+// }
+
+ @Test
+ public void getPortalAdminsIfUserIsSuperAdminTest()
+ {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+ assertNull(portalAdminController.getPortalAdmins(mockedRequest, mockedResponse));
+
+ }
+
+
+
+ @Test
+ public void createPortalAdminTest()
+ {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+
+ FieldsValidator expectedFieldValidator = new FieldsValidator();
+ expectedFieldValidator.setHttpStatusCode((long) 200);
+ expectedFieldValidator.setFields(null);
+ expectedFieldValidator.setErrorCode(null);
+ FieldsValidator actualFieldValidator = new FieldsValidator();
+ String sbcid = "Test";
+
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ Mockito.when(portalAdminService.createPortalAdmin(sbcid)).thenReturn(expectedFieldValidator);
+ actualFieldValidator = portalAdminController.createPortalAdmin(mockedRequest, sbcid, mockedResponse);
+ assertEquals(actualFieldValidator,expectedFieldValidator);
+
+ }
+
+// @Test
+// public void createPortalAdminIfUserIsNullTest()
+// {
+// //EPUser user = null;
+// Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(null);
+// String sbcid = "null";
+// assertNull(portalAdminController.createPortalAdmin(mockedRequest, sbcid, mockedResponse));
+//
+// }
+
+ @Test
+ public void createPortalAdminIfUserIsSuperAdminTest()
+ {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+ String sbcid = "Test";
+ assertNull(portalAdminController.createPortalAdmin(mockedRequest, sbcid, mockedResponse));
+
+ }
+
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/RoleManageControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/RoleManageControllerTest.java
new file mode 100644
index 00000000..ea7b532e
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/RoleManageControllerTest.java
@@ -0,0 +1,189 @@
+package org.openecomp.portalapp.portal.controller;
+
+import static org.junit.Assert.assertEquals;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.controller.core.RoleController;
+import org.openecomp.portalapp.controller.core.RoleFunctionListController;
+import org.openecomp.portalapp.controller.core.RoleListController;
+import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
+import org.openecomp.portalapp.portal.controller.RoleManageController;
+import org.openecomp.portalapp.portal.core.MockEPUser;
+import org.openecomp.portalapp.portal.domain.EPApp;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.openecomp.portalapp.portal.service.ExternalAccessRolesService;
+import org.springframework.web.servlet.ModelAndView;
+
+public class RoleManageControllerTest {
+
+
+
+ @Mock
+ RoleController roleController;
+
+ @Mock
+ RoleListController roleListController;
+
+ @Mock
+ RoleFunctionListController roleFunctionListController;
+
+
+ @Mock
+ ExternalAccessRolesService externalAccessRolesService;
+
+ @Mock
+ ExternalAccessRolesService externalAccessRolesService1 = null;
+
+ @InjectMocks
+ RoleManageController roleManageController = new RoleManageController();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+ NullPointerException nullPointerException = new NullPointerException();
+ MockEPUser mockUser = new MockEPUser();
+
+ @Test
+ public void toggleRoleTest()
+ {
+ PortalRestResponse<String> portalRestResponse = new PortalRestResponse<String>();
+ portalRestResponse.setMessage("success");
+ portalRestResponse.setResponse(null);
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ portalRestResponse.setStatus(portalRestStatusEnum.OK);
+
+ PortalRestResponse<String> expectedpPortalRestResponse=roleManageController.toggleRole(mockedRequest, mockedResponse);
+ assertEquals(portalRestResponse,expectedpPortalRestResponse);
+
+ }
+
+// @Test
+// public void toggleRoleExceptionTest()
+// {
+// PortalRestResponse<String> portalRestResponse = new PortalRestResponse<String>();
+// portalRestResponse.setMessage("success");
+// portalRestResponse.setResponse(null);
+// PortalRestStatusEnum portalRestStatusEnum = null;
+// portalRestResponse.setStatus(portalRestStatusEnum.OK);
+// Mockito.doNothing().when(roleListController).toggleRole(mockedRequest, mockedResponse))).th
+// getRoleListController().toggleRole(request, response)
+//
+// PortalRestResponse<String> expectedpPortalRestResponse=roleManageController.toggleRole(mockedRequest, mockedResponse);
+// assertEquals(portalRestResponse,expectedpPortalRestResponse);
+//
+// }
+ @Test
+ public void removeRoleTest() throws Exception
+ {
+ ModelAndView modelandView = new ModelAndView("login.htm");
+ Mockito.when(roleListController.removeRole(mockedRequest, mockedResponse)).thenReturn(modelandView);
+ ModelAndView expectedModelandView = roleManageController.removeRole(mockedRequest, mockedResponse);
+ assertEquals(expectedModelandView, modelandView);
+ }
+
+ @Test
+ public void saveRoleTest() throws Exception
+ {
+ ModelAndView modelandView = new ModelAndView("login.htm");
+ Mockito.when(roleController.saveRole(mockedRequest, mockedResponse)).thenReturn(modelandView);
+ ModelAndView expectedModelandView = roleManageController.saveRole(mockedRequest, mockedResponse);
+ assertEquals(expectedModelandView, modelandView);
+ }
+
+ @Test
+ public void removeRoleRoleFunctionTest() throws Exception
+ {
+ ModelAndView modelandView = new ModelAndView("login.htm");
+ Mockito.when(roleController.removeRoleFunction(mockedRequest, mockedResponse)).thenReturn(modelandView);
+ ModelAndView expectedModelandView = roleManageController.removeRoleRoleFunction(mockedRequest, mockedResponse);
+ assertEquals(expectedModelandView, modelandView);
+ }
+
+ @Test
+ public void addRoleRoRoleFunctionTest() throws Exception
+ {
+ ModelAndView modelandView = new ModelAndView("login.htm");
+ Mockito.when(roleController.addRoleFunction(mockedRequest, mockedResponse)).thenReturn(modelandView);
+ ModelAndView expectedModelandView = roleManageController.addRoleRoRoleFunction(mockedRequest, mockedResponse);
+ assertEquals(expectedModelandView, modelandView);
+ }
+
+ @Test
+ public void removeChildRoleTest() throws Exception
+ {
+ ModelAndView modelandView = new ModelAndView("login.htm");
+ Mockito.when(roleController.removeChildRole(mockedRequest, mockedResponse)).thenReturn(modelandView);
+ ModelAndView expectedModelandView = roleManageController.removeChildRole(mockedRequest, mockedResponse);
+ assertEquals(expectedModelandView, modelandView);
+ }
+
+
+ @Test
+ public void getRoleTest() throws Exception
+ {
+ Mockito.doNothing().when(roleController).getRole(mockedRequest, mockedResponse);
+ roleManageController.getRole(mockedRequest, mockedResponse);
+ }
+
+ @Test
+ public void getRolesTest() throws Exception
+ {
+ Mockito.doNothing().when(roleListController).getRoles(mockedRequest, mockedResponse);
+ roleManageController.getRoles(mockedRequest, mockedResponse);
+ }
+
+ @Test
+ public void getRoleFunctionListTest() throws Exception
+ {
+ Mockito.doNothing().when(roleFunctionListController).getRoleFunctionList(mockedRequest, mockedResponse);
+ roleManageController.getRoleFunctionList(mockedRequest, mockedResponse);
+ }
+
+ @Test
+ public void saveRoleFunctionTest() throws Exception
+ {
+ Mockito.doNothing().when(roleFunctionListController).saveRoleFunction(mockedRequest, mockedResponse, "test");
+ roleManageController.saveRoleFunction(mockedRequest, mockedResponse, "test");
+ }
+
+ @Test
+ public void removeRoleFunctionTest() throws Exception
+ {
+ Mockito.doNothing().when(roleFunctionListController).removeRoleFunction(mockedRequest, mockedResponse, "test");
+ roleManageController.removeRoleFunction(mockedRequest, mockedResponse, "test");
+ }
+
+ @Test
+ public void syncRolesTest() throws Exception
+ {
+ EPApp app = new EPApp();
+ Mockito.doNothing().when(externalAccessRolesService).syncApplicationRolesWithEcompDB(app);
+ roleManageController.syncRoles(app);
+ }
+
+
+ @Test
+ public void addeChildRoleTest() throws Exception
+ {
+ ModelAndView modelandView = new ModelAndView("login.htm");
+ Mockito.when(roleController.addChildRole(mockedRequest, mockedResponse)).thenReturn(modelandView);
+ ModelAndView expectedModelandView = roleManageController.addChildRole(mockedRequest, mockedResponse);
+ assertEquals(expectedModelandView, modelandView);
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/RolesApprovalSystemControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/RolesApprovalSystemControllerTest.java
new file mode 100644
index 00000000..e55b9a9c
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/RolesApprovalSystemControllerTest.java
@@ -0,0 +1,336 @@
+package org.openecomp.portalapp.portal.controller;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.externalsystemapproval.model.ExternalSystemRoleApproval;
+import org.openecomp.portalapp.externalsystemapproval.model.ExternalSystemUser;
+import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
+import org.openecomp.portalapp.portal.controller.RolesApprovalSystemController;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.openecomp.portalapp.portal.service.UserRolesService;
+import org.openecomp.portalapp.portal.transport.ExternalRequestFieldsValidator;
+
+public class RolesApprovalSystemControllerTest extends MockitoTestSuite {
+
+ @Mock
+ UserRolesService userRolesService;
+
+ @InjectMocks
+ RolesApprovalSystemController rolesApprovalSystemController = new RolesApprovalSystemController();
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+ NullPointerException nullPointerException = new NullPointerException();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ @Test
+ public void postUserProfileIfRolesNullTest() {
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("Request has no roles");
+ expectedportalRestResponse.setResponse("save user profile failed");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ ExternalSystemUser extSysUser = new ExternalSystemUser();
+ extSysUser.setApplicationName("Test_App");
+ extSysUser.setLoginId("1");
+ extSysUser.setMyloginrequestId("Test");
+ List<ExternalSystemRoleApproval> externalSystemRoleApprovalList = null;
+ extSysUser.setRoles(externalSystemRoleApprovalList);
+
+ PortalRestResponse<String> actualportalRestResponse = rolesApprovalSystemController
+ .postUserProfile(mockedRequest, extSysUser, mockedResponse);
+ assertEquals(expectedportalRestResponse, actualportalRestResponse);
+ }
+
+ @Test
+ public void postUserProfileTest() {
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("Saved Successfully");
+ expectedportalRestResponse.setResponse("Success");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
+ ExternalSystemUser extSysUser = new ExternalSystemUser();
+ extSysUser.setApplicationName("Test_App");
+ extSysUser.setLoginId("1");
+ extSysUser.setMyloginrequestId("Test");
+ List<ExternalSystemRoleApproval> externalSystemRoleApprovalList = new ArrayList<ExternalSystemRoleApproval>();
+ ExternalSystemRoleApproval externalSystemRoleApproval = new ExternalSystemRoleApproval();
+ externalSystemRoleApprovalList.add(externalSystemRoleApproval);
+ extSysUser.setRoles(externalSystemRoleApprovalList);
+ ExternalRequestFieldsValidator externalRequestFieldsValidator = new ExternalRequestFieldsValidator(true,
+ "Saved Successfully");
+
+ Mockito.when(userRolesService.setExternalRequestUserAppRole(extSysUser, "POST"))
+ .thenReturn(externalRequestFieldsValidator);
+ PortalRestResponse<String> actualportalRestResponse = rolesApprovalSystemController
+ .postUserProfile(mockedRequest, extSysUser, mockedResponse);
+ assertEquals(expectedportalRestResponse, actualportalRestResponse);
+ }
+
+ @Test
+ public void postUserProfileFailureTest() {
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("Received Bad String");
+ expectedportalRestResponse.setResponse("save user profile failed");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ ExternalSystemUser extSysUser = new ExternalSystemUser();
+ extSysUser.setApplicationName("Test_App");
+ extSysUser.setLoginId("1");
+ extSysUser.setMyloginrequestId("Test");
+ List<ExternalSystemRoleApproval> externalSystemRoleApprovalList = new ArrayList<ExternalSystemRoleApproval>();
+ ExternalSystemRoleApproval externalSystemRoleApproval = new ExternalSystemRoleApproval();
+ externalSystemRoleApprovalList.add(externalSystemRoleApproval);
+ extSysUser.setRoles(externalSystemRoleApprovalList);
+ ExternalRequestFieldsValidator externalRequestFieldsValidator = new ExternalRequestFieldsValidator(false,
+ "Received Bad String");
+ Mockito.when(userRolesService.setExternalRequestUserAppRole(extSysUser, "POST"))
+ .thenReturn(externalRequestFieldsValidator);
+
+ PortalRestResponse<String> actualportalRestResponse = rolesApprovalSystemController
+ .postUserProfile(mockedRequest, extSysUser, mockedResponse);
+ assertEquals(expectedportalRestResponse, actualportalRestResponse);
+ }
+
+ @Test
+ public void postUserProfileExceptionTest() {
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage(null);
+ expectedportalRestResponse.setResponse("save user profile failed");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ ExternalSystemUser extSysUser = new ExternalSystemUser();
+ extSysUser.setApplicationName("Test_App");
+ extSysUser.setLoginId("1");
+ extSysUser.setMyloginrequestId("Test");
+ List<ExternalSystemRoleApproval> externalSystemRoleApprovalList = new ArrayList<ExternalSystemRoleApproval>();
+ ExternalSystemRoleApproval externalSystemRoleApproval = new ExternalSystemRoleApproval();
+ externalSystemRoleApprovalList.add(externalSystemRoleApproval);
+ extSysUser.setRoles(externalSystemRoleApprovalList);
+ Mockito.when(userRolesService.setExternalRequestUserAppRole(extSysUser, "POST")).thenThrow(nullPointerException);
+ PortalRestResponse<String> actualportalRestResponse = rolesApprovalSystemController
+ .postUserProfile(mockedRequest, extSysUser, mockedResponse);
+ assertEquals(expectedportalRestResponse, actualportalRestResponse);
+ }
+
+ @Test
+ public void putUserProfileIfLoginIdNullTest() {
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("Request has no login ID");
+ expectedportalRestResponse.setResponse("save user profile failed");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ ExternalSystemUser extSysUser = new ExternalSystemUser();
+ extSysUser.setApplicationName("Test_App");
+ extSysUser.setLoginId(null);
+ extSysUser.setMyloginrequestId("Test");
+ List<ExternalSystemRoleApproval> externalSystemRoleApprovalList = new ArrayList<ExternalSystemRoleApproval>();
+ extSysUser.setRoles(externalSystemRoleApprovalList);
+ PortalRestResponse<String> actualportalRestResponse = rolesApprovalSystemController
+ .putUserProfile(mockedRequest, extSysUser, mockedResponse);
+ assertEquals(expectedportalRestResponse, actualportalRestResponse);
+ }
+
+ @Test
+ public void putUserProfileTest() {
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("Updated Successfully");
+ expectedportalRestResponse.setResponse("Success");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
+ ExternalSystemUser extSysUser = new ExternalSystemUser();
+ extSysUser.setApplicationName("Test_App");
+ extSysUser.setLoginId("1");
+ extSysUser.setMyloginrequestId("Test");
+ List<ExternalSystemRoleApproval> externalSystemRoleApprovalList = new ArrayList<ExternalSystemRoleApproval>();
+ ExternalSystemRoleApproval externalSystemRoleApproval = new ExternalSystemRoleApproval();
+ externalSystemRoleApprovalList.add(externalSystemRoleApproval);
+ extSysUser.setRoles(externalSystemRoleApprovalList);
+ ExternalRequestFieldsValidator externalRequestFieldsValidator = new ExternalRequestFieldsValidator(true,
+ "Updated Successfully");
+
+ Mockito.when(userRolesService.setExternalRequestUserAppRole(extSysUser, "PUT"))
+ .thenReturn(externalRequestFieldsValidator);
+ PortalRestResponse<String> actualportalRestResponse = rolesApprovalSystemController
+ .putUserProfile(mockedRequest, extSysUser, mockedResponse);
+ assertEquals(expectedportalRestResponse, actualportalRestResponse);
+ }
+
+ @Test
+ public void putUserProfileFailureTest() {
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("Received Bad String");
+ expectedportalRestResponse.setResponse("save user profile failed");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ ExternalSystemUser extSysUser = new ExternalSystemUser();
+ extSysUser.setApplicationName("Test_App");
+ extSysUser.setLoginId("1");
+ extSysUser.setMyloginrequestId("Test");
+ List<ExternalSystemRoleApproval> externalSystemRoleApprovalList = new ArrayList<ExternalSystemRoleApproval>();
+ ExternalSystemRoleApproval externalSystemRoleApproval = new ExternalSystemRoleApproval();
+ externalSystemRoleApprovalList.add(externalSystemRoleApproval);
+ extSysUser.setRoles(externalSystemRoleApprovalList);
+ ExternalRequestFieldsValidator externalRequestFieldsValidator = new ExternalRequestFieldsValidator(false,
+ "Received Bad String");
+
+ Mockito.when(userRolesService.setExternalRequestUserAppRole(extSysUser, "PUT"))
+ .thenReturn(externalRequestFieldsValidator);
+ PortalRestResponse<String> actualportalRestResponse = rolesApprovalSystemController
+ .putUserProfile(mockedRequest, extSysUser, mockedResponse);
+
+ assertEquals(expectedportalRestResponse, actualportalRestResponse);
+ }
+
+ @Test
+ public void putUserProfileExceptionTest() {
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage(null);
+ expectedportalRestResponse.setResponse("save user profile failed");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ ExternalSystemUser extSysUser = new ExternalSystemUser();
+ extSysUser.setApplicationName("Test_App");
+ extSysUser.setLoginId("1");
+ extSysUser.setMyloginrequestId("Test");
+ List<ExternalSystemRoleApproval> externalSystemRoleApprovalList = new ArrayList<ExternalSystemRoleApproval>();
+ ExternalSystemRoleApproval externalSystemRoleApproval = new ExternalSystemRoleApproval();
+ externalSystemRoleApprovalList.add(externalSystemRoleApproval);
+ extSysUser.setRoles(externalSystemRoleApprovalList);
+ Mockito.when(userRolesService.setExternalRequestUserAppRole(extSysUser, "PUT")).thenThrow(nullPointerException);
+ PortalRestResponse<String> actualportalRestResponse = rolesApprovalSystemController
+ .putUserProfile(mockedRequest, extSysUser, mockedResponse);
+
+ assertEquals(expectedportalRestResponse, actualportalRestResponse);
+ }
+
+ @Test
+ public void deleteUserProfileIfApplicationNameNullTest() {
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("Request has no application name");
+ expectedportalRestResponse.setResponse("delete user profile failed");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ ExternalSystemUser extSysUser = new ExternalSystemUser();
+ extSysUser.setApplicationName(null);
+ extSysUser.setLoginId("1");
+ extSysUser.setMyloginrequestId("Test");
+ List<ExternalSystemRoleApproval> externalSystemRoleApprovalList = new ArrayList<ExternalSystemRoleApproval>();
+ extSysUser.setRoles(externalSystemRoleApprovalList);
+ PortalRestResponse<String> actualportalRestResponse = rolesApprovalSystemController
+ .deleteUserProfile(mockedRequest, extSysUser, mockedResponse);
+
+ assertEquals(expectedportalRestResponse, actualportalRestResponse);
+ }
+
+ @Test
+ public void deleteUserProfileIfMyloginrequestIdNullTest() {
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("Request has no request ID");
+ expectedportalRestResponse.setResponse("delete user profile failed");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ ExternalSystemUser extSysUser = new ExternalSystemUser();
+ extSysUser.setApplicationName("Test");
+ extSysUser.setLoginId("1");
+ extSysUser.setMyloginrequestId(null);
+ List<ExternalSystemRoleApproval> externalSystemRoleApprovalList = new ArrayList<ExternalSystemRoleApproval>();
+ extSysUser.setRoles(externalSystemRoleApprovalList);
+ PortalRestResponse<String> actualportalRestResponse = rolesApprovalSystemController
+ .deleteUserProfile(mockedRequest, extSysUser, mockedResponse);
+ assertEquals(expectedportalRestResponse, actualportalRestResponse);
+ }
+
+ @Test
+ public void deleteUserProfileTest() {
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("Deleted Successfully");
+ expectedportalRestResponse.setResponse("Success");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
+ ExternalSystemUser extSysUser = new ExternalSystemUser();
+ extSysUser.setApplicationName("Test_App");
+ extSysUser.setLoginId("1");
+ extSysUser.setMyloginrequestId("Test");
+ List<ExternalSystemRoleApproval> externalSystemRoleApprovalList = new ArrayList<ExternalSystemRoleApproval>();
+ ExternalSystemRoleApproval externalSystemRoleApproval = new ExternalSystemRoleApproval();
+ externalSystemRoleApprovalList.add(externalSystemRoleApproval);
+ extSysUser.setRoles(externalSystemRoleApprovalList);
+ ExternalRequestFieldsValidator externalRequestFieldsValidator = new ExternalRequestFieldsValidator(true,
+ "Success");
+
+ Mockito.when(userRolesService.setExternalRequestUserAppRole(extSysUser, "DELETE"))
+ .thenReturn(externalRequestFieldsValidator);
+ PortalRestResponse<String> actualportalRestResponse = rolesApprovalSystemController
+ .deleteUserProfile(mockedRequest, extSysUser, mockedResponse);
+
+ assertEquals(expectedportalRestResponse, actualportalRestResponse);
+ }
+
+ @Test
+ public void deleteUserProfileFailureTest() {
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("failed");
+ expectedportalRestResponse.setResponse("delete user profile failed");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ ExternalSystemUser extSysUser = new ExternalSystemUser();
+ extSysUser.setApplicationName("Test_App");
+ extSysUser.setLoginId("1");
+ extSysUser.setMyloginrequestId("Test");
+ List<ExternalSystemRoleApproval> externalSystemRoleApprovalList = new ArrayList<ExternalSystemRoleApproval>();
+ ExternalSystemRoleApproval externalSystemRoleApproval = new ExternalSystemRoleApproval();
+ externalSystemRoleApprovalList.add(externalSystemRoleApproval);
+ extSysUser.setRoles(externalSystemRoleApprovalList);
+ ExternalRequestFieldsValidator externalRequestFieldsValidator = new ExternalRequestFieldsValidator(false,
+ "failed");
+
+ Mockito.when(userRolesService.setExternalRequestUserAppRole(extSysUser, "DELETE"))
+ .thenReturn(externalRequestFieldsValidator);
+ PortalRestResponse<String> actualportalRestResponse = rolesApprovalSystemController
+ .deleteUserProfile(mockedRequest, extSysUser, mockedResponse);
+
+ assertEquals(expectedportalRestResponse, actualportalRestResponse);
+ }
+
+ @Test
+ public void deleteUserProfileExceptionTest() {
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage(null);
+ expectedportalRestResponse.setResponse("delete user profile failed");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ ExternalSystemUser extSysUser = new ExternalSystemUser();
+ extSysUser.setApplicationName("Test_App");
+ extSysUser.setLoginId("1");
+ extSysUser.setMyloginrequestId("Test");
+ List<ExternalSystemRoleApproval> externalSystemRoleApprovalList = new ArrayList<ExternalSystemRoleApproval>();
+ ExternalSystemRoleApproval externalSystemRoleApproval = new ExternalSystemRoleApproval();
+ externalSystemRoleApprovalList.add(externalSystemRoleApproval);
+ extSysUser.setRoles(externalSystemRoleApprovalList);
+ Mockito.when(userRolesService.setExternalRequestUserAppRole(extSysUser, "DELETE")).thenThrow(nullPointerException);
+ PortalRestResponse<String> actualportalRestResponse = rolesApprovalSystemController
+ .deleteUserProfile(mockedRequest, extSysUser, mockedResponse);
+
+ assertEquals(expectedportalRestResponse, actualportalRestResponse);
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/SessionCommunicationControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/SessionCommunicationControllerTest.java
new file mode 100644
index 00000000..0f6f6ca6
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/SessionCommunicationControllerTest.java
@@ -0,0 +1,59 @@
+package org.openecomp.portalapp.portal.controller;
+
+import static org.junit.Assert.*;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.drools.core.command.assertion.AssertEquals;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.controller.sessionmgt.SessionCommunicationController;
+import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
+import org.openecomp.portalapp.portal.core.MockEPUser;
+import org.openecomp.portalapp.service.sessionmgt.ManageService;
+
+public class SessionCommunicationControllerTest {
+
+
+ @Mock
+ ManageService manageService;
+
+ @InjectMocks
+ SessionCommunicationController SessionCommunicationController = new SessionCommunicationController();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ NullPointerException nullPointerException = new NullPointerException();
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+ MockEPUser mockUser = new MockEPUser();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+
+
+ @Test
+ public void getSessionSlotCheckIntervalTest() throws Exception
+ {
+ Mockito.when(manageService.fetchSessionSlotCheckInterval()).thenReturn(1);
+ int result = SessionCommunicationController.getSessionSlotCheckInterval(mockedRequest, mockedResponse);
+ assertEquals(result, 1);
+
+ }
+
+ @Test
+ public void extendSessionTimeOutsTest() throws Exception
+ {
+ Mockito.doNothing().when(manageService).extendSessionTimeOuts("test");
+ Boolean result = SessionCommunicationController.extendSessionTimeOuts(mockedRequest, mockedResponse, "test");
+ assertEquals(result, true);
+
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/TicketEventControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/TicketEventControllerTest.java
new file mode 100644
index 00000000..9347cf6a
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/TicketEventControllerTest.java
@@ -0,0 +1,99 @@
+package org.openecomp.portalapp.portal.controller;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
+import org.openecomp.portalapp.portal.controller.TicketEventController;
+import org.openecomp.portalapp.portal.core.MockEPUser;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.openecomp.portalapp.portal.service.UserNotificationService;
+import org.openecomp.portalsdk.core.web.support.UserUtils;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest(UserUtils.class)
+public class TicketEventControllerTest {
+
+ @Mock
+ UserNotificationService userNotificationService;
+
+ @InjectMocks
+ TicketEventController ticketEventController = new TicketEventController();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ MockEPUser mockUser = new MockEPUser();
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+ NullPointerException nullPointerException = new NullPointerException();
+
+// @Test
+// public void saveTest() throws Exception {
+// String ticketEventJson = "{\"application\": \"cbus\",\"event\": {\"body\": {\"ticketStatePhrase\": \"We recently detected a problem with the equipment at your site. The event is in queue for immediate work.\", \"ivrNotificationFlag\": \"1\",\"expectedRestoreDate\": 0,\"bridgeTransport\": \"AOTS\", \"reptRequestType\": 0,\"ticketNum\": \"000002000857405\",\"assetID\": \"CISCO_1921C1_ISR_G2\", \"eventDate\": 1490545134601,\"eventAbstract\": \"ospfIfConfigError trap received from Cisco_1921c1_ISR_G2 with arguments: ospfRouterId=Cisco_1921c1_ISR_G2; ospfIfIpAddress=1921c1_288266; ospfAddressLessIf=0; ospfPacketSrc=172.17.0.11; ospfConfigErrorType=2; ospfPacketType=1\",\"severity\": \"2 - Major\",\"ticketPriority\": \"3\",\"reportedCustomerImpact\": 0,\"testAutoIndicator\": 0,\"supportGroupName\": \"US-TEST-ORT\",\"lastModifiedDate\": \"1487687703\",\"messageGroup\": \"SNMP\",\"csi\": 0,\"mfabRestoredTime\": 0},\"header\": {\"timestamp\": \"2017-02-21T14:35:05.219+0000\",\"eventSource\": \"aotstm\",\"entityId\": \"000002000857405\", \"sequenceNumber\": 2 },\"blinkMsgId\": \"f38c071e-1a47-4b55-9e72-1db830100a61\",\"sourceIP\": \"130.4.165.158\"},\"SubscriberInfo\": {\"UserList\": [\"hk8777\"] }}";
+// PortalRestResponse<String> actualPortalRestResponse = ticketEventController.handleRequest(mockedRequest,
+// mockedResponse, ticketEventJson);
+// assertTrue(actualPortalRestResponse.getStatus().compareTo(PortalRestStatusEnum.OK) == 0);
+// }
+
+ @Test
+ public void saveTestForException() throws Exception {
+ String ticketEventJson = "\"event\": {\"body\": {\"ticketStatePhrase\": \"We recently detected a problem with the equipment at your site. The event is in queue for immediate work.\", \"ivrNotificationFlag\": \"1\",\"expectedRestoreDate\": 0,\"bridgeTransport\": \"AOTS\", \"reptRequestType\": 0,\"ticketNum\": \"000002000857405\",\"assetID\": \"CISCO_1921C1_ISR_G2\", \"eventDate\": 1490545134601,\"eventAbstract\": \"ospfIfConfigError trap received from Cisco_1921c1_ISR_G2 with arguments: ospfRouterId=Cisco_1921c1_ISR_G2; ospfIfIpAddress=1921c1_288266; ospfAddressLessIf=0; ospfPacketSrc=172.17.0.11; ospfConfigErrorType=2; ospfPacketType=1\",\"severity\": \"2 - Major\",\"ticketPriority\": \"3\",\"reportedCustomerImpact\": 0,\"testAutoIndicator\": 0,\"supportGroupName\": \"US-TEST-ORT\",\"lastModifiedDate\": \"1487687703\",\"messageGroup\": \"SNMP\",\"csi\": 0,\"mfabRestoredTime\": 0},\"header\": {\"timestamp\": \"2017-02-21T14:35:05.219+0000\",\"eventSource\": \"aotstm\",\"entityId\": \"000002000857405\", \"sequenceNumber\": 2 },\"blinkMsgId\": \"f38c071e-1a47-4b55-9e72-1db830100a61\",\"sourceIP\": \"130.4.165.158\"},\"SubscriberInfo\": {\"UserList\": [\"hk8777\"] }}";
+ PortalRestResponse<String> actualPortalRestResponse = ticketEventController.handleRequest(mockedRequest,
+ mockedResponse, ticketEventJson);
+ assertTrue(actualPortalRestResponse.getStatus().compareTo(PortalRestStatusEnum.ERROR) == 0);
+ }
+
+// @Test
+// public void saveTestForApplicationValid() throws Exception {
+// String ticketEventJson = "{\"event\": {\"body\": {\"ticketStatePhrase\": \"We recently detected a problem with the equipment at your site. The event is in queue for immediate work.\", \"ivrNotificationFlag\": \"1\",\"expectedRestoreDate\": 0,\"bridgeTransport\": \"AOTS\", \"reptRequestType\": 0,\"ticketNum\": \"000002000857405\",\"assetID\": \"CISCO_1921C1_ISR_G2\", \"eventDate\": 1490545134601,\"eventAbstract\": \"ospfIfConfigError trap received from Cisco_1921c1_ISR_G2 with arguments: ospfRouterId=Cisco_1921c1_ISR_G2; ospfIfIpAddress=1921c1_288266; ospfAddressLessIf=0; ospfPacketSrc=172.17.0.11; ospfConfigErrorType=2; ospfPacketType=1\",\"severity\": \"2 - Major\",\"ticketPriority\": \"3\",\"reportedCustomerImpact\": 0,\"testAutoIndicator\": 0,\"supportGroupName\": \"US-TEST-ORT\",\"lastModifiedDate\": \"1487687703\",\"messageGroup\": \"SNMP\",\"csi\": 0,\"mfabRestoredTime\": 0},\"header\": {\"timestamp\": \"2017-02-21T14:35:05.219+0000\",\"eventSource\": \"aotstm\",\"entityId\": \"000002000857405\", \"sequenceNumber\": 2 },\"blinkMsgId\": \"f38c071e-1a47-4b55-9e72-1db830100a61\",\"sourceIP\": \"130.4.165.158\"},\"SubscriberInfo\": {\"UserList\": [\"hk8777\"] }}";
+// PortalRestResponse<String> actualPortalRestResponse = ticketEventController.handleRequest(mockedRequest,
+// mockedResponse, ticketEventJson);
+// assertTrue(actualPortalRestResponse.getStatus().compareTo(PortalRestStatusEnum.ERROR) == 0);
+// assertEquals(actualPortalRestResponse.getMessage(), "application is mandatory");
+//
+// }
+
+ @Test
+ public void saveTestForBodyValid() throws Exception {
+ String ticketEventJson = "{\"application\": \"cbus\",\"event\": {\"header\": {\"timestamp\": \"2017-02-21T14:35:05.219+0000\",\"eventSource\": \"aotstm\",\"entityId\": \"000002000857405\",\"sequenceNumber\": 2 },\"blinkMsgId\": \"f38c071e-1a47-4b55-9e72-1db830100a61\",\"sourceIP\": \"130.4.165.158\"},\"SubscriberInfo\": {\"UserList\": [\"hk8777\"] }}";
+ PortalRestResponse<String> actualPortalRestResponse = ticketEventController.handleRequest(mockedRequest,
+ mockedResponse, ticketEventJson);
+ assertTrue(actualPortalRestResponse.getStatus().compareTo(PortalRestStatusEnum.ERROR) == 0);
+ assertEquals(actualPortalRestResponse.getMessage(), "body is mandatory");
+ }
+
+ @Test
+ public void saveTestForEventSourceValid() throws Exception {
+ String ticketEventJson = "{\"application\": \"cbus\",\"event\": {\"body\": {\"ticketStatePhrase\": \"We recently detected a problem with the equipment at your site. The event is in queue for immediate work.\", \"ivrNotificationFlag\": \"1\",\"expectedRestoreDate\": 0,\"bridgeTransport\": \"AOTS\", \"reptRequestType\": 0,\"ticketNum\": \"000002000857405\",\"assetID\": \"CISCO_1921C1_ISR_G2\", \"eventDate\": 1490545134601,\"eventAbstract\": \"ospfIfConfigError trap received from Cisco_1921c1_ISR_G2 with arguments: ospfRouterId=Cisco_1921c1_ISR_G2; ospfIfIpAddress=1921c1_288266; ospfAddressLessIf=0; ospfPacketSrc=172.17.0.11; ospfConfigErrorType=2; ospfPacketType=1\",\"severity\": \"2 - Major\",\"ticketPriority\": \"3\",\"reportedCustomerImpact\": 0,\"testAutoIndicator\": 0,\"supportGroupName\": \"US-TEST-ORT\",\"lastModifiedDate\": \"1487687703\",\"messageGroup\": \"SNMP\",\"csi\": 0,\"mfabRestoredTime\": 0},\"header\": {\"timestamp\": \"2017-02-21T14:35:05.219+0000\",\"entityId\": \"000002000857405\", \"sequenceNumber\": 2 },\"blinkMsgId\": \"f38c071e-1a47-4b55-9e72-1db830100a61\",\"sourceIP\": \"130.4.165.158\"},\"SubscriberInfo\": {\"UserList\": [\"hk8777\"] }}";
+ PortalRestResponse<String> actualPortalRestResponse = ticketEventController.handleRequest(mockedRequest,
+ mockedResponse, ticketEventJson);
+ assertTrue(actualPortalRestResponse.getStatus().compareTo(PortalRestStatusEnum.ERROR) == 0);
+ assertEquals(actualPortalRestResponse.getMessage(), "Message Source is mandatory");
+ }
+
+ @Test
+ public void saveTestForUserListValid() throws Exception {
+ String ticketEventJson = "{\"application\": \"cbus\",\"event\": {\"body\": {\"ticketStatePhrase\": \"We recently detected a problem with the equipment at your site. The event is in queue for immediate work.\", \"ivrNotificationFlag\": \"1\",\"expectedRestoreDate\": 0,\"bridgeTransport\": \"AOTS\", \"reptRequestType\": 0,\"ticketNum\": \"000002000857405\",\"assetID\": \"CISCO_1921C1_ISR_G2\", \"eventDate\": 1490545134601,\"eventAbstract\": \"ospfIfConfigError trap received from Cisco_1921c1_ISR_G2 with arguments: ospfRouterId=Cisco_1921c1_ISR_G2; ospfIfIpAddress=1921c1_288266; ospfAddressLessIf=0; ospfPacketSrc=172.17.0.11; ospfConfigErrorType=2; ospfPacketType=1\",\"severity\": \"2 - Major\",\"ticketPriority\": \"3\",\"reportedCustomerImpact\": 0,\"testAutoIndicator\": 0,\"supportGroupName\": \"US-TEST-ORT\",\"lastModifiedDate\": \"1487687703\",\"messageGroup\": \"SNMP\",\"csi\": 0,\"mfabRestoredTime\": 0},\"header\": {\"timestamp\": \"2017-02-21T14:35:05.219+0000\",\"eventSource\": \"aotstm\",\"entityId\": \"000002000857405\", \"sequenceNumber\": 2 },\"blinkMsgId\": \"f38c071e-1a47-4b55-9e72-1db830100a61\",\"sourceIP\": \"130.4.165.158\"},\"SubscriberInfo\": {}}";
+ PortalRestResponse<String> actualPortalRestResponse = ticketEventController.handleRequest(mockedRequest,
+ mockedResponse, ticketEventJson);
+ assertTrue(actualPortalRestResponse.getStatus().compareTo(PortalRestStatusEnum.ERROR) == 0);
+ assertEquals(actualPortalRestResponse.getMessage(), "At least one user Id is mandatory");
+ }
+} \ No newline at end of file
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/UserControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/UserControllerTest.java
new file mode 100644
index 00000000..acfa25a4
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/UserControllerTest.java
@@ -0,0 +1,141 @@
+package org.openecomp.portalapp.portal.controller;
+
+import static org.junit.Assert.assertEquals;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
+import org.openecomp.portalapp.portal.controller.UserController;
+import org.openecomp.portalapp.portal.core.MockEPUser;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.openecomp.portalapp.portal.service.UserService;
+import org.openecomp.portalapp.portal.service.UserServiceImpl;
+import org.openecomp.portalapp.portal.transport.ProfileDetail;
+import org.openecomp.portalapp.util.EPUserUtils;
+import org.openecomp.portalsdk.core.onboarding.util.CipherUtil;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest(CipherUtil.class)
+public class UserControllerTest extends MockitoTestSuite {
+
+ @InjectMocks
+ UserController userController = new UserController();
+
+ @Mock
+ UserService userService = new UserServiceImpl();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ @Mock
+ EPUserUtils ePUserUtils = new EPUserUtils();
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+ NullPointerException nullPointerException = new NullPointerException();
+
+ MockEPUser mockUser = new MockEPUser();
+
+ @Test
+ public void getLoggedinUserExceptionTest() {
+ EPUser epUser = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(epUser);
+ PortalRestResponse<ProfileDetail> expectedResponse = new PortalRestResponse<ProfileDetail>();
+ expectedResponse.setMessage(null);
+ expectedResponse.setResponse(null);
+ PortalRestStatusEnum enu = null;
+ expectedResponse.setStatus(enu.ERROR);
+ PortalRestResponse<ProfileDetail> response = userController.getLoggedinUser(mockedRequest);
+ assertEquals(response, expectedResponse);
+ }
+
+ @Test
+ public void getLoggedinUserTest() throws Exception {
+ EPUser epUser = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(epUser);
+ PortalRestResponse<ProfileDetail> expectedResponse = new PortalRestResponse<ProfileDetail>();
+ expectedResponse.setMessage("success");
+ ProfileDetail profileDetail = new ProfileDetail();
+ expectedResponse.setResponse(profileDetail);
+ PortalRestStatusEnum enu = null;
+ expectedResponse.setStatus(enu.OK);
+ PowerMockito.mockStatic(CipherUtil.class);
+ Mockito.when(CipherUtil.decrypt(epUser.getLoginPwd())).thenReturn("Password");
+ PortalRestResponse<ProfileDetail> response = userController.getLoggedinUser(mockedRequest);
+ assertEquals(response.getMessage(), expectedResponse.getMessage());
+ assertEquals(response.getStatus(), expectedResponse.getStatus());
+ }
+
+ @Test
+ public void modifyLoggedinUserIfProfileNullTest() {
+ PortalRestResponse<String> expectedResponse = new PortalRestResponse<String>();
+ expectedResponse.setMessage("java.lang.NullPointerException");
+ expectedResponse.setResponse(null);
+ PortalRestStatusEnum enu = null;
+ expectedResponse.setStatus(enu.ERROR);
+ ProfileDetail profileDetail = null;
+ PortalRestResponse<String> actualResponse = userController.modifyLoggedinUser(mockedRequest, profileDetail);
+ assertEquals(actualResponse, expectedResponse);
+ assertEquals(actualResponse.getStatus(), expectedResponse.getStatus());
+ }
+
+ @Test
+ public void modifyLoggedinUserExceptionTest() {
+ EPUser epUser = mockUser.mockEPUser();
+
+ PortalRestResponse<String> expectedResponse = new PortalRestResponse<String>();
+ expectedResponse.setMessage(
+ "java.lang.ClassCastException: com.sun.crypto.provider.AESCipher$General cannot be cast to javax.crypto.CipherSpi");
+ expectedResponse.setResponse(null);
+ PortalRestStatusEnum enu = null;
+ expectedResponse.setStatus(enu.ERROR);
+ ProfileDetail profileDetail = new ProfileDetail();
+ profileDetail.setFirstName("Test_FirstName");
+ profileDetail.setLastName("Test_LastName");
+ profileDetail.setEmail("Test_Email");
+ profileDetail.setLoginId("Test_LoginId");
+ profileDetail.setLoginPassword("Test_LoginPassword");
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(epUser);
+ PortalRestResponse<String> actualResponse = userController.modifyLoggedinUser(mockedRequest, profileDetail);
+ assertEquals(actualResponse, expectedResponse);
+
+ }
+
+ /*@Test
+ public void modifyLoggedinUserTest() throws Exception {
+ EPUser epUser = mockUser.mockEPUser();
+ PortalRestResponse<String> expectedResponse = new PortalRestResponse<String>();
+ expectedResponse.setMessage("success");
+ expectedResponse.setResponse(null);
+ PortalRestStatusEnum enu = null;
+ expectedResponse.setStatus(enu.OK);
+ ProfileDetail profileDetail = new ProfileDetail();
+ profileDetail.setFirstName("Test_FirstName");
+ profileDetail.setLastName("Test_LastName");
+ profileDetail.setEmail("Test_Email");
+ profileDetail.setLoginId("Test_LoginId");
+ profileDetail.setLoginPassword("Test_LoginPassword");
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(epUser);
+ PowerMockito.mockStatic(CipherUtil.class);
+ Mockito.when(CipherUtil.decrypt(epUser.getLoginPwd())).thenReturn("Password");
+ PortalRestResponse<String> actualResponse = userController.modifyLoggedinUser(mockedRequest, profileDetail);
+ System.out.println(actualResponse);
+ }*/
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/UserNotificationControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/UserNotificationControllerTest.java
new file mode 100644
index 00000000..ebe5f7cd
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/UserNotificationControllerTest.java
@@ -0,0 +1,263 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.controller;
+
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Matchers;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
+import org.openecomp.portalapp.portal.controller.UserNotificationController;
+import org.openecomp.portalapp.portal.core.MockEPUser;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.openecomp.portalapp.portal.service.FunctionalMenuService;
+import org.openecomp.portalapp.portal.service.FunctionalMenuServiceImpl;
+import org.openecomp.portalapp.portal.service.UserNotificationService;
+import org.openecomp.portalapp.portal.service.UserNotificationServiceImpl;
+import org.openecomp.portalapp.portal.transport.EpNotificationItem;
+import org.openecomp.portalapp.portal.transport.EpNotificationItemVO;
+import org.openecomp.portalapp.portal.transport.FunctionalMenuRole;
+import org.openecomp.portalapp.util.EPUserUtils;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.openecomp.portalsdk.core.web.support.UserUtils;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest(UserUtils.class)
+public class UserNotificationControllerTest {
+
+ @Mock
+ FunctionalMenuService functionalMenuService = new FunctionalMenuServiceImpl();
+
+ @Mock
+ UserNotificationService userNotificationService = new UserNotificationServiceImpl();
+
+ @InjectMocks
+ UserNotificationController userNotificationController = new UserNotificationController();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ MockEPUser mockUser = new MockEPUser();
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+ NullPointerException nullPointerException = new NullPointerException();
+
+ @Test
+ public void getMenuIdRoleIdTest() {
+ List<FunctionalMenuRole> expectedMenuRoleList = new ArrayList<FunctionalMenuRole>();
+ FunctionalMenuRole functionalMenuRole = new FunctionalMenuRole();
+ functionalMenuRole.setId(new Integer(99999999));
+ functionalMenuRole.setMenuId((long) 137);
+ functionalMenuRole.setAppId(new Integer(456));
+ functionalMenuRole.setRoleId(new Integer(6214));
+ expectedMenuRoleList.add(functionalMenuRole);
+ List<FunctionalMenuRole> actualFunctionalMenuRoleList = null;
+ Mockito.when(functionalMenuService.getFunctionalMenuRole()).thenReturn(expectedMenuRoleList);
+ actualFunctionalMenuRoleList = userNotificationController.getMenuIdRoleId(mockedRequest, mockedResponse);
+ assertTrue(actualFunctionalMenuRoleList.equals(expectedMenuRoleList));
+
+ }
+
+ @Test
+ public void getNotificationsTest() {
+ EPUser user = mockUser.mockEPUser();
+ HttpSession session = mockedRequest.getSession();
+ session.setAttribute(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ List<EpNotificationItem> expectedEpNotificationList = new ArrayList<EpNotificationItem>();
+ EpNotificationItem epNotificationItem = new EpNotificationItem();
+ epNotificationItem.setNotificationId((long) 200);
+ expectedEpNotificationList.add(epNotificationItem);
+ PortalRestResponse<List<EpNotificationItem>> expectedportalRestResponse = new PortalRestResponse<List<EpNotificationItem>>();
+ expectedportalRestResponse.setMessage("success");
+ expectedportalRestResponse.setResponse(expectedEpNotificationList);
+ expectedportalRestResponse.setStatus(PortalRestStatusEnum.OK);
+ PortalRestResponse<List<EpNotificationItem>> actualPortalRestResponse = null;
+ Mockito.when(userNotificationService.getNotifications(user.getId())).thenReturn(expectedEpNotificationList);
+ actualPortalRestResponse = userNotificationController.getNotifications(mockedRequest, mockedResponse);
+ assertTrue(expectedportalRestResponse.equals(actualPortalRestResponse));
+
+ }
+
+ @Test
+ public void getNotificationsCatchesExceptionTest() {
+ EPUser user = mockUser.mockEPUser();
+ HttpSession session = mockedRequest.getSession();
+ session.setAttribute(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ List<EpNotificationItem> expectedEpNotificationList = null;
+ PortalRestResponse<List<EpNotificationItem>> expectedportalRestResponse = new PortalRestResponse<List<EpNotificationItem>>();
+ expectedportalRestResponse.setMessage(null);
+ expectedportalRestResponse.setResponse(expectedEpNotificationList);
+ expectedportalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
+ PortalRestResponse<List<EpNotificationItem>> actualPortalRestResponse = null;
+ Mockito.when(userNotificationService.getNotifications(user.getId())).thenThrow(new NullPointerException());
+ actualPortalRestResponse = userNotificationController.getNotifications(mockedRequest, mockedResponse);
+ assertTrue(expectedportalRestResponse.equals(actualPortalRestResponse));
+ }
+
+ @Test
+ public void getAdminNotificationsTest() {
+ EPUser user = mockUser.mockEPUser();
+ HttpSession session = mockedRequest.getSession();
+ session.setAttribute(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ List<EpNotificationItemVO> actualEpNotificationsList = new ArrayList<EpNotificationItemVO>();
+ List<EpNotificationItemVO> expectedEpNotificationsList = new ArrayList<EpNotificationItemVO>();
+ EpNotificationItemVO epNotificationItemVO = new EpNotificationItemVO();
+ epNotificationItemVO.setId((long) 1);
+ expectedEpNotificationsList.add(epNotificationItemVO);
+ Mockito.when(userNotificationService.getAdminNotificationVOS(Matchers.anyLong())).thenReturn(expectedEpNotificationsList);
+ actualEpNotificationsList = userNotificationController.getAdminNotifications(mockedRequest, mockedResponse);
+ assertTrue(actualEpNotificationsList.equals(expectedEpNotificationsList));
+ }
+
+ @Test
+ public void saveTestWhenNotificationIsNull() throws Exception {
+ EPUser user = mockUser.mockEPUser();
+ HttpSession session = mockedRequest.getSession();
+ session.setAttribute(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+
+ PortalRestResponse<String> actualPortalRestResponse = new PortalRestResponse<String>();
+ PortalRestResponse<String> expectedPortalRestResponse = new PortalRestResponse<String>();
+ expectedPortalRestResponse.setMessage("FAILURE");
+ expectedPortalRestResponse.setResponse("Notification Header cannot be null or empty");
+ expectedPortalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
+
+ EpNotificationItem notificationItem = null;
+ actualPortalRestResponse = userNotificationController.save(mockedRequest, mockedResponse, notificationItem);
+ assertTrue(actualPortalRestResponse.equals(expectedPortalRestResponse));
+ }
+
+ @Test
+ public void saveTestWhenEndTimeIsGreater() throws Exception {
+ EPUser user = mockUser.mockEPUser();
+ HttpSession session = mockedRequest.getSession();
+ session.setAttribute(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ PortalRestResponse<String> actualPortalRestResponse = new PortalRestResponse<String>();
+ PortalRestResponse<String> expectedPortalRestResponse = new PortalRestResponse<String>();
+ expectedPortalRestResponse.setMessage("FAILURE");
+ expectedPortalRestResponse.setResponse("End Time should be greater than start time");
+ expectedPortalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
+ EpNotificationItem notificationItem = new EpNotificationItem();
+ notificationItem.setNotificationId((long) 1);
+ notificationItem.setMsgHeader("Test");
+ Date currentDate = new Date();
+ Calendar c = Calendar.getInstance();
+ c.setTime(currentDate);
+ c.add(Calendar.DATE, 1);
+ Date currentDatePlusOne = c.getTime();
+ notificationItem.setStartTime(currentDatePlusOne);
+ notificationItem.setEndTime(currentDate);
+
+ actualPortalRestResponse = userNotificationController.save(mockedRequest, mockedResponse, notificationItem);
+ assertTrue(actualPortalRestResponse.equals(expectedPortalRestResponse));
+
+ }
+
+ @Test
+ public void saveTestWhenNoRoleIDExists() throws Exception {
+ EPUser user = mockUser.mockEPUser();
+ HttpSession session = mockedRequest.getSession();
+ session.setAttribute(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ PortalRestResponse<String> actualPortalRestResponse = new PortalRestResponse<String>();
+ PortalRestResponse<String> expectedPortalRestResponse = new PortalRestResponse<String>();
+ expectedPortalRestResponse.setMessage("FAILURE");
+ expectedPortalRestResponse.setResponse("No Roles Ids Exist for the selected Roles");
+ expectedPortalRestResponse.setStatus(PortalRestStatusEnum.ERROR);
+ EpNotificationItem notificationItem = new EpNotificationItem();
+ notificationItem.setNotificationId((long) 1);
+ notificationItem.setMsgHeader("Test");
+ notificationItem.setIsForAllRoles("N");
+ Date currentDate = new Date();
+ Calendar c = Calendar.getInstance();
+ c.setTime(currentDate);
+ c.add(Calendar.DATE, 1);
+ Date currentDatePlusOne = c.getTime();
+ notificationItem.setStartTime(currentDate);
+ notificationItem.setEndTime(currentDatePlusOne);
+ List<Long> roleList = new ArrayList<Long>();
+ notificationItem.setRoleIds(roleList);
+ actualPortalRestResponse = userNotificationController.save(mockedRequest, mockedResponse, notificationItem);
+ assertTrue(actualPortalRestResponse.equals(expectedPortalRestResponse));
+ }
+
+ @Test
+ public void saveTest() throws Exception {
+ EPUser user = mockUser.mockEPUser();
+ HttpSession session = mockedRequest.getSession();
+ session.setAttribute("user", user);
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ PortalRestResponse<String> actualPortalRestResponse = new PortalRestResponse<String>();
+ PortalRestResponse<String> expectedPortalRestResponse = new PortalRestResponse<String>();
+ expectedPortalRestResponse.setMessage("SUCCESS");
+ expectedPortalRestResponse.setResponse("");
+ expectedPortalRestResponse.setStatus(PortalRestStatusEnum.OK);
+ EpNotificationItem notificationItem = new EpNotificationItem();
+ notificationItem.setNotificationId((long) 1);
+ notificationItem.setMsgHeader("Test");
+ notificationItem.setIsForAllRoles("Y");
+ Date currentDate = new Date();
+ Calendar c = Calendar.getInstance();
+ c.setTime(currentDate);
+ c.add(Calendar.DATE, 1);
+ Date currentDatePlusOne = c.getTime();
+ notificationItem.setStartTime(currentDate);
+ notificationItem.setEndTime(currentDatePlusOne);
+ List<Long> roleList = new ArrayList<Long>();
+ Long role1 = (long) 1;
+ roleList.add(role1);
+ notificationItem.setRoleIds(roleList);
+ HttpServletRequest request = mockitoTestSuite.getMockedRequest();
+ PowerMockito.mockStatic(UserUtils.class);
+ Mockito.when(UserUtils.getUserIdAsLong(request)).thenReturn((long) 1);
+ Mockito.when(userNotificationService.saveNotification(notificationItem)).thenReturn("Test");
+ actualPortalRestResponse = userNotificationController.save(mockedRequest, mockedResponse, notificationItem);
+ assertTrue(actualPortalRestResponse.equals(expectedPortalRestResponse));
+ }
+
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/UserRolesControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/UserRolesControllerTest.java
new file mode 100644
index 00000000..56fa6a4d
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/UserRolesControllerTest.java
@@ -0,0 +1,308 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.controller;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
+import org.openecomp.portalapp.portal.controller.UserRolesController;
+import org.openecomp.portalapp.portal.core.MockEPUser;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.domain.EcompAuditLog;
+import org.openecomp.portalapp.portal.service.AdminRolesService;
+import org.openecomp.portalapp.portal.service.SearchService;
+import org.openecomp.portalapp.portal.service.UserRolesService;
+import org.openecomp.portalapp.portal.transport.AppWithRolesForUser;
+import org.openecomp.portalapp.portal.transport.AppsListWithAdminRole;
+import org.openecomp.portalapp.portal.transport.FieldsValidator;
+import org.openecomp.portalapp.portal.transport.FieldsValidator.FieldName;
+import org.openecomp.portalapp.portal.transport.RoleInAppForUser;
+import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;
+import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
+import org.openecomp.portalapp.util.EPUserUtils;
+import org.openecomp.portalsdk.core.service.AuditService;
+import org.openecomp.portalsdk.core.service.DataAccessService;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest({EcompPortalUtils.class, EPCommonSystemProperties.class, EcompAuditLog.class, SystemProperties.class})
+public class UserRolesControllerTest extends MockitoTestSuite {
+
+ String userid = "ab1234";
+
+ @Mock
+ UserRolesService userRolesService;
+
+ @Mock
+ SearchService searchService;
+
+ @Mock
+ AuditService auditService;
+
+ @Mock
+ AdminRolesService adminRolesService;
+
+ @Mock
+ FieldsValidator fieldsValidator;
+
+ @InjectMocks
+ UserRolesController userRolesController = new UserRolesController();
+
+ @Mock
+ private DataAccessService dataAccessService;
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+
+ @Mock
+ EPUserUtils ePUserUtils = new EPUserUtils();
+
+ @Mock
+ EPUser epuser;
+
+ MockEPUser mockUser = new MockEPUser();
+
+ @Test
+ public void putAppWithUserRoleRequestTest() {
+
+ FieldsValidator actualFieldsValidator = null;
+
+ AppWithRolesForUser appWithRolesForUser = new AppWithRolesForUser();
+ List<RoleInAppForUser> listofRoles = new ArrayList<RoleInAppForUser>();
+
+ appWithRolesForUser.setOrgUserId("guest");
+ appWithRolesForUser.setAppId((long) 550);
+ appWithRolesForUser.setAppName("D2 Services Analytics Dashboard");
+ appWithRolesForUser.setAppRoles(listofRoles);
+
+ RoleInAppForUser roleInAppForUser = new RoleInAppForUser();
+ roleInAppForUser.setIsApplied(false);
+ roleInAppForUser.setRoleId((long) 1);
+ roleInAppForUser.setRoleName("System Administrator");
+
+ RoleInAppForUser roleInAppForUser1 = new RoleInAppForUser();
+ roleInAppForUser1.setIsApplied(true);
+ roleInAppForUser1.setRoleId((long) 16);
+ roleInAppForUser1.setRoleName("Standard User");
+
+ listofRoles.add(roleInAppForUser);
+ listofRoles.add(roleInAppForUser1);
+ EPUser user = mockUser.mockEPUser();
+ FieldsValidator expectedFieldValidator = new FieldsValidator();
+ List<FieldName> fields = new ArrayList<>();
+
+ expectedFieldValidator.setHttpStatusCode((long) 200);
+ expectedFieldValidator.setFields(fields);
+ expectedFieldValidator.setErrorCode(null);
+ HttpSession session = mockedRequest.getSession();
+ session.setAttribute(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);
+
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(userRolesService.putUserAppRolesRequest(appWithRolesForUser, user))
+ .thenReturn(expectedFieldValidator);
+
+ actualFieldsValidator = userRolesController.putAppWithUserRoleRequest(mockedRequest, appWithRolesForUser,
+ mockedResponse);
+ assertEquals(expectedFieldValidator.getHttpStatusCode(), actualFieldsValidator.getHttpStatusCode());
+ assertEquals(expectedFieldValidator.getErrorCode(), actualFieldsValidator.getErrorCode());
+ assertEquals(expectedFieldValidator.getFields(), actualFieldsValidator.getFields());
+
+ }
+
+ @Test
+ public void getPhoneBookSearchResultBadPermissionsTest() {
+ String searchString = "test";
+ String actualResult = null;
+ String expectedResult = null;
+
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+ Mockito.when(adminRolesService.isAccountAdmin(user)).thenReturn(false);
+ Mockito.when(searchService.searchUsersInPhoneBook(searchString)).thenReturn(actualResult);
+
+ actualResult = userRolesController.getPhoneBookSearchResult(mockedRequest, searchString, mockedResponse);
+ assertEquals(expectedResult, actualResult);
+
+ }
+
+ @Test
+ public void getPhoneBookSearchResultValidationTest() {
+ String searchString = " t";
+ String actualResult = null;
+ String expectedResult = null;
+
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ Mockito.when(adminRolesService.isAccountAdmin(user)).thenReturn(false);
+ Mockito.when(searchService.searchUsersInPhoneBook(searchString)).thenReturn(actualResult);
+
+ actualResult = userRolesController.getPhoneBookSearchResult(mockedRequest, searchString, mockedResponse);
+ assertEquals(expectedResult, actualResult);
+
+ }
+
+ @Test
+ public void getPhoneBookSearchResultTest() {
+ String searchString = "test";
+ String actualResult = null;
+ String expectedResult = null;
+
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ Mockito.when(adminRolesService.isAccountAdmin(user)).thenReturn(false);
+ Mockito.when(searchService.searchUsersInPhoneBook(searchString)).thenReturn(actualResult);
+
+ actualResult = userRolesController.getPhoneBookSearchResult(mockedRequest, searchString, mockedResponse);
+ assertEquals(expectedResult, actualResult);
+
+ }
+
+ @Test
+ public void getAppsWithAdminRoleStateForUserTest(){
+
+ String orgUserId = "hb123f";
+ AppsListWithAdminRole actualResult = new AppsListWithAdminRole();
+ AppsListWithAdminRole expectedResult = new AppsListWithAdminRole();
+ EPUser user = mockUser.mockEPUser();
+ // PowerMockito.mockStatic(EcompPortalUtils.class);
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ Mockito.when(adminRolesService.getAppsWithAdminRoleStateForUser(orgUserId)).thenReturn(actualResult);
+
+ actualResult = userRolesController.getAppsWithAdminRoleStateForUser(mockedRequest, orgUserId, mockedResponse);
+ assertEquals(expectedResult, actualResult);
+ }
+
+ /*@Test
+ public void getAppsWithAdminRoleStateForUserBadRequestTest(){
+
+ String orgUserId = "hb123f";
+ AppsListWithAdminRole actualResult = null;
+ AppsListWithAdminRole expectedResult = null;
+ EPUser user = mockUser.mockEPUser();
+ PowerMockito.mockStatic(EcompPortalUtils.class);
+ PowerMockito.when(EcompPortalUtils.legitimateUserId(orgUserId)).thenReturn(false);
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ Mockito.when(adminRolesService.getAppsWithAdminRoleStateForUser(orgUserId)).thenReturn(actualResult);
+
+ actualResult = userRolesController.getAppsWithAdminRoleStateForUser(mockedRequest, orgUserId, mockedResponse);
+ assertEquals(expectedResult, actualResult);
+ }*/
+
+ @Test
+ public void putAppsWithAdminRoleStateForUserBadStatusCodeTest(){
+ FieldsValidator actualFieldsValidator = null;
+ AppsListWithAdminRole newAppsListWithAdminRoles = new AppsListWithAdminRole();
+ FieldsValidator expectedFieldsValidator = new FieldsValidator();
+ List<FieldName> fieldNames = new ArrayList<FieldName>();
+ expectedFieldsValidator.setErrorCode(null);
+ expectedFieldsValidator.setFields(fieldNames);
+ expectedFieldsValidator.setHttpStatusCode((long)200);
+
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+
+ actualFieldsValidator = userRolesController.putAppsWithAdminRoleStateForUser(mockedRequest, newAppsListWithAdminRoles, mockedResponse);
+ assertEquals(expectedFieldsValidator, actualFieldsValidator);
+ }
+
+
+ /*@Test
+ public void putAppsWithAdminRoleStateForUserTest() {
+
+ FieldsValidator actualFieldsValidator = null;
+ AppsListWithAdminRole newAppsListWithAdminRoles = new AppsListWithAdminRole();
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ Mockito.when(adminRolesService.isAccountAdmin(user)).thenReturn(false);
+ PowerMockito.mockStatic(EPCommonSystemProperties.class);
+ PowerMockito.mockStatic(EcompAuditLog.class);
+ PowerMockito.mockStatic(SystemProperties.class);
+ Mockito.when(SystemProperties.getProperty(EcompAuditLog.CD_ACTIVITY_UPDATE_ACCOUNT_ADMIN)).thenReturn("1400");
+ Mockito.when(SystemProperties.getProperty(EPCommonSystemProperties.AUDITLOG_BEGIN_TIMESTAMP)).thenReturn("1400");
+ Mockito.when(SystemProperties.getProperty(EPCommonSystemProperties.AUDITLOG_END_TIMESTAMP)).thenReturn("1400");
+ Mockito.when(SystemProperties.getProperty(SystemProperties.MDC_TIMER)).thenReturn("1400");
+
+ actualFieldsValidator = userRolesController.putAppsWithAdminRoleStateForUser(mockedRequest, newAppsListWithAdminRoles, mockedResponse);
+
+ System.out.println(actualFieldsValidator);
+ Mockito.when(searchService.searchUsersInPhoneBook(searchString)).thenReturn(actualResult);
+
+ actualResult = userRolesController.getPhoneBookSearchResult(mockedRequest, searchString, mockedResponse);
+ assertEquals(expectedResult, actualResult);
+
+ }*/
+
+ /*@Test
+ public void putAppsWithAdminRoleStateForUserTest(){
+ FieldsValidator actualFieldsValidator = null;
+ AppsListWithAdminRole newAppsListWithAdminRoles = new AppsListWithAdminRole();
+ FieldsValidator expectedFieldsValidator = new FieldsValidator();
+ List<FieldName> fieldNames = new ArrayList<FieldName>();
+ expectedFieldsValidator.setErrorCode(null);
+ expectedFieldsValidator.setFields(fieldNames);
+ expectedFieldsValidator.setHttpStatusCode((long)200);
+
+ EPUser user = mockUser.mockEPUser();
+ PowerMockito.mockStatic(EPCommonSystemProperties.class);
+ PowerMockito.mockStatic(EcompAuditLog.class);
+ PowerMockito.mockStatic(SystemProperties.class);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ Mockito.when(adminRolesService.setAppsWithAdminRoleStateForUser(newAppsListWithAdminRoles));
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+
+ // Mockito.call(auditService.logActivity(auditLog, null));
+// Mockito.when(SystemProperties.getProperty(EcompAuditLog.CD_ACTIVITY_UPDATE_ACCOUNT_ADMIN)).thenReturn("1400");
+// Mockito.when(SystemProperties.getProperty(EPCommonSystemProperties.AUDITLOG_BEGIN_TIMESTAMP)).thenReturn("1400");
+// Mockito.when(SystemProperties.getProperty(EPCommonSystemProperties.AUDITLOG_END_TIMESTAMP)).thenReturn("1400");
+// Mockito.when(SystemProperties.getProperty(SystemProperties.MDC_TIMER)).thenReturn("1400");
+
+ actualFieldsValidator = userRolesController.putAppsWithAdminRoleStateForUser(mockedRequest, newAppsListWithAdminRoles, mockedResponse);
+ assertEquals(expectedFieldsValidator, actualFieldsValidator);
+ }*/
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/WebAnalyticsExtAppControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/WebAnalyticsExtAppControllerTest.java
new file mode 100644
index 00000000..fde29913
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/WebAnalyticsExtAppControllerTest.java
@@ -0,0 +1,110 @@
+package org.openecomp.portalapp.portal.controller;
+
+import static org.junit.Assert.*;
+
+import java.io.InputStream;
+import java.nio.charset.StandardCharsets;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.io.IOUtils;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
+import org.openecomp.portalapp.portal.controller.WebAnalyticsExtAppController;
+import org.openecomp.portalapp.portal.domain.EPApp;
+import org.openecomp.portalapp.portal.service.AdminRolesService;
+import org.openecomp.portalapp.portal.service.AdminRolesServiceImpl;
+import org.openecomp.portalapp.portal.service.AppsCacheService;
+import org.openecomp.portalapp.portal.service.AppsCacheServiceImple;
+import org.openecomp.portalapp.portal.transport.Analytics;
+import org.openecomp.portalsdk.core.onboarding.crossapi.PortalAPIResponse;
+import org.openecomp.portalsdk.core.service.AuditService;
+import org.openecomp.portalsdk.core.service.AuditServiceImpl;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest({SystemProperties.class,IOUtils.class,Object.class})
+public class WebAnalyticsExtAppControllerTest {
+
+
+
+ @InjectMocks
+ WebAnalyticsExtAppController webAnalyticsExtAppController = new WebAnalyticsExtAppController();
+
+ @Mock
+ AdminRolesService adminRolesService = new AdminRolesServiceImpl();
+
+ @Mock
+ AppsCacheService appCacheService = new AppsCacheServiceImple();
+
+ @Mock
+ AuditService auditService = new AuditServiceImpl();
+
+// @Mock
+// InputStream analyticsFileStream;
+
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+ NullPointerException nullPointerException = new NullPointerException();
+
+ /*@Test
+ public void getAnalyticsScriptTest() throws Exception
+ {
+ String expectedResponse = "http://www.ecomp.com";
+
+ InputStream analyticsFileStream = null;
+ PowerMockito.mockStatic(SystemProperties.class);
+ PowerMockito.mockStatic(IOUtils.class);
+ Mockito.when(IOUtils.toString(analyticsFileStream, StandardCharsets.UTF_8.name())).thenReturn("PORTAL_ENV_URL");
+ Mockito.when(SystemProperties.getProperty("frontend_url")).thenReturn("http://www.ecomp.com/test");
+ String actualResponse = webAnalyticsExtAppController.getAnalyticsScript(mockedRequest);
+// assertNull(webAnalyticsExtAppController.getAnalyticsScript(mockedRequest));
+
+ // System.out.println(actualResponse);
+ assertTrue(actualResponse.equals(expectedResponse));
+ }*/
+
+ /*@Test
+ public void getAnalyticsScriptExceptionTest() throws Exception
+ {
+ String expectedResponse = "";
+ InputStream analyticsFileStream = null;
+ PowerMockito.mockStatic(SystemProperties.class);
+ PowerMockito.mockStatic(IOUtils.class);
+ Mockito.when(IOUtils.toString(analyticsFileStream, StandardCharsets.UTF_8.name())).thenThrow(nullPointerException);
+ Mockito.when(SystemProperties.getProperty("frontend_url")).thenReturn("http://www.ecomp.com/test");
+ String actualResponse = webAnalyticsExtAppController.getAnalyticsScript(mockedRequest);
+ assertEquals(actualResponse,expectedResponse);
+ }*/
+
+ @Test
+ public void storeAnalyticsScriptIfAnalyticsNullTest() throws Exception
+ {
+ PortalAPIResponse expectedPortalAPIResponse = new PortalAPIResponse(true, "error");
+ Analytics analytics= null;
+ Mockito.when(mockedRequest.getHeader("uebkey")).thenReturn(null);
+ PortalAPIResponse actualPortalAPIResponse = webAnalyticsExtAppController.storeAnalyticsScript(mockedRequest, analytics);
+ assertTrue(expectedPortalAPIResponse.getMessage().equals(actualPortalAPIResponse.getMessage()));
+ assertTrue(expectedPortalAPIResponse.getStatus().equals(actualPortalAPIResponse.getStatus()));
+ }
+
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/WidgetsCatalogControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/WidgetsCatalogControllerTest.java
new file mode 100644
index 00000000..4087a599
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/WidgetsCatalogControllerTest.java
@@ -0,0 +1,87 @@
+//package org.openecomp.portalapp.portal.controller;
+//
+//import javax.servlet.http.HttpServletRequest;
+//import javax.servlet.http.HttpServletResponse;
+//
+//import org.junit.Before;
+//import org.junit.runner.RunWith;
+//import org.mockito.InjectMocks;
+//import org.mockito.Mock;
+//import org.mockito.MockitoAnnotations;
+//import org.openecomp.portalapp.portal.core.MockEPUser;
+//import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
+//import org.openecomp.portalapp.portal.service.ConsulHealthService;
+//import org.openecomp.portalapp.portal.service.ConsulHealthServiceImpl;
+//import org.openecomp.portalapp.portal.service.MicroserviceService;
+//import org.openecomp.portalapp.portal.service.MicroserviceServiceImpl;
+//import org.openecomp.portalapp.portal.service.WidgetParameterService;
+//import org.openecomp.portalapp.portal.service.WidgetParameterServiceImpl;
+//import org.openecomp.portalapp.util.EPUserUtils;
+//import org.powermock.core.classloader.annotations.PrepareForTest;
+//import org.powermock.modules.junit4.PowerMockRunner;
+//
+//@RunWith(PowerMockRunner.class)
+//@PrepareForTest({EPUserUtils.class})
+//public class WidgetsCatalogControllerTest {
+//
+// @Mock
+// ConsulHealthService consulHealthService = new ConsulHealthServiceImpl();
+//
+// @Mock
+// MicroserviceService microserviceService = new MicroserviceServiceImpl();
+//
+// @Mock
+// WidgetParameterService widgetParameterService = new WidgetParameterServiceImpl();
+//
+// @InjectMocks
+// WidgetsCatalogController widgetsCatalogController = new WidgetsCatalogController();
+//
+// @Before
+// public void setup() {
+// MockitoAnnotations.initMocks(this);
+// }
+//
+// MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+//
+// HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+// HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+//
+// NullPointerException nullPointerException = new NullPointerException();
+//
+// MockEPUser mockUser = new MockEPUser();
+//
+// /*public List<WidgetCatalog> getUserWidgetCatalog(HttpServletRequest request, HttpServletResponse response,
+// @PathVariable("loginName") String loginName) throws RestClientException, Exception {
+// List<WidgetCatalog> widgets = new ArrayList<>();
+// try {
+// CustomLoggingFilter d;
+// ResponseEntity<ArrayList> ans = template.exchange(
+// EcompPortalUtils.widgetMsProtocol() + "://" + consulHealthService.getServiceLocation(whatService,
+// SystemProperties.getProperty("microservices.widget.local.port"))
+// + "/widget/microservices/widgetCatalog/" + loginName,
+// HttpMethod.GET, new HttpEntity(WidgetServiceHeaders.getInstance()), ArrayList.class);
+// widgets = ans.getBody();
+// } catch (Exception e) {
+// logger.error(EELFLoggerDelegate.errorLogger, "getUserWidgetCatalog failed", e);
+// // returning null because null help check on the UI if there was a
+// // communication problem with Microservice.
+// return null;
+// }
+// return widgets;
+// }
+//
+// @Test
+// public void getWidgetDataTest(){
+//
+// String resourceType = null;
+// List<WidgetCatalog> expectedData = new ArrayList<WidgetCatalog>();
+// expectedData.setStatus(PortalRestStatusEnum.ERROR);
+// expectedData.setMessage("Unexpected resource type null");
+// expectedData.setResponse(null);
+//
+// PortalRestResponse<CommonWidgetMeta> actualResponse = dashboardController.getWidgetData(mockedRequest, resourceType);
+// assertEquals(expectedData,actualResponse);
+//
+//
+// }*/
+//}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/WidgetsCatalogMarkupControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/WidgetsCatalogMarkupControllerTest.java
new file mode 100644
index 00000000..bba49f71
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/controller/WidgetsCatalogMarkupControllerTest.java
@@ -0,0 +1,72 @@
+package org.openecomp.portalapp.portal.controller;
+
+import static org.junit.Assert.assertTrue;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
+import org.openecomp.portalapp.portal.controller.WidgetsCatalogMarkupController;
+import org.openecomp.portalapp.portal.domain.WidgetServiceHeaders;
+import org.openecomp.portalapp.portal.service.ConsulHealthService;
+import org.openecomp.portalapp.portal.service.ConsulHealthServiceImpl;
+import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
+import org.openecomp.portalsdk.core.onboarding.util.CipherUtil;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+import org.springframework.web.client.RestClientException;
+import org.springframework.web.client.RestTemplate;
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest(WidgetServiceHeaders.class)
+public class WidgetsCatalogMarkupControllerTest extends MockitoTestSuite {
+
+ @InjectMocks
+ WidgetsCatalogMarkupController widgetsCatalogMarkupController = new WidgetsCatalogMarkupController();
+
+ @Mock
+ ConsulHealthService consulHealthService = new ConsulHealthServiceImpl();
+
+ @Mock
+ RestTemplate template = new RestTemplate();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+ @Mock
+ CipherUtil cipherUtil= new CipherUtil();
+
+ @Mock
+ EcompPortalUtils EcompPortalUtils =new EcompPortalUtils();
+
+ @Mock
+ WidgetServiceHeaders WidgetServiceHeaders ;
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+
+ @SuppressWarnings("static-access")
+ @Test
+ public void getWidgetMarkupTest() throws RestClientException, Exception
+ {
+ String whatService = "widgets-service";
+ PowerMockito.mockStatic(WidgetServiceHeaders.class);
+ Mockito.when(template.getForObject(EcompPortalUtils.widgetMsProtocol() + "://" + consulHealthService.getServiceLocation(whatService, null) + "/widget/microservices/markup/" + 1, String.class,
+ WidgetServiceHeaders.getInstance())).thenReturn("Success");
+ String response = widgetsCatalogMarkupController.getWidgetMarkup(mockedRequest, mockedResponse, 1);
+ assertTrue(response.equals("Success"));
+ }
+
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/core/MockEPUser.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/core/MockEPUser.java
new file mode 100644
index 00000000..9c220ce6
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/core/MockEPUser.java
@@ -0,0 +1,84 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.core;
+
+import java.util.Date;
+
+import org.openecomp.portalapp.portal.domain.EPUser;
+
+public class MockEPUser {
+
+ public EPUser mockEPUser() {
+
+ EPUser ePUser = new EPUser();
+ ePUser.setOrgId(null);
+ ePUser.setManagerId(null);
+ ePUser.setFirstName("test");
+ ePUser.setLastName("test");
+ ePUser.setMiddleInitial(null);
+ ePUser.setPhone(null);
+ ePUser.setFax(null);
+ ePUser.setCellular(null);
+ ePUser.setEmail(null);
+ ePUser.setAddressId(null);
+ ePUser.setAlertMethodCd(null);
+ ePUser.setHrid(null);
+ ePUser.setOrgUserId("guestT");
+ ePUser.setOrgCode(null);
+ ePUser.setAddress1(null);
+ ePUser.setAddress2(null);
+ ePUser.setCity(null);
+ ePUser.setState(null);
+ ePUser.setZipCode(null);
+ ePUser.setCountry(null);
+ ePUser.setOrgManagerUserId(null);
+ ePUser.setLocationClli(null);
+ ePUser.setBusinessCountryCode(null);
+ ePUser.setBusinessCountryName(null);
+ ePUser.setBusinessUnit(null);
+ ePUser.setBusinessUnitName(null);
+ ePUser.setDepartment(null);
+ ePUser.setDepartmentName(null);
+ ePUser.setCompanyCode(null);
+ ePUser.setCompany(null);
+ ePUser.setZipCodeSuffix(null);
+ ePUser.setJobTitle(null);
+ ePUser.setCommandChain(null);
+ ePUser.setSiloStatus(null);
+ ePUser.setCostCenter(null);
+ ePUser.setFinancialLocCode(null);
+
+ ePUser.setLoginId(null);
+ ePUser.setLoginPwd(null);
+ Date date = new Date();
+ ePUser.setLastLoginDate(date);
+ ePUser.setActive(true);
+ ePUser.setInternal(false);
+ ePUser.setSelectedProfileId(null);
+ ePUser.setTimeZoneId(null);
+ ePUser.setOnline(true);
+ ePUser.setChatId(null);
+ ePUser.setUserApps(null);
+ ePUser.setPseudoRoles(null);
+
+ ePUser.setId((long) -1);
+ return ePUser;
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/core/PopulateSampleTestData.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/core/PopulateSampleTestData.java
new file mode 100644
index 00000000..2458f471
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/core/PopulateSampleTestData.java
@@ -0,0 +1,66 @@
+///*-
+// * ================================================================================
+// * ECOMP Portal
+// * ================================================================================
+// * Copyright (C) 2017 AT&T Intellectual Property
+// * ================================================================================
+// * Licensed under the Apache License, Version 2.0 (the "License");
+// * you may not use this file except in compliance with the License.
+// * You may obtain a copy of the License at
+// *
+// * http://www.apache.org/licenses/LICENSE-2.0
+// *
+// * Unless required by applicable law or agreed to in writing, software
+// * distributed under the License is distributed on an "AS IS" BASIS,
+// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// * See the License for the specific language governing permissions and
+// * limitations under the License.
+// * ================================================================================
+// */
+//package org.openecomp.portalapp.portal.core;
+//
+//import java.sql.Connection;
+//import java.sql.SQLException;
+//
+//import javax.sql.DataSource;
+//
+//import org.junit.Before;
+//import org.junit.Test;
+//import org.openecomp.portalapp.framework.ApplicationCommonContextTestSuite;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.core.io.ClassPathResource;
+//import org.springframework.jdbc.datasource.DataSourceUtils;
+//import org.springframework.jdbc.datasource.init.ResourceDatabasePopulator;
+//
+//public class PopulateSampleTestData extends ApplicationCommonContextTestSuite {
+//
+// @Autowired
+// DataSource dataSource;
+//
+// @Before
+// public void populateTestData() throws SQLException {
+//
+// String sql = "PopulateTestData.sql";
+// createConnection(sql);
+// }
+//
+// public void createConnection(String sql) {
+// Connection connection = null;
+// ResourceDatabasePopulator populator = new ResourceDatabasePopulator();
+// populator.addScript(new ClassPathResource(sql));
+// try {
+// connection = DataSourceUtils.getConnection(dataSource);
+// populator.populate(connection);
+// } finally {
+// if (connection != null) {
+// DataSourceUtils.releaseConnection(connection, dataSource);
+// }
+// }
+// }
+//
+// @Test
+// public void populateTest() {
+// assert (true);
+// }
+//
+//}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/core/RemoveSampleTestData.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/core/RemoveSampleTestData.java
new file mode 100644
index 00000000..1e20cd16
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/core/RemoveSampleTestData.java
@@ -0,0 +1,65 @@
+///*-
+// * ================================================================================
+// * ECOMP Portal
+// * ================================================================================
+// * Copyright (C) 2017 AT&T Intellectual Property
+// * ================================================================================
+// * Licensed under the Apache License, Version 2.0 (the "License");
+// * you may not use this file except in compliance with the License.
+// * You may obtain a copy of the License at
+// *
+// * http://www.apache.org/licenses/LICENSE-2.0
+// *
+// * Unless required by applicable law or agreed to in writing, software
+// * distributed under the License is distributed on an "AS IS" BASIS,
+// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// * See the License for the specific language governing permissions and
+// * limitations under the License.
+// * ================================================================================
+// */
+//package org.openecomp.portalapp.portal.core;
+//
+//import java.sql.Connection;
+//import java.sql.SQLException;
+//
+//import javax.sql.DataSource;
+//
+//import org.junit.After;
+//import org.junit.Test;
+//import org.openecomp.portalapp.framework.ApplicationCommonContextTestSuite;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.core.io.ClassPathResource;
+//import org.springframework.jdbc.datasource.DataSourceUtils;
+//import org.springframework.jdbc.datasource.init.ResourceDatabasePopulator;
+//
+//public class RemoveSampleTestData extends ApplicationCommonContextTestSuite {
+// @Autowired
+// DataSource dataSource;
+//
+// public static int count = 0;
+//
+// @After
+// public void removeTestData() throws SQLException {
+// String sql = "RemoveTestData.sql";
+// createConnection(sql);
+// }
+//
+// public void createConnection(String sql) {
+// Connection connection = null;
+// ResourceDatabasePopulator populator = new ResourceDatabasePopulator();
+// populator.addScript(new ClassPathResource(sql));
+// try {
+// connection = DataSourceUtils.getConnection(dataSource);
+// populator.populate(connection);
+// } finally {
+// if (connection != null) {
+// DataSourceUtils.releaseConnection(connection, dataSource);
+// }
+// }
+// }
+//
+// @Test
+// public void removeTest() {
+// assert (true);
+// }
+//}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/core/RestURLsTestSuite.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/core/RestURLsTestSuite.java
new file mode 100644
index 00000000..4ff2b8da
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/core/RestURLsTestSuite.java
@@ -0,0 +1,334 @@
+///*-
+// * ================================================================================
+// * ECOMP Portal
+// * ================================================================================
+// * Copyright (C) 2017 AT&T Intellectual Property
+// * ================================================================================
+// * Licensed under the Apache License, Version 2.0 (the "License");
+// * you may not use this file except in compliance with the License.
+// * You may obtain a copy of the License at
+// *
+// * http://www.apache.org/licenses/LICENSE-2.0
+// *
+// * Unless required by applicable law or agreed to in writing, software
+// * distributed under the License is distributed on an "AS IS" BASIS,
+// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// * See the License for the specific language governing permissions and
+// * limitations under the License.
+// * ================================================================================
+// */
+//package org.openecomp.portalapp.portal.core;
+//
+//import static org.junit.Assert.assertEquals;
+//import static org.junit.Assert.assertTrue;
+//
+//import java.io.IOException;
+//import java.nio.charset.Charset;
+//import java.util.ArrayList;
+//
+//import org.junit.Assert;
+//import org.junit.Test;
+//import org.openecomp.portalapp.framework.ApplicationCommonContextTestSuite;
+//import org.openecomp.portalapp.portal.domain.EPUser;
+//import org.openecomp.portalapp.portal.test.core.MockEPUser;
+//import org.openecomp.portalapp.portal.transport.AppNameIdIsAdmin;
+//import org.openecomp.portalapp.portal.transport.AppsListWithAdminRole;
+//import org.openecomp.portalsdk.core.util.SystemProperties;
+//import org.springframework.http.MediaType;
+//import org.springframework.test.web.servlet.ResultActions;
+//import org.springframework.test.web.servlet.request.MockHttpServletRequestBuilder;
+//import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
+//
+//import com.fasterxml.jackson.annotation.JsonInclude;
+//import com.fasterxml.jackson.databind.ObjectMapper;
+//
+///**
+// *
+// * Use RestURLsTestSuite to test Rest API URL's
+// */
+//public class RestURLsTestSuite extends ApplicationCommonContextTestSuite {
+//
+// public static final MediaType APPLICATION_JSON_UTF8 = new MediaType(MediaType.APPLICATION_JSON.getType(),
+// MediaType.APPLICATION_JSON.getSubtype(), Charset.forName("utf8"));
+//
+// String url = null;
+//
+// MockEPUser mockUser = new MockEPUser();
+//
+// public byte[] convertObjectToJsonBytes(Object object) throws IOException {
+// ObjectMapper mapper = new ObjectMapper();
+// mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
+// return mapper.writeValueAsBytes(object);
+// }
+//
+// public void requestBuilder(String url) throws Exception {
+// EPUser user = mockUser.mockEPUser();
+//
+// MockHttpServletRequestBuilder requestBuilder = MockMvcRequestBuilders.get(url);
+// requestBuilder.sessionAttr(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);
+// ResultActions ra = getMockMvc().perform(requestBuilder);
+// assertData(ra);
+// }
+//
+// public void assertData(ResultActions ra) {
+// Assert.assertEquals("application/json", ra.andReturn().getResponse().getContentType());
+// Assert.assertEquals(200, ra.andReturn().getResponse().getStatus());
+//
+// }
+//
+// @Test
+// public void getMenuItemsTest() throws Exception {
+// url = "/portalApi/functionalMenu";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void getMenuItemsForNotificationsTest() throws Exception {
+// url = "/portalApi/functionalMenuForNotificationTree";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void getUserAppsTestnew() throws Exception {
+// url = "/portalApi/userApps";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void getPersUserAppsTest() throws Exception {
+// url = "/portalApi/persUserApps";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void getAppCatalogTest() throws Exception {
+// url = "/portalApi/appCatalog";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void getAppListNewTest() throws Exception {
+// ResultActions ra = getMockMvc()
+// .perform(MockMvcRequestBuilders.get("/portalApi/userApplicationRoles").param("userId", "guest"));
+// assertData(ra);
+// }
+//
+// @Test
+// public void getAvailableAppListTest() throws Exception {
+// url = "/portalApi/availableApps";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void getAllAppsTest() throws Exception {
+// url = "/portalApi/allAvailableApps";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void getUserProfileTest() throws Exception {
+// url = "/portalApi/userProfile";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void getRolesByAppTest() throws Exception {
+// EPUser user = mockUser.mockEPUser();
+// MockHttpServletRequestBuilder requestBuilder = MockMvcRequestBuilders.get("/portalApi/adminAppsRoles/550");
+// requestBuilder.sessionAttr(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);
+// ResultActions ra = getMockMvc().perform(requestBuilder);
+// assertData(ra);
+// }
+//
+// @Test
+// public void getAppsWithAdminRoleStateForUserTest() throws Exception {
+// url = "/portalApi/adminAppsRoles?user=guest";
+// requestBuilder(url);
+//
+// }
+//
+// @Test
+// public void getUsersFromAppEndpointTest() throws Exception {
+// url = "/portalApi/app/550/users";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void getOnboardingAppsTest() throws Exception {
+// url = "/portalApi/onboardingApps";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void getMenuItemsForAuthUserTest() throws Exception {
+// url = "/portalApi/functionalMenuForAuthUser";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void getMenuItemsForEditingTest() throws Exception {
+// url = "/portalApi/functionalMenuForEditing";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void getAppRolesTest() throws Exception {
+// url = "/portalApi/appRoles/455";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void regenerateAncestorTableTest() throws Exception {
+//
+// EPUser user = mockUser.mockEPUser();
+//
+// MockHttpServletRequestBuilder requestBuilder = MockMvcRequestBuilders
+// .get("/portalApi/regenerateFunctionalMenuAncestors");
+// requestBuilder.sessionAttr(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);
+// ResultActions ra = getMockMvc().perform(requestBuilder);
+// assertEquals("application/json;charset=UTF-8", ra.andReturn().getResponse().getContentType());
+// Assert.assertEquals(200, ra.andReturn().getResponse().getStatus());
+//
+// }
+//
+// @Test
+// public void getAppListTest() throws Exception {
+// url = "/portalApi/getAppList";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void getFavoritesForUserTest() throws Exception {
+// url = "/portalApi/getFavoriteItems";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void getManifestTest() throws Exception {
+// url = "/portalApi/manifest";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void getActiveUsersTest() throws Exception {
+// url = "/portalApi/dashboard/activeUsers";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void searchPortalTest() throws Exception {
+// EPUser user = mockUser.mockEPUser();
+// MockHttpServletRequestBuilder requestBuilder = MockMvcRequestBuilders.get("/portalApi/dashboard/search")
+// .param("searchString", "guest");
+// requestBuilder.sessionAttr(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);
+// ResultActions ra = getMockMvc().perform(requestBuilder);
+// assertData(ra);
+// }
+//
+// @Test
+// public void getWidgetDataTest() throws Exception {
+// EPUser user = mockUser.mockEPUser();
+// MockHttpServletRequestBuilder requestBuilder = MockMvcRequestBuilders.get("/portalApi/dashboard/widgetData")
+// .param("resourceType", "guest");
+// requestBuilder.sessionAttr(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);
+// ResultActions ra = getMockMvc().perform(requestBuilder);
+// assertData(ra);
+// }
+//
+// @Test
+// public void getAppsAndContactsTest() throws Exception {
+// url = "/portalApi/contactus/allapps";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void getPortalDetailsTest() throws Exception {
+// url = "/portalApi/contactus/feedback";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void getAppCategoryFunctionsTest() throws Exception {
+// url = "/portalApi/contactus/functions";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void getOnlineUserUpdateRateTest() throws Exception {
+// url = "/portalApi/dashboard/onlineUserUpdateRate";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void getMenuIdRoleIdTest() throws Exception {
+// url = "/portalApi/getFunctionalMenuRole";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void getNotificationsTest() throws Exception {
+// url = "/portalApi/getNotifications";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void getAdminNotificationsTest() throws Exception {
+// url = "/portalApi/getAdminNotifications";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void getNotificationAppRolesTest() throws Exception {
+// url = "/portalApi/getNotificationAppRoles";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void getNotificationUpdateRateTest() throws Exception {
+// url = "/portalApi/notificationUpdateRate";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void notificationReadTest() throws Exception {
+// url = "/portalApi/notificationRead?notificationId=262";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void testGetRolesTest() throws Exception {
+// url = "/portalApi/notificationRole/248/roles";
+// requestBuilder(url);
+// }
+//
+// @Test
+// public void putAppsWithAdminRoleStateForUserTest() throws Exception {
+//
+// AppsListWithAdminRole appsListWithAdminRole = new AppsListWithAdminRole();
+// appsListWithAdminRole.setOrgUserId("guest");
+// ArrayList<AppNameIdIsAdmin> appsRoles = new ArrayList<AppNameIdIsAdmin>();
+// AppNameIdIsAdmin appNameIdIsAdmin = new AppNameIdIsAdmin();
+// appNameIdIsAdmin.setId((long) 455);
+// appNameIdIsAdmin.setAppName("CCD");
+// appNameIdIsAdmin.setIsAdmin(true);
+// appNameIdIsAdmin.setRestrictedApp(false);
+// appsRoles.add(appNameIdIsAdmin);
+// appsListWithAdminRole.setAppsRoles(appsRoles);
+// EPUser user = mockUser.mockEPUser();
+// MockHttpServletRequestBuilder requestBuilder = MockMvcRequestBuilders.put("/portalApi/adminAppsRoles")
+// .contentType(APPLICATION_JSON_UTF8).content(convertObjectToJsonBytes(appsListWithAdminRole));
+//
+// requestBuilder.sessionAttr(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);
+// ResultActions ra = getMockMvc().perform(requestBuilder);
+// assertData(ra);
+// }
+//
+// @Test
+// public void ticketEventControllerForExternalSystem() throws Exception {
+// String ticketEventJson = "{\"application\": \"cbus\",\"event\": {\"body\": {\"ticketStatePhrase\": \"We recently detected a problem with the equipment at your site. The event is in queue for immediate work.\", \"ivrNotificationFlag\": \"1\",\"expectedRestoreDate\": 0,\"bridgeTransport\": \"AOTS\", \"reptRequestType\": 0,\"ticketNum\": \"000002000857405\",\"assetID\": \"CISCO_1921C1_ISR_G2\", \"eventDate\": 1490545134601,\"eventAbstract\": \"ospfIfConfigError trap received from Cisco_1921c1_ISR_G2 with arguments: ospfRouterId=Cisco_1921c1_ISR_G2; ospfIfIpAddress=1921c1_288266; ospfAddressLessIf=0; ospfPacketSrc=172.17.0.11; ospfConfigErrorType=2; ospfPacketType=1\",\"severity\": \"2 - Major\",\"ticketPriority\": \"3\",\"reportedCustomerImpact\": 0,\"testAutoIndicator\": 0,\"supportGroupName\": \"US-TEST-ORT\",\"lastModifiedDate\": \"1487687703\",\"messageGroup\": \"SNMP\",\"csi\": 0,\"mfabRestoredTime\": 0},\"header\": {\"timestamp\": \"2017-02-21T14:35:05.219+0000\",\"eventSource\": \"aotstm\",\"entityId\": \"000002000857405\", \"sequenceNumber\": 2 },\"blinkMsgId\": \"f38c071e-1a47-4b55-9e72-1db830100a61\",\"sourceIP\": \"130.4.165.158\"},\"SubscriberInfo\": {\"UserList\": [\"hk8777\"] }}";
+// MockHttpServletRequestBuilder requestBuilder = MockMvcRequestBuilders.post("/auxapi/ticketevent")
+// .contentType(APPLICATION_JSON_UTF8).content(ticketEventJson);
+// ResultActions ra = getMockMvc().perform(requestBuilder);
+// assertTrue(ra.andReturn().getResponse().getContentType().contains("application/json"));
+// }
+//}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/AdminUserAppTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/AdminUserAppTest.java
new file mode 100644
index 00000000..8e56a770
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/AdminUserAppTest.java
@@ -0,0 +1,36 @@
+package org.openecomp.portalapp.portal.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.AdminUserApp;
+
+public class AdminUserAppTest {
+
+ public AdminUserApp mockAdminUserApp(){
+
+ AdminUserApp adminUserApp = new AdminUserApp();
+
+ adminUserApp.setUserId((long)1);
+ adminUserApp.setFirstName("test");
+ adminUserApp.setLastName("test");
+ adminUserApp.setOrgUserId("test");
+ adminUserApp.setAppId((long)1);
+ adminUserApp.setAppName("test");
+
+ return adminUserApp;
+ }
+
+ @Test
+ public void adminUserAppTest(){
+ AdminUserApp adminUserApp = mockAdminUserApp();
+
+ assertEquals(adminUserApp.getUser_Id(), new Long(1));
+ assertEquals(adminUserApp.getFirstName(), "test");
+ assertEquals(adminUserApp.getLastName(), "test");
+ assertEquals(adminUserApp.getOrgUserId(), "test");
+ assertEquals(adminUserApp.getAppName(), "test");
+ assertEquals(adminUserApp.getAppId(), new Long(1));
+
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/AdminUserApplicationsTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/AdminUserApplicationsTest.java
new file mode 100644
index 00000000..2c3c9303
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/AdminUserApplicationsTest.java
@@ -0,0 +1,57 @@
+package org.openecomp.portalapp.portal.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import javax.persistence.Column;
+import javax.persistence.Id;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.AdminUserApp;
+import org.openecomp.portalapp.portal.domain.AdminUserApplications;
+
+public class AdminUserApplicationsTest {
+
+ public AdminUserApplications mockAdminUserApplications(){
+
+ AdminUserApp adminUserApp = new AdminUserApp();
+
+ adminUserApp.setUserId((long)1);
+ adminUserApp.setFirstName("test");
+ adminUserApp.setLastName("test");
+ adminUserApp.setOrgUserId("test");
+ adminUserApp.setAppId((long)1);
+ adminUserApp.setAppName("test");
+
+ AdminUserApplications adminUserApplications = new AdminUserApplications(adminUserApp);
+
+ adminUserApplications.setUser_Id((long)1);
+ adminUserApplications.setFirstName("test");
+ adminUserApplications.setLastName("test");
+ adminUserApplications.setOrgUserId("test");
+ return adminUserApplications;
+ }
+
+ @Test
+ public void adminUserAppTest(){
+ AdminUserApplications adminUserApplications = mockAdminUserApplications();
+ AdminUserApp adminUserApp = new AdminUserApp();
+
+ adminUserApp.setUserId((long)1);
+ adminUserApp.setFirstName("test");
+ adminUserApp.setLastName("test");
+ adminUserApp.setOrgUserId("test");
+ adminUserApp.setAppId((long)1);
+ adminUserApp.setAppName("test");
+ AdminUserApplications adminUserApplications1 = new AdminUserApplications(adminUserApp);
+
+ assertEquals(adminUserApplications.getUser_Id(), new Long(1));
+ assertEquals(adminUserApplications.getFirstName(), "test");
+ assertEquals(adminUserApplications.getLastName(), "test");
+ assertEquals(adminUserApplications.getOrgUserId(), "test");
+
+
+ assertEquals(adminUserApplications1.getApps().get(0).getAppId(),adminUserApp.getAppId());
+ assertEquals(adminUserApplications1.getApps().get(0).getAppName(),adminUserApp.getAppName());
+
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/AppContactUsTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/AppContactUsTest.java
new file mode 100644
index 00000000..474434d1
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/AppContactUsTest.java
@@ -0,0 +1,32 @@
+package org.openecomp.portalapp.portal.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.AppContactUs;
+
+public class AppContactUsTest {
+
+ public AppContactUs mockAppContactUs(){
+ AppContactUs appContactUs = new AppContactUs();
+ appContactUs.setDescription("test");
+ appContactUs.setContactEmail("test");
+ appContactUs.setContactName("test");
+ appContactUs.setUrl("test");
+ appContactUs.setActiveYN("test");
+
+ return appContactUs;
+ }
+
+ @Test
+ public void mockAppContactUsTest(){
+ AppContactUs appContactUs = mockAppContactUs();
+
+ assertEquals(appContactUs.getDescription(), "test");
+ assertEquals(appContactUs.getContactEmail(), "test");
+ assertEquals(appContactUs.getContactName(), "test");
+ assertEquals(appContactUs.getUrl(), "test");
+ assertEquals(appContactUs.getActiveYN(), "test");
+
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/CentralRoleFunctionTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/CentralRoleFunctionTest.java
new file mode 100644
index 00000000..4c05160d
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/CentralRoleFunctionTest.java
@@ -0,0 +1,31 @@
+package org.openecomp.portalapp.portal.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.CentralRoleFunction;
+
+public class CentralRoleFunctionTest {
+
+ public CentralRoleFunction mockCentralRoleFunction(){
+
+ CentralRoleFunction centralRoleFunction = new CentralRoleFunction();
+
+ centralRoleFunction.setCode("test");
+ centralRoleFunction.setName("test");
+ centralRoleFunction.setAppId((long)1);
+ centralRoleFunction.setEditUrl("test");
+
+ return centralRoleFunction;
+ }
+
+ @Test
+ public void centralRoleFunctionTest(){
+ CentralRoleFunction centralRoleFunction = mockCentralRoleFunction();
+
+ assertEquals(centralRoleFunction.getAppId(), new Long(1));
+ assertEquals(centralRoleFunction.getCode(), "test");
+ assertEquals(centralRoleFunction.getName(), "test");
+ assertEquals(centralRoleFunction.getEditUrl(), "test");
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPAppRoleFunctionTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPAppRoleFunctionTest.java
new file mode 100644
index 00000000..864b6aa6
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPAppRoleFunctionTest.java
@@ -0,0 +1,27 @@
+package org.openecomp.portalapp.portal.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.EPAppRoleFunction;
+
+public class EPAppRoleFunctionTest {
+
+ public EPAppRoleFunction mockEPAppRoleFunction(){
+ EPAppRoleFunction epAppRoleFunction = new EPAppRoleFunction();
+ epAppRoleFunction.setRoleId((long)1);
+ epAppRoleFunction.setAppId((long)1);
+ epAppRoleFunction.setCode("test");
+
+ return epAppRoleFunction;
+ }
+
+ @Test
+ public void epAppRoleFunctionTest(){
+ EPAppRoleFunction epAppRoleFunction = mockEPAppRoleFunction();
+
+ assertEquals(epAppRoleFunction.getRoleId(), new Long(1));
+ assertEquals(epAppRoleFunction.getAppId(), new Long(1));
+ assertEquals(epAppRoleFunction.getCode(), "test");
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPAppTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPAppTest.java
new file mode 100644
index 00000000..eb92b889
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPAppTest.java
@@ -0,0 +1,61 @@
+package org.openecomp.portalapp.portal.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.EPApp;
+
+public class EPAppTest {
+
+ public EPApp mockEPApp(){
+ EPApp epApp = new EPApp();
+
+ epApp.setName("test");
+ epApp.setImageUrl("test");
+ epApp.setDescription("test");
+ epApp.setNotes("test");
+ epApp.setUrl("test");
+ epApp.setAlternateUrl("test");
+ epApp.setAppRestEndpoint("test");
+ epApp.setMlAppName("test");
+ epApp.setMlAppAdminId("test");
+ epApp.setMotsId((long)1);
+ epApp.setUsername("test");
+ epApp.setAppPassword("test");
+ epApp.setOpen(false);
+ epApp.setEnabled(false);
+ epApp.setUebTopicName("test");
+ epApp.setUebSecret("test");
+ epApp.setAppType(1);
+ epApp.setCentralAuth(false);
+ epApp.setNameSpace("test");
+
+ return epApp;
+ }
+
+ @Test
+ public void epAppTest(){
+ EPApp epApp = mockEPApp();
+
+ assertEquals(epApp.getName(), "test");
+ assertEquals(epApp.getImageUrl(), "test");
+ assertEquals(epApp.getDescription(), "test");
+ assertEquals(epApp.getNotes(), "test");
+ assertEquals(epApp.getUrl(), "test");
+ assertEquals(epApp.getAlternateUrl(), "test");
+ assertEquals(epApp.getAppRestEndpoint(), "test");
+ assertEquals(epApp.getMlAppName(), "test");
+ assertEquals(epApp.getMlAppAdminId(), "test");
+ assertEquals(epApp.getMotsId(), new Long(1));
+ assertEquals(epApp.getUsername(), "test");
+ assertEquals(epApp.getAppPassword(), "test");
+ assertEquals(epApp.getOpen(), false);
+ assertEquals(epApp.getEnabled(), false);
+ assertEquals(epApp.getUebTopicName(), "test");
+ assertEquals(epApp.getUebSecret(), "test");
+ assertEquals(epApp.getAppType(), Integer.valueOf(1));
+ assertEquals(epApp.getCentralAuth(), false);
+ assertEquals(epApp.getNameSpace(), "test");
+
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPEndpointAccountTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPEndpointAccountTest.java
new file mode 100644
index 00000000..c19ecf8b
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPEndpointAccountTest.java
@@ -0,0 +1,29 @@
+package org.openecomp.portalapp.portal.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.EPEndpointAccount;
+
+public class EPEndpointAccountTest {
+
+ public EPEndpointAccount mockEPEndpointAccount(){
+ EPEndpointAccount epEndpointAccount = new EPEndpointAccount();
+
+ epEndpointAccount.setEp_id((long)1);
+ epEndpointAccount.setAccount_id((long)1);
+ epEndpointAccount.setId((long)1);
+
+ return epEndpointAccount;
+ }
+
+ @Test
+ public void epEndpointAccount(){
+ EPEndpointAccount epEndpointAccount = mockEPEndpointAccount();
+ assertEquals(epEndpointAccount.getEp_id(), new Long(1));
+ assertEquals(epEndpointAccount.getAccount_id(), new Long(1));
+ assertEquals(epEndpointAccount.getId(), new Long(1));
+
+ assertEquals(epEndpointAccount.toString(), "EPEndpointAccount [id=1, ep_id=1, account_id=1]");
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPEndpointTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPEndpointTest.java
new file mode 100644
index 00000000..45184de4
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPEndpointTest.java
@@ -0,0 +1,27 @@
+package org.openecomp.portalapp.portal.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.EPEndpoint;
+
+public class EPEndpointTest {
+
+ public EPEndpoint mockEPEndpoint(){
+ EPEndpoint epEndpoint = new EPEndpoint();
+
+ epEndpoint.setId((long)1);
+ epEndpoint.setName("test");
+
+ return epEndpoint;
+ }
+
+ @Test
+ public void epEndpointTest(){
+ EPEndpoint epEndpoint = mockEPEndpoint();
+
+ assertEquals(epEndpoint.getId(), new Long(1));
+ assertEquals(epEndpoint.getName(), "test");
+ assertEquals("EPEndpoint [id=1, name=test]", epEndpoint.toString());
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPRoleTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPRoleTest.java
new file mode 100644
index 00000000..830eaa5b
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPRoleTest.java
@@ -0,0 +1,36 @@
+package org.openecomp.portalapp.portal.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.EPRole;
+
+public class EPRoleTest {
+
+ public EPRole mockEPRole(){
+ EPRole epRole = new EPRole();
+
+ epRole.setName("test");
+ epRole.setActive(false);
+ epRole.setPriority(1);
+ epRole.setAppId((long)1);
+ epRole.setAppRoleId((long)1);
+
+ return epRole;
+ }
+
+ @Test
+ public void epRoleTest(){
+ EPRole epRole = mockEPRole();
+
+ assertEquals(epRole.getName(), "test");
+ assertEquals(epRole.getActive(), false);
+ assertEquals(epRole.getPriority().toString(),"1");
+ assertEquals(epRole.getAppId(), new Long(1));
+ assertEquals(epRole.getAppRoleId(), new Long(1));
+
+ assertEquals(epRole.toString(), "[Id = null, name = test]");
+
+
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserAppCatalogRolesTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserAppCatalogRolesTest.java
new file mode 100644
index 00000000..40bb16c1
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserAppCatalogRolesTest.java
@@ -0,0 +1,32 @@
+package org.openecomp.portalapp.portal.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.EPUserAppCatalogRoles;
+
+public class EPUserAppCatalogRolesTest {
+
+ public EPUserAppCatalogRoles mockEPUserAppCatalogRoles(){
+ EPUserAppCatalogRoles epUserAppCatalogRoles = new EPUserAppCatalogRoles();
+
+ epUserAppCatalogRoles.setRequestedRoleId((long)1);
+ epUserAppCatalogRoles.setRolename("test");
+ epUserAppCatalogRoles.setRequestStatus("status");
+ epUserAppCatalogRoles.setAppId((long)1);
+
+ return epUserAppCatalogRoles;
+ }
+
+ @Test
+ public void epUserAppCatalogRolesTest(){
+ EPUserAppCatalogRoles epUserAppCatalogRoles = mockEPUserAppCatalogRoles();
+
+ assertEquals(epUserAppCatalogRoles.getRequestedRoleId(), new Long(1));
+ assertEquals(epUserAppCatalogRoles.getRolename(), "test");
+ assertEquals(epUserAppCatalogRoles.getRequestStatus(), "status");
+ assertEquals(epUserAppCatalogRoles.getAppId(), new Long(1));
+
+ assertEquals("EPUserAppCatalogRoles [requestedRoleId=1, rolename=test, requestStatus=status, appId=1]", epUserAppCatalogRoles.toString());
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserAppRolesRequestDetailTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserAppRolesRequestDetailTest.java
new file mode 100644
index 00000000..fec58dbf
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserAppRolesRequestDetailTest.java
@@ -0,0 +1,54 @@
+package org.openecomp.portalapp.portal.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.Date;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.EPUserAppRolesRequest;
+import org.openecomp.portalapp.portal.domain.EPUserAppRolesRequestDetail;
+
+public class EPUserAppRolesRequestDetailTest {
+
+ public EPUserAppRolesRequestDetail mockEPUserAppRolesRequestDetail(){
+
+ EPUserAppRolesRequest epUserAppRolesRequest = new EPUserAppRolesRequest();
+ epUserAppRolesRequest.setUserId((long)1);
+ epUserAppRolesRequest.setAppId((long)1);
+ epUserAppRolesRequest.setCreated(new Date());
+ epUserAppRolesRequest.setUpdatedDate(new Date());
+ epUserAppRolesRequest.setRequestStatus("test");
+
+ EPUserAppRolesRequestDetail epUserAppRolesRequestDetail = new EPUserAppRolesRequestDetail();
+ epUserAppRolesRequestDetail.setReqRoleId((long)1);
+ epUserAppRolesRequestDetail.setReqType("test");
+ epUserAppRolesRequestDetail.setEpRequestIdData(epUserAppRolesRequest);
+
+ return epUserAppRolesRequestDetail;
+ }
+
+ @Test
+ public void epUserAppRolesRequestDetailTest(){
+
+ EPUserAppRolesRequest epUserAppRolesRequest = new EPUserAppRolesRequest();
+ epUserAppRolesRequest.setUserId((long)1);
+ epUserAppRolesRequest.setAppId((long)1);
+ epUserAppRolesRequest.setCreated(new Date());
+ epUserAppRolesRequest.setUpdatedDate(new Date());
+ epUserAppRolesRequest.setRequestStatus("test");
+
+ EPUserAppRolesRequestDetail epUserAppRolesRequestDetail = mockEPUserAppRolesRequestDetail();
+
+ EPUserAppRolesRequestDetail epUserAppRolesRequestDetail1 = new EPUserAppRolesRequestDetail();
+ epUserAppRolesRequestDetail1.setReqRoleId((long)1);
+ epUserAppRolesRequestDetail1.setReqType("test");
+ epUserAppRolesRequestDetail1.setEpRequestIdData(epUserAppRolesRequest);
+
+ assertEquals(epUserAppRolesRequestDetail.getReqRoleId(), new Long(1));
+ assertEquals(epUserAppRolesRequestDetail.getReqType(), "test");
+ assertEquals(epUserAppRolesRequestDetail.getEpRequestIdData(), epUserAppRolesRequest);
+// assertEquals(epUserAppRolesRequestDetail.hashCode(), epUserAppRolesRequestDetail1.hashCode());
+
+ }
+
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserAppRolesTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserAppRolesTest.java
new file mode 100644
index 00000000..b13ae14a
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserAppRolesTest.java
@@ -0,0 +1,28 @@
+package org.openecomp.portalapp.portal.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.EPUserAppRoles;
+
+public class EPUserAppRolesTest {
+
+ public EPUserAppRoles mockEPUserAppRoles(){
+ EPUserAppRoles epUserAppRoles = new EPUserAppRoles();
+
+ epUserAppRoles.setRoleId((long)1);
+ epUserAppRoles.setAppId((long)1);
+
+ return epUserAppRoles;
+ }
+
+ @Test
+ public void epUserAppRolesTest(){
+ EPUserAppRoles epUserAppRoles = mockEPUserAppRoles();
+
+ assertEquals(epUserAppRoles.getRoleId(), new Long(1));
+ assertEquals(epUserAppRoles.getAppId(), new Long(1));
+ assertEquals("EpUserAppRoles [roleId=1, appId=1]", epUserAppRoles.toString());
+ }
+}
+
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserAppTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserAppTest.java
new file mode 100644
index 00000000..0de0b590
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserAppTest.java
@@ -0,0 +1,85 @@
+package org.openecomp.portalapp.portal.domain;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.EPApp;
+import org.openecomp.portalapp.portal.domain.EPRole;
+import org.openecomp.portalapp.portal.domain.EPUserApp;
+
+public class EPUserAppTest {
+
+ public EPUserApp mockEPUserApp(){
+
+ EPApp epApp = new EPApp();
+ epApp.setName("test");
+ epApp.setImageUrl("test");
+ epApp.setDescription("test");
+ epApp.setNotes("test");
+ epApp.setUrl("test");
+ epApp.setAlternateUrl("test");
+ epApp.setAppRestEndpoint("test");
+ epApp.setMlAppName("test");
+ epApp.setMlAppAdminId("test");
+ epApp.setMotsId((long)1);
+ epApp.setUsername("test");
+ epApp.setAppPassword("test");
+
+
+ //Role
+ EPRole epRole = new EPRole();
+ epRole.setName("test");
+ epRole.setActive(false);
+ epRole.setPriority(1);
+ epRole.setAppId((long)1);
+ epRole.setAppRoleId((long)1);
+
+ EPUserApp user = new EPUserApp();
+ user.setUserId((long)1);
+ user.setApp(epApp);
+ user.setRole(epRole);
+ user.setPriority((short)32767);
+
+
+ return user;
+ }
+
+ @Test
+ public void userTest(){
+ EPUserApp user = mockEPUserApp();
+
+ EPApp epApp = new EPApp();
+ epApp.setName("test");
+ epApp.setImageUrl("test");
+ epApp.setDescription("test");
+ epApp.setNotes("test");
+ epApp.setUrl("test");
+ epApp.setAlternateUrl("test");
+ epApp.setAppRestEndpoint("test");
+ epApp.setMlAppName("test");
+ epApp.setMlAppAdminId("test");
+ epApp.setMotsId((long)1);
+ epApp.setUsername("test");
+ epApp.setAppPassword("test");
+ user.setApp(epApp);
+
+ //Role
+ EPRole epRole = new EPRole();
+ epRole.setName("test");
+ epRole.setActive(false);
+ epRole.setPriority(1);
+ epRole.setAppId((long)1);
+ epRole.setAppRoleId((long)1);
+
+
+ assertEquals(user.getUserId(),Long.valueOf(1));
+ assertEquals(user.getApp(), epApp);
+ assertEquals(user.getPriority().getClass(), Short.class);
+
+ assertEquals(user.toString(), "[u: 1; a: null, r: null; appRoleId: 1]");
+
+ assertEquals(user.hashCode(), user.hashCode());
+
+
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserAppsManualSortPreferenceTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserAppsManualSortPreferenceTest.java
new file mode 100644
index 00000000..0f4bb62e
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserAppsManualSortPreferenceTest.java
@@ -0,0 +1,29 @@
+package org.openecomp.portalapp.portal.domain;
+
+import static org.junit.Assert.assertEquals;
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.EPUserAppsManualSortPreference;
+
+public class EPUserAppsManualSortPreferenceTest {
+
+ public EPUserAppsManualSortPreference mockEPUserAppsManualSortPreference(){
+
+ EPUserAppsManualSortPreference epUserAppsManualSortPreference = new EPUserAppsManualSortPreference();
+ epUserAppsManualSortPreference.setUserId(1);
+ epUserAppsManualSortPreference.setAppId((long)1);
+ epUserAppsManualSortPreference.setAppManualSortOrder(1);
+
+ return epUserAppsManualSortPreference;
+ }
+
+ @Test
+ public void epUserAppsManualSortPreferenceTest(){
+
+ EPUserAppsManualSortPreference epUserAppsManualSortPreference = mockEPUserAppsManualSortPreference();
+
+ assertEquals(epUserAppsManualSortPreference.getUserId(), 1);
+ assertEquals(epUserAppsManualSortPreference.getAppId(), new Long(1));
+ assertEquals(epUserAppsManualSortPreference.getAppManualSortOrder(), 1);
+
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserAppsSortPreferenceTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserAppsSortPreferenceTest.java
new file mode 100644
index 00000000..4f70ea78
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserAppsSortPreferenceTest.java
@@ -0,0 +1,43 @@
+package org.openecomp.portalapp.portal.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.Date;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.EPUserAppsSortPreference;
+
+public class EPUserAppsSortPreferenceTest {
+
+ public EPUserAppsSortPreference mockEPUserAppsSortPreferenceTest(){
+
+ EPUserAppsSortPreference epUserAppsSortPreference = new EPUserAppsSortPreference();
+ epUserAppsSortPreference.setUserId(1);
+ epUserAppsSortPreference.setSortPref("test");
+ epUserAppsSortPreference.setId((long)1);
+ epUserAppsSortPreference.setCreated(new Date());
+ epUserAppsSortPreference.setModified(new Date());
+ epUserAppsSortPreference.setModifiedId((long)1);
+ epUserAppsSortPreference.setRowNum((long)1);
+ epUserAppsSortPreference.setAuditTrail(null);
+
+ return epUserAppsSortPreference;
+ }
+
+ @Test
+ public void epUserAppsSortPreferenceTest() {
+ EPUserAppsSortPreference epUserAppsSortPreference = mockEPUserAppsSortPreferenceTest();
+
+ assertEquals(epUserAppsSortPreference.getUserId(), 1);
+ assertEquals(epUserAppsSortPreference.getSortPref(), "test");
+ assertEquals(epUserAppsSortPreference.getId(), new Long(1));
+// assertEquals(epUserAppsSortPreference.getCreated(), new Date());
+// assertEquals(epUserAppsSortPreference.getModified(), new Date());
+ assertEquals(epUserAppsSortPreference.getModifiedId(), new Long(1));
+ assertEquals(epUserAppsSortPreference.getRowNum(), new Long(1));
+ assertEquals(epUserAppsSortPreference.getAuditTrail(), null);
+
+
+ }
+
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserNotificationTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserNotificationTest.java
new file mode 100644
index 00000000..e896d081
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserNotificationTest.java
@@ -0,0 +1,34 @@
+package org.openecomp.portalapp.portal.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.Date;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.EPUserNotification;
+
+public class EPUserNotificationTest {
+
+ public EPUserNotification mockEPUserNotification(){
+
+ EPUserNotification epUserNotification = new EPUserNotification();
+
+ epUserNotification.setUserId((long)1);
+ epUserNotification.setNotificationId((long)1);
+ epUserNotification.setViewed("test");
+ epUserNotification.setUpdateTime(new Date());
+
+ return epUserNotification;
+ }
+
+ @Test
+ public void epUserNotificationTest(){
+ EPUserNotification epUserNotification = mockEPUserNotification();
+
+ assertEquals(epUserNotification.getUserId(), new Long(1));
+ assertEquals(epUserNotification.getNotificationId(), new Long(1));
+ assertEquals(epUserNotification.getViewed(), "test");
+ // assertEquals(epUserNotification.getUpdateTime(), new Date());
+
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserTest.java
new file mode 100644
index 00000000..98065a2b
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPUserTest.java
@@ -0,0 +1,114 @@
+package org.openecomp.portalapp.portal.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.Date;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.EPUser;
+
+public class EPUserTest {
+
+ public EPUser mockEPUser(){
+
+ EPUser epUser = new EPUser();
+
+ epUser.setId((long)1);
+ epUser.setManagerId((long) 1234);
+ epUser.setFirstName("test");
+ epUser.setLastName("test");
+ epUser.setMiddleInitial("test");
+ epUser.setPhone("test");
+ epUser.setFax("test");
+ epUser.setCellular("test");
+ epUser.setEmail("test");
+ epUser.setAddressId((long) 123);
+ epUser.setAlertMethodCd("test");
+ epUser.setHrid("test");
+ epUser.setOrgUserId("test");
+ epUser.setOrgCode("test");
+ epUser.setAddress1("test");
+ epUser.setAddress2("test");
+ epUser.setCity("test");
+ epUser.setState("test");
+ epUser.setZipCode("test");
+ epUser.setCountry("test");
+ epUser.setOrgManagerUserId("test");
+ epUser.setLocationClli("test");
+ epUser.setBusinessCountryCode("test");
+ epUser.setBusinessCountryName("test");
+ epUser.setBusinessUnit("test");
+ epUser.setBusinessUnitName("test");
+ epUser.setDepartment("test");
+ epUser.setDepartmentName("test");
+ epUser.setCompanyCode("test");
+ epUser.setCompany("test");
+ epUser.setZipCodeSuffix("test");
+ epUser.setJobTitle("test");
+ epUser.setCommandChain("test");
+ epUser.setSiloStatus("test");
+ epUser.setCostCenter("test");
+ epUser.setFinancialLocCode("test");
+ epUser.setLoginId("test");
+ epUser.setLoginPwd("test");
+ epUser.setLastLoginDate(new Date());
+ epUser.setActive(false);
+ epUser.setInternal(false);
+ epUser.setSelectedProfileId((long) 12345);
+ epUser.setTimeZoneId((long) 12345);
+ epUser.setOnline(false);
+ epUser.setChatId("test");
+ return epUser;
+
+ }
+
+ @Test
+ public void userTest(){
+ EPUser user = mockEPUser();
+
+ assertEquals(user.getId(), new Long(1));
+ assertEquals(user.getManagerId(), new Long(1234));
+ assertEquals(user.getFirstName(), "test");
+ assertEquals(user.getLastName(), "test");
+ assertEquals(user.getMiddleInitial(), "test");
+ assertEquals(user.getPhone(), "test");
+ assertEquals(user.getFax(), "test");
+ assertEquals(user.getCellular(), "test");
+ assertEquals(user.getEmail(), "test");
+ assertEquals(user.getAddressId(), new Long(123) );
+ assertEquals(user.getAlertMethodCd(), "test");
+ assertEquals(user.getHrid(), "test");
+ assertEquals(user.getOrgUserId(), "test");
+ assertEquals(user.getOrgCode(), "test");
+ assertEquals(user.getAddress1(), "test");
+ assertEquals(user.getAddress2(), "test");
+ assertEquals(user.getState(), "test");
+ assertEquals(user.getZipCode(), "test");
+ assertEquals(user.getCountry(), "test");
+ assertEquals(user.getOrgManagerUserId(), "test");
+ assertEquals(user.getLocationClli(), "test");
+ assertEquals(user.getBusinessCountryCode(), "test");
+ assertEquals(user.getBusinessCountryName(), "test");
+ assertEquals(user.getBusinessUnit(), "test");
+ assertEquals(user.getBusinessUnitName(), "test");
+ assertEquals(user.getDepartment(), "test");
+ assertEquals(user.getDepartmentName(), "test");
+ assertEquals(user.getCompanyCode(), "test");
+ assertEquals(user.getCompany(), "test");
+ assertEquals(user.getZipCodeSuffix(), "test");
+ assertEquals(user.getJobTitle(), "test");
+ assertEquals(user.getCommandChain(), "test");
+ assertEquals(user.getSiloStatus(), "test");
+ assertEquals(user.getFinancialLocCode(), "test");
+ assertEquals(user.getLoginId(), "test");
+ assertEquals(user.getLoginPwd(), "test");
+ assertEquals(user.getActive(), false);
+ assertEquals(user.getInternal(), false);
+ assertEquals(user.getSelectedProfileId(), new Long (12345));
+ assertEquals(user.getTimeZoneId(), new Long (12345));
+ assertEquals(user.getChatId(), "test");
+
+ //assertEquals(user.toString(), "EPUser [orgId=null, managerId=1234, firstName=test, middleInitial=test, lastName=test, phone=test, fax=test, cellular=test, email=test, addressId=123, alertMethodCd=test, hrid=test, orgUserId=test, orgCode=test, address1=test, address2=test, city=test, state=test, zipCode=test, country=test, orgManagerUserId=test, locationClli=test, businessCountryCode=test, businessCountryName=test, businessUnit=test, businessUnitName=test, department=test, departmentName=test, companyCode=test, company=test, zipCodeSuffix=test, jobTitle=test, commandChain=test, siloStatus=test, costCenter=test, financialLocCode=test, loginId=test, loginPwd=test, lastLoginDate=Tue Sep 05 11:04:49 EDT 2017, active=false, internal=false, selectedProfileId=12345, timeZoneId=12345, online=false, chatId=test, isGuest=false, userApps=[], pseudoRoles=[]]");
+ }
+
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPWidgetsManualSortPreferenceTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPWidgetsManualSortPreferenceTest.java
new file mode 100644
index 00000000..fd7cb76f
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EPWidgetsManualSortPreferenceTest.java
@@ -0,0 +1,36 @@
+package org.openecomp.portalapp.portal.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.EPWidgetsManualSortPreference;
+
+public class EPWidgetsManualSortPreferenceTest {
+
+ public EPWidgetsManualSortPreference mockEPWidgetsManualSortPreference(){
+ EPWidgetsManualSortPreference epWidgetsManualSortPreference = new EPWidgetsManualSortPreference();
+
+ epWidgetsManualSortPreference.setUserId(1);
+ epWidgetsManualSortPreference.setWidgetId((long)1);
+ epWidgetsManualSortPreference.setWidgetRow(1);
+ epWidgetsManualSortPreference.setWidgetCol(1);
+ epWidgetsManualSortPreference.setWidgetWidth(1);
+ epWidgetsManualSortPreference.setWidgetHeight(1);
+
+ return epWidgetsManualSortPreference;
+ }
+
+ @Test
+ public void epWidgetsManualSortPreferenceTest(){
+ EPWidgetsManualSortPreference epWidgetsManualSortPreference = mockEPWidgetsManualSortPreference();
+
+ assertEquals(epWidgetsManualSortPreference.getWidgetId(), new Long(1));
+ assertEquals(epWidgetsManualSortPreference.getUserId(), 1);
+ assertEquals(epWidgetsManualSortPreference.getWidgetRow(), 1);
+ assertEquals(epWidgetsManualSortPreference.getWidgetCol(), 1);
+ assertEquals(epWidgetsManualSortPreference.getWidgetHeight(), 1);
+ assertEquals(epWidgetsManualSortPreference.getWidgetWidth(), 1);
+
+
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EcompAppRoleIdTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EcompAppRoleIdTest.java
new file mode 100644
index 00000000..bca8c491
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EcompAppRoleIdTest.java
@@ -0,0 +1,33 @@
+package org.openecomp.portalapp.portal.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.EcompAppRoleId;
+
+public class EcompAppRoleIdTest {
+
+ public EcompAppRoleId mockEcompAppRoleId(){
+
+ EcompAppRoleId ecompAppRoleId = new EcompAppRoleId();
+
+ ecompAppRoleId.setAppId((long)1);
+ ecompAppRoleId.setAppName("test");
+ ecompAppRoleId.setRoleId(1);
+ ecompAppRoleId.setRoleName("test");
+
+ return ecompAppRoleId;
+ }
+
+ @Test
+ public void ecompAppRoleIdTest(){
+
+ EcompAppRoleId ecompAppRoleId = mockEcompAppRoleId();
+
+ assertEquals(ecompAppRoleId.getAppId(), new Long(1));
+ assertEquals(ecompAppRoleId.getAppName(), "test");
+ assertEquals(ecompAppRoleId.getRoleId().toString(), "1");
+ assertEquals(ecompAppRoleId.getRoleName(), "test");
+ }
+
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EcompAppRoleTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EcompAppRoleTest.java
new file mode 100644
index 00000000..fc2c7b07
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/EcompAppRoleTest.java
@@ -0,0 +1,31 @@
+package org.openecomp.portalapp.portal.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.EcompAppRole;
+
+public class EcompAppRoleTest {
+
+ public EcompAppRole mockEcompAppRole(){
+ EcompAppRole ecompAppRole = new EcompAppRole();
+
+ ecompAppRole.setAppId((long)1);
+ ecompAppRole.setAppName("test");
+ ecompAppRole.setRoleId(1);
+ ecompAppRole.setRoleName("test");
+
+ return ecompAppRole;
+ }
+
+ @Test
+ public void ecompAppRoleTest(){
+ EcompAppRole ecompAppRole = mockEcompAppRole();
+
+ assertEquals(ecompAppRole.getAppId(), new Long(1));
+ assertEquals(ecompAppRole.getAppName(), "test");
+ assertEquals(ecompAppRole.getRoleId().toString(), "1");
+ assertEquals(ecompAppRole.getRoleName(), "test");
+
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/ExternalRoleDetailsTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/ExternalRoleDetailsTest.java
new file mode 100644
index 00000000..5d62d34e
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/ExternalRoleDetailsTest.java
@@ -0,0 +1,59 @@
+package org.openecomp.portalapp.portal.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.EPAppRoleFunction;
+import org.openecomp.portalapp.portal.domain.ExternalRoleDetails;
+
+public class ExternalRoleDetailsTest {
+
+ public ExternalRoleDetails mockExternalRoleDetails(){
+
+ List<EPAppRoleFunction> epAppRoleFunctionList = new ArrayList<EPAppRoleFunction>();
+
+ EPAppRoleFunction epAppRoleFunction = new EPAppRoleFunction();
+ epAppRoleFunction.setRoleId((long)1);
+ epAppRoleFunction.setAppId((long)1);
+ epAppRoleFunction.setCode("test");
+
+ epAppRoleFunctionList.add(epAppRoleFunction);
+
+ ExternalRoleDetails externalRoleDetails = new ExternalRoleDetails();
+
+ externalRoleDetails.setName("test");
+ externalRoleDetails.setActive(false);
+ externalRoleDetails.setPriority(1);
+ externalRoleDetails.setAppId((long)1);
+ externalRoleDetails.setAppRoleId((long)1);
+ externalRoleDetails.setPerms(epAppRoleFunctionList);
+
+ return externalRoleDetails;
+ }
+
+ @Test
+ public void externalRoleDetailsTest(){
+
+ List<EPAppRoleFunction> epAppRoleFunctionList = new ArrayList<EPAppRoleFunction>();
+
+ EPAppRoleFunction epAppRoleFunction = new EPAppRoleFunction();
+ epAppRoleFunction.setRoleId((long)1);
+ epAppRoleFunction.setAppId((long)1);
+ epAppRoleFunction.setCode("test");
+
+ epAppRoleFunctionList.add(epAppRoleFunction);
+
+ ExternalRoleDetails externalRoleDetails = mockExternalRoleDetails();
+
+ assertEquals(externalRoleDetails.getAppId(), new Long(1));
+ assertEquals(externalRoleDetails.getAppRoleId(), new Long(1));
+ assertEquals(externalRoleDetails.getPriority().toString(), "1");
+ assertEquals(externalRoleDetails.getName(), "test");
+ assertEquals(externalRoleDetails.getPriority().toString(), "1");
+ assertEquals(externalRoleDetails.getPerms().size(), epAppRoleFunctionList.size());
+
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/ExternalSystemAccessTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/ExternalSystemAccessTest.java
new file mode 100644
index 00000000..aea2c426
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/ExternalSystemAccessTest.java
@@ -0,0 +1,27 @@
+package org.openecomp.portalapp.portal.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.ExternalSystemAccess;
+
+public class ExternalSystemAccessTest {
+
+ public ExternalSystemAccess mockExternalSystemAccess(){
+ ExternalSystemAccess externalSystemAccess = new ExternalSystemAccess("test", false);
+
+ externalSystemAccess.setKey("test");
+ externalSystemAccess.setAccessValue(false);
+
+ return externalSystemAccess;
+ }
+
+ @Test
+ public void externalSystemAccessTest(){
+ ExternalSystemAccess externalSystemAccess = mockExternalSystemAccess();
+
+ assertEquals(externalSystemAccess.getKey(), "test");
+ assertEquals(externalSystemAccess.getAccessValue(), false);
+ }
+}
+
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/ExternalSystemRoleApprovalTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/ExternalSystemRoleApprovalTest.java
new file mode 100644
index 00000000..b014b66f
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/ExternalSystemRoleApprovalTest.java
@@ -0,0 +1,23 @@
+package org.openecomp.portalapp.portal.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.externalsystemapproval.model.ExternalSystemRoleApproval;
+
+public class ExternalSystemRoleApprovalTest {
+
+ public ExternalSystemRoleApproval mockExternalSystemRoleApproval(){
+ ExternalSystemRoleApproval externalSystemRoleApproval = new ExternalSystemRoleApproval();
+ externalSystemRoleApproval.setRoleName("test");
+
+ return externalSystemRoleApproval;
+ }
+
+ @Test
+ public void externalSystemRoleApprovalTest(){
+ ExternalSystemRoleApproval externalSystemRoleApproval = mockExternalSystemRoleApproval();
+
+ assertEquals(externalSystemRoleApproval.getRoleName(), "test");
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/FunctionalMenuItemWithAppIDTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/FunctionalMenuItemWithAppIDTest.java
new file mode 100644
index 00000000..0e5bf9c5
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/FunctionalMenuItemWithAppIDTest.java
@@ -0,0 +1,28 @@
+package org.openecomp.portalapp.portal.domain;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.FunctionalMenuItemWithAppID;
+
+public class FunctionalMenuItemWithAppIDTest {
+
+ public FunctionalMenuItemWithAppID mockFunctionalMenuItemWithAppID(){
+ FunctionalMenuItemWithAppID functionalMenuItemWithAppID = new FunctionalMenuItemWithAppID();
+
+ functionalMenuItemWithAppID.setRestrictedApp(false);
+ functionalMenuItemWithAppID.setUrl("test");
+
+
+ return functionalMenuItemWithAppID;
+ }
+
+ @Test
+ public void functionalMenuItemWithAppIDTest(){
+ FunctionalMenuItemWithAppID functionalMenuItemWithAppID = mockFunctionalMenuItemWithAppID();
+
+ assertEquals(functionalMenuItemWithAppID.toString(), "FunctionalMenuItem [menuId=null, column=null, text=null, parentMenuId=null, url=test, active_yn=null, appid=null, roles=null, restrictedApp=false]");
+
+ }
+
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/GetAccessResultIdTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/GetAccessResultIdTest.java
new file mode 100644
index 00000000..004d06b5
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/GetAccessResultIdTest.java
@@ -0,0 +1,29 @@
+package org.openecomp.portalapp.portal.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.GetAccessResultId;
+
+public class GetAccessResultIdTest {
+
+ public GetAccessResultId mockGetAccessResultId(){
+
+ GetAccessResultId getAccessResultIdObj = new GetAccessResultId();
+ getAccessResultIdObj.setEcompFunction("test");
+ getAccessResultIdObj.setAppName("test");
+ getAccessResultIdObj.setRoleName("test");
+
+ return getAccessResultIdObj;
+ }
+
+ @Test
+ public void getAccessResultIdObjTest(){
+ GetAccessResultId getAccessResultIdObj = mockGetAccessResultId();
+
+ assertEquals(getAccessResultIdObj.getEcompFunction(), "test");
+ assertEquals(getAccessResultIdObj.getAppName(), "test");
+ assertEquals(getAccessResultIdObj.getRoleName(), "test");
+
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/MicroserviceDataTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/MicroserviceDataTest.java
new file mode 100644
index 00000000..94014614
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/MicroserviceDataTest.java
@@ -0,0 +1,57 @@
+package org.openecomp.portalapp.portal.domain;
+
+import java.util.ArrayList;
+import java.util.List;
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.MicroserviceData;
+import org.openecomp.portalapp.portal.domain.MicroserviceParameter;
+
+public class MicroserviceDataTest {
+
+ public MicroserviceData mockMicroserviceData(){
+
+ MicroserviceData microserviceData= new MicroserviceData();
+
+ List<MicroserviceParameter> parameterList = new ArrayList<MicroserviceParameter>();
+
+ MicroserviceParameter microserviceParameter = new MicroserviceParameter();
+ microserviceParameter.setId((long)1);
+ microserviceParameter.setServiceId((long)1);
+ microserviceParameter.setPara_key("test");
+ microserviceParameter.setPara_value("test");
+ parameterList.add(microserviceParameter);
+
+ microserviceData.setId((long)1);
+ microserviceData.setName("test");
+ microserviceData.setActive("test");
+ microserviceData.setDesc("test");
+ microserviceData.setAppId((long)1);
+ microserviceData.setUrl("test");
+ microserviceData.setSecurityType("test");
+ microserviceData.setUsername("test");
+ microserviceData.setPassword("test");
+
+
+ return microserviceData;
+ }
+
+ @Test
+ public void microserviceDataTest(){
+ MicroserviceData microserviceData= mockMicroserviceData();
+
+ assertEquals(microserviceData.getId(), new Long(1));
+ assertEquals(microserviceData.getName(), "test");
+ assertEquals(microserviceData.getActive(), "test");
+ assertEquals(microserviceData.getDesc(), "test");
+ // assertEquals(microserviceData.getAppId(), new long(1));
+ assertEquals(microserviceData.getUrl(), "test");
+ assertEquals(microserviceData.getSecurityType(), "test");
+ assertEquals(microserviceData.getUsername(), "test");
+ assertEquals(microserviceData.getPassword(), "test");
+
+ assertEquals(microserviceData.toString(), "MicroserviceData [id=1, name=test, desc=test, appId=1, "
+ + "url=test, securityType=test, username=test, password=test, parameterList=null]");
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/MicroserviceParameterTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/MicroserviceParameterTest.java
new file mode 100644
index 00000000..bcd3ff36
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/MicroserviceParameterTest.java
@@ -0,0 +1,31 @@
+package org.openecomp.portalapp.portal.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.MicroserviceParameter;
+
+public class MicroserviceParameterTest {
+
+ public MicroserviceParameter mockMicroserviceParameter(){
+ MicroserviceParameter microserviceParameter = new MicroserviceParameter();
+
+ microserviceParameter.setId((long)1);
+ microserviceParameter.setServiceId((long)1);
+ microserviceParameter.setPara_key("test");
+ microserviceParameter.setPara_value("test");
+
+ return microserviceParameter;
+ }
+
+ @Test
+ public void microserviceParameterTest(){
+ MicroserviceParameter microserviceParameter = mockMicroserviceParameter();
+ assertEquals(microserviceParameter.getId(), new Long(1));
+ assertEquals(microserviceParameter.getServiceId(),(long)1);
+ assertEquals(microserviceParameter.getPara_key(), "test");
+ assertEquals(microserviceParameter.getPara_value(), "test");
+
+ assertEquals(microserviceParameter.toString(), "MicroserviceParameter [id=1, serviceId=1, para_key=test, para_value=test]");
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/PersUserAppSelectionTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/PersUserAppSelectionTest.java
new file mode 100644
index 00000000..3aff8cce
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/PersUserAppSelectionTest.java
@@ -0,0 +1,35 @@
+package org.openecomp.portalapp.portal.domain;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.PersUserAppSelection;
+
+public class PersUserAppSelectionTest {
+
+ public PersUserAppSelection mockPersUserAppSelection(){
+
+ PersUserAppSelection persUserAppSelection = new PersUserAppSelection();
+ persUserAppSelection.setUserId((long)1);
+ persUserAppSelection.setAppId((long)1);
+ persUserAppSelection.setStatusCode("test");
+
+ return persUserAppSelection;
+ }
+
+ @Test
+ public void persUserAppSelectionTest(){
+
+ PersUserAppSelection persUserAppSelection1 = new PersUserAppSelection((long)1, (long)1, (long)1,"test");
+
+ PersUserAppSelection persUserAppSelection = mockPersUserAppSelection();
+
+ assertEquals(persUserAppSelection.getUserId(), new Long(1));
+ assertEquals(persUserAppSelection.getAppId(), new Long(1));
+ assertEquals(persUserAppSelection.getStatusCode(), "test");
+ assertEquals(persUserAppSelection1.hashCode(), new PersUserAppSelection((long)1, (long)1, (long)1,"test").hashCode());
+ assertEquals(persUserAppSelection1, new PersUserAppSelection((long)1, (long)1, (long)1,"test"));
+ assertTrue(persUserAppSelection1.equals(new PersUserAppSelection((long)1, (long)1, (long)1,"test")));
+ }
+
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/PersUserWidgetSelectionTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/PersUserWidgetSelectionTest.java
new file mode 100644
index 00000000..da480134
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/PersUserWidgetSelectionTest.java
@@ -0,0 +1,36 @@
+package org.openecomp.portalapp.portal.domain;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.PersUserWidgetSelection;
+
+public class PersUserWidgetSelectionTest {
+
+ public PersUserWidgetSelection mockPersUserWidgetSelection(){
+
+ PersUserWidgetSelection persUserWidgetSelection = new PersUserWidgetSelection();
+
+ persUserWidgetSelection.setUserId((long)1);
+ persUserWidgetSelection.setWidgetId((long)1);
+ persUserWidgetSelection.setStatusCode("test");
+
+ return persUserWidgetSelection;
+ }
+
+ @Test
+ public void persUserWidgetSelectionTest(){
+ PersUserWidgetSelection persUserWidgetSelection = mockPersUserWidgetSelection();
+
+ PersUserWidgetSelection persUserWidgetSelection1 = new PersUserWidgetSelection((long)1, (long)1, (long)1, "test");
+
+ assertEquals(persUserWidgetSelection.getUserId(), new Long(1));
+ assertEquals(persUserWidgetSelection.getWidgetId(), new Long(1));
+ assertEquals(persUserWidgetSelection.getStatusCode(), "test");
+ assertEquals(persUserWidgetSelection1, new PersUserWidgetSelection((long)1, (long)1, (long)1, "test"));
+ assertTrue(persUserWidgetSelection1.equals(new PersUserWidgetSelection((long)1, (long)1, (long)1,"test")));
+ assertEquals(persUserWidgetSelection.hashCode(), persUserWidgetSelection1.hashCode());
+ }
+
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/ResultTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/ResultTest.java
new file mode 100644
index 00000000..19991b51
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/ResultTest.java
@@ -0,0 +1,29 @@
+package org.openecomp.portalapp.portal.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.model.Result;
+
+public class ResultTest {
+
+ public Result mockResult(){
+
+ Result result= new Result("test");
+
+ result.setResult("test");
+ return result;
+ }
+
+ @Test
+ public void resultTest(){
+
+ Result result = mockResult();
+ result.setResult("test");
+
+ assertEquals(result.getResult(), "test");
+
+ }
+
+
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/SharedContextTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/SharedContextTest.java
new file mode 100644
index 00000000..8e2ff420
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/SharedContextTest.java
@@ -0,0 +1,36 @@
+package org.openecomp.portalapp.portal.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.Date;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.SharedContext;
+
+public class SharedContextTest {
+
+ public SharedContext mockSharedContext(){
+
+ SharedContext sharedContext = new SharedContext();
+ sharedContext.setId((long)1);
+ sharedContext.setCreate_time(new Date());
+ sharedContext.setContext_id("test");
+ sharedContext.setCkey("test");
+ sharedContext.setCvalue("test");
+
+ return sharedContext;
+ }
+
+ @Test
+ public void sharedContextTest(){
+ SharedContext sharedContext = mockSharedContext();
+
+ assertEquals(sharedContext.getId(), new Long(1));
+ // assertEquals(sharedContext.getCreate_time(), new Date());
+ assertEquals(sharedContext.getContext_id(), "test");
+ assertEquals(sharedContext.getCkey(), "test");
+ assertEquals(sharedContext.getCvalue(), "test");
+
+
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/UserIdRoleIdTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/UserIdRoleIdTest.java
new file mode 100644
index 00000000..b41bcadb
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/UserIdRoleIdTest.java
@@ -0,0 +1,29 @@
+package org.openecomp.portalapp.portal.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.UserIdRoleId;
+
+public class UserIdRoleIdTest {
+
+ public UserIdRoleId mockUserIdRoleId(){
+ UserIdRoleId userIdRoleId = new UserIdRoleId();
+ userIdRoleId.setUser_Id("test");
+ userIdRoleId.setRoleId("test");
+ userIdRoleId.setOrgUserId("test");
+ userIdRoleId.setAppId("test");
+
+ return userIdRoleId;
+ }
+
+ @Test
+ public void userIdRoleIdTest(){
+ UserIdRoleId userIdRoleId = mockUserIdRoleId();
+
+ assertEquals(userIdRoleId.getUser_Id(), "test");
+ assertEquals(userIdRoleId.getRoleId(), "test");
+ assertEquals(userIdRoleId.getOrgUserId(), "test");
+ assertEquals(userIdRoleId.getAppId(), "test");
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/WidgetCatalogParameterTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/WidgetCatalogParameterTest.java
new file mode 100644
index 00000000..7db79b80
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/WidgetCatalogParameterTest.java
@@ -0,0 +1,33 @@
+package org.openecomp.portalapp.portal.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.WidgetCatalogParameter;
+
+public class WidgetCatalogParameterTest {
+
+ public WidgetCatalogParameter mockWidgetCatalogParameter(){
+ WidgetCatalogParameter widgetCatalogParameter = new WidgetCatalogParameter();
+
+ widgetCatalogParameter.setId((long)1);
+ widgetCatalogParameter.setWidgetId((long)1);
+ widgetCatalogParameter.setUserId((long)1);
+ widgetCatalogParameter.setParamId((long)1);
+ widgetCatalogParameter.setUser_value("test");
+
+ return widgetCatalogParameter;
+ }
+
+ @Test
+ public void widgetCatalogParameterTest(){
+ WidgetCatalogParameter widgetCatalogParameter = mockWidgetCatalogParameter();
+
+ assertEquals(widgetCatalogParameter.getId(), new Long(1));
+ assertEquals(widgetCatalogParameter.getWidgetId(), new Long(1));
+ assertEquals(widgetCatalogParameter.getUserId(), new Long(1));
+ assertEquals(widgetCatalogParameter.getParamId(), new Long(1));
+ assertEquals(widgetCatalogParameter.getUser_value(), "test");
+ assertEquals(widgetCatalogParameter.toString(), "WidgetCatalogParameter [id=1, widgetId=1, userId=1, paramId=1, user_value=test]");
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/WidgetCatalogTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/WidgetCatalogTest.java
new file mode 100644
index 00000000..9e606fc3
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/WidgetCatalogTest.java
@@ -0,0 +1,84 @@
+package org.openecomp.portalapp.portal.domain;
+
+import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.App;
+import org.openecomp.portalapp.portal.domain.RoleApp;
+import org.openecomp.portalapp.portal.domain.WidgetCatalog;
+
+public class WidgetCatalogTest {
+
+ public WidgetCatalog mockWidgetCatalog() {
+
+ WidgetCatalog widgetCatalog = new WidgetCatalog();
+
+ Set<RoleApp> roleAppSet = new HashSet<RoleApp>();
+ // App
+ App app = new App();
+ app.setAppId((long) 1);
+ app.setAppName("test");
+
+ // RoleApp
+ RoleApp roleApp = new RoleApp();
+ roleApp.setRoleId((long) 1);
+ roleApp.setRoleName("test");
+ roleApp.setApp(app);
+ roleApp.setWidgets(null);
+
+ roleAppSet.add(roleApp);
+
+ widgetCatalog.setId((long) 1);
+ widgetCatalog.setName("test");
+ widgetCatalog.setDesc("test");
+ widgetCatalog.setFileLocation("test");
+ widgetCatalog.setAllowAllUser("test");
+ widgetCatalog.setServiceId((long) 1);
+ widgetCatalog.setSortOrder("test");
+ widgetCatalog.setStatusCode("test");
+
+ widgetCatalog.setWidgetRoles(roleAppSet);
+
+ return widgetCatalog;
+
+ }
+
+ @Test
+ public void widgetCatalogTest() {
+
+ // App
+ App app = new App();
+ app.setAppId((long) 1);
+ app.setAppName("test");
+
+ Set<RoleApp> roleAppSet = new HashSet<RoleApp>();
+ // RoleApp
+ RoleApp roleApp = new RoleApp();
+ roleApp.setRoleId((long) 1);
+ roleApp.setRoleName("test");
+ roleApp.setApp(app);
+ roleApp.setWidgets(null);
+
+ roleAppSet.add(roleApp);
+
+ WidgetCatalog widgetCatalog = mockWidgetCatalog();
+
+
+ assertEquals(widgetCatalog.getId(), (long)1);
+ assertEquals(widgetCatalog.getName(), "test");
+ assertEquals(widgetCatalog.getDesc(), "test");
+ assertEquals(widgetCatalog.getFileLocation(), "test");
+ assertEquals(widgetCatalog.getAllowAllUser(), "test");
+ assertEquals(widgetCatalog.getServiceId(), new Long (1));
+ assertEquals(widgetCatalog.getSortOrder(), "test");
+ assertEquals(widgetCatalog.getStatusCode(), "test");
+ assertEquals(widgetCatalog.getWidgetRoles().size(),1);
+
+ assertEquals("WidgetCatalog [id=1, name=test, desc=test, fileLocation=test, allowAllUser=test]", widgetCatalog.toString());
+ }
+
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/WidgetParameterResultTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/WidgetParameterResultTest.java
new file mode 100644
index 00000000..4e80bdb9
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/WidgetParameterResultTest.java
@@ -0,0 +1,33 @@
+package org.openecomp.portalapp.portal.domain;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.WidgetParameterResult;
+
+public class WidgetParameterResultTest {
+
+ public WidgetParameterResult mockWidgetParameterResult(){
+
+ WidgetParameterResult widgetParameterResult = new WidgetParameterResult();
+ widgetParameterResult.setParam_id((long)1);
+ widgetParameterResult.setParam_key("test");
+ widgetParameterResult.setUser_value("test");
+ widgetParameterResult.setDefault_value("test");
+
+ return widgetParameterResult;
+ }
+
+ @Test
+ public void widgetParameterResultTest(){
+
+ WidgetParameterResult widgetParameterResult = mockWidgetParameterResult();
+
+ assertEquals(widgetParameterResult.getParam_key(), "test");
+ assertEquals(widgetParameterResult.getParam_id(), new Long(1));
+ assertEquals(widgetParameterResult.getUser_value(), "test");
+ assertEquals(widgetParameterResult.getDefault_value(), "test");
+
+ assertEquals("WidgetParameterResult [param_id=1, param_key=test, user_value=test, default_value=test]", widgetParameterResult.toString());
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/WidgetTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/WidgetTest.java
new file mode 100644
index 00000000..bb75836c
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/domain/WidgetTest.java
@@ -0,0 +1,34 @@
+package org.openecomp.portalapp.portal.domain;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.Widget;
+
+public class WidgetTest {
+
+ public Widget mockWidget(){
+
+ Widget widget = new Widget();
+ widget.setName("test");
+ widget.setWidth(100);
+ widget.setHeight(100);
+ widget.setUrl("test");
+ widget.setAppId((long)1);
+
+ return widget;
+ }
+
+ @Test
+ public void widgetTest(){
+ Widget widget = mockWidget();
+
+ assertEquals(widget.getName(), "test");
+ assertTrue(widget.getWidth() == 100);
+ assertTrue(widget.getHeight() == 100);
+ assertEquals(widget.getUrl(), "test");
+ assertEquals(widget.getAppId(), new Long(1));
+
+
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/exceptions/NoHealthyServiceExceptionTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/exceptions/NoHealthyServiceExceptionTest.java
new file mode 100644
index 00000000..71f620f3
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/exceptions/NoHealthyServiceExceptionTest.java
@@ -0,0 +1,23 @@
+package org.openecomp.portalapp.portal.exceptions;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.exceptions.NoHealthyServiceException;
+
+public class NoHealthyServiceExceptionTest {
+
+ public NoHealthyServiceException mockNoHealthyServiceException(){
+ NoHealthyServiceException noHealthyServiceException = new NoHealthyServiceException("test");
+
+ return noHealthyServiceException;
+ }
+
+ @Test
+ public void noHealthyServiceExceptionTest(){
+ NoHealthyServiceException noHealthyServiceException = mockNoHealthyServiceException();
+
+ // assertEquals(noHealthyServiceException, new NoHealthyServiceException("test"));
+ assertEquals(noHealthyServiceException.toString(), "NoHealthyServiceException [] test");
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/framework/ApplicationCommonContextTestSuite.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/framework/ApplicationCommonContextTestSuite.java
new file mode 100644
index 00000000..96d7f310
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/framework/ApplicationCommonContextTestSuite.java
@@ -0,0 +1,172 @@
+///*-
+// * ================================================================================
+// * ECOMP Portal
+// * ================================================================================
+// * Copyright (C) 2017 AT&T Intellectual Property
+// * ================================================================================
+// * Licensed under the Apache License, Version 2.0 (the "License");
+// * you may not use this file except in compliance with the License.
+// * You may obtain a copy of the License at
+// *
+// * http://www.apache.org/licenses/LICENSE-2.0
+// *
+// * Unless required by applicable law or agreed to in writing, software
+// * distributed under the License is distributed on an "AS IS" BASIS,
+// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// * See the License for the specific language governing permissions and
+// * limitations under the License.
+// * ================================================================================
+// */
+//package org.openecomp.portalapp.portal.framework;
+//
+//import java.io.IOException;
+//
+//import org.junit.Before;
+//import org.junit.runner.RunWith;
+//import org.openecomp.portalsdk.core.conf.AppConfig;
+////import org.openecomp.portalapp.conf.ExternalAppConfig;
+////import org.openecomp.portalapp.conf.HibernateMappingLocations;
+//import org.openecomp.portalsdk.core.conf.HibernateConfiguration;
+//import org.openecomp.portalsdk.core.conf.HibernateMappingLocatable;
+//import org.openecomp.portalsdk.core.objectcache.AbstractCacheManager;
+//import org.openecomp.portalsdk.core.util.CacheManager;
+//import org.openecomp.portalsdk.core.util.SystemProperties;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.context.annotation.Bean;
+//import org.springframework.context.annotation.ComponentScan;
+//import org.springframework.context.annotation.Configuration;
+//import org.springframework.context.annotation.FilterType;
+//import org.springframework.context.annotation.Profile;
+//import org.springframework.core.io.ClassPathResource;
+//import org.springframework.core.io.Resource;
+//import org.springframework.test.context.ActiveProfiles;
+//import org.springframework.test.context.ContextConfiguration;
+//import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+//import org.springframework.test.context.web.AnnotationConfigWebContextLoader;
+//import org.springframework.test.context.web.WebAppConfiguration;
+//import org.springframework.test.web.servlet.MockMvc;
+//import org.springframework.test.web.servlet.setup.MockMvcBuilders;
+//import org.springframework.web.context.WebApplicationContext;
+//import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
+//
+///**
+// *
+// * In order to write a unit test, 1. inherit this class 2. place the "war"
+// * folder on your test class's classpath 3. run the test with the following VM
+// * argument; This is important because when starting the application from
+// * Container, the System Properties file (SystemProperties.java) can have the
+// * direct path but, when running from the Mock Junit container, the path should
+// * be prefixed with "classpath" to enable the mock container to search for the
+// * file in the classpath -Dcontainer.classpath="classpath:"
+// */
+//
+//@SuppressWarnings("deprecation")
+//@RunWith(SpringJUnit4ClassRunner.class)
+//@WebAppConfiguration
+//@ContextConfiguration(loader = AnnotationConfigWebContextLoader.class, classes = { MockAppConfig.class })
+//@ActiveProfiles(value = "test")
+//public class ApplicationCommonContextTestSuite {
+//
+// @Autowired
+// public WebApplicationContext wac;
+//
+// private MockMvc mockMvc;
+//
+// @Before
+// public void setup() {
+// if (mockMvc == null) {
+// this.mockMvc = MockMvcBuilders.webAppContextSetup(this.wac).build();
+//
+// }
+// }
+//
+// public Object getBean(String name) {
+// return this.wac.getBean(name);
+// }
+//
+// public MockMvc getMockMvc() {
+// return mockMvc;
+// }
+//
+// public void setMockMvc(MockMvc mockMvc) {
+// this.mockMvc = mockMvc;
+// }
+//
+// public WebApplicationContext getWebApplicationContext() {
+// return wac;
+// }
+//
+//}
+//
+//@Configuration
+//@ComponentScan(basePackages = "org.openecomp", excludeFilters = {
+// // the following source configurations should not be scanned; instead of
+// // using Exclusion filter, we can use the @Profile annotation to exclude
+// // them
+// @ComponentScan.Filter(type = FilterType.REGEX, pattern = "org.openecomp.portalsdk.core.controller.LogoutController*"),
+// @ComponentScan.Filter(type = FilterType.REGEX, pattern = "org.openecomp.portalsdk.core.controller.SDKLoginController*"),
+// @ComponentScan.Filter(type = FilterType.REGEX, pattern = "org.openecomp.portalapp.conf.ExternalAppConfig*"),
+// @ComponentScan.Filter(type = FilterType.REGEX, pattern = "org.openecomp.*.*InitUebHandler*") })
+//@Profile("test")
+//class MockAppConfig extends AppConfig {
+//
+// @Bean
+// HibernateMappingLocatable locatable() {
+// return new MockHibernateMappingLocations();
+// }
+//
+// @Bean
+// HibernateConfiguration hibConfiguration() {
+// return new HibernateConfiguration();
+// }
+//
+// @Bean
+// public SystemProperties systemProperties() {
+// return new MockSystemProperties();
+// }
+//
+// @Bean
+// public AbstractCacheManager cacheManager() {
+// return new CacheManager() {
+//
+// public void configure() throws IOException {
+//
+// }
+// };
+// }
+//
+// public String[] tileDefinitions() {
+// return new String[] { "classpath:/WEB-INF/fusion/defs/definitions.xml",
+// "classpath:/WEB-INF/defs/definitions.xml" };
+// }
+//
+// public void addInterceptors(InterceptorRegistry registry) {
+// // registry.addInterceptor(new
+// // SessionTimeoutInterceptor()).excludePathPatterns(getExcludeUrlPathsForSessionTimeout());
+// // registry.addInterceptor(resourceInterceptor());
+// }
+//
+// public static class MockSystemProperties extends SystemProperties {
+//
+// public MockSystemProperties() {
+// }
+//
+// }
+//
+//}
+//
+//@Profile("test")
+//class MockHibernateMappingLocations implements HibernateMappingLocatable {
+//
+// public Resource[] getMappingLocations() {
+// return new Resource[] { new ClassPathResource("WEB-INF/fusion/orm/Fusion.hbm.xml"),
+// new ClassPathResource("WEB-INF/fusion/orm/EP.hbm.xml"),
+// new ClassPathResource("WEB-INF/fusion/orm/Workflow.hbm.xml") };
+//
+// }
+//
+// public String[] getPackagesToScan() {
+// return new String[] { "org.openecomp", "src" };
+// }
+//
+//}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/framework/MockitoTestSuite.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/framework/MockitoTestSuite.java
new file mode 100644
index 00000000..ccda5f3e
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/framework/MockitoTestSuite.java
@@ -0,0 +1,76 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.framework;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletRequestWrapper;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mockito;
+import org.mockito.runners.MockitoJUnitRunner;
+
+@RunWith(MockitoJUnitRunner.class)
+public class MockitoTestSuite {
+
+
+ public MockHttpServletRequestWrapper mockedRequest = new MockHttpServletRequestWrapper(
+ Mockito.mock(HttpServletRequest.class));
+ public HttpServletResponse mockedResponse = Mockito.mock(HttpServletResponse.class);
+
+ public MockHttpServletRequestWrapper getMockedRequest() {
+ return mockedRequest;
+ }
+
+ public HttpServletResponse getMockedResponse() {
+ return mockedResponse;
+ }
+
+ public class MockHttpServletRequestWrapper extends HttpServletRequestWrapper {
+
+ HttpSession session = Mockito.mock(HttpSession.class);
+
+ public MockHttpServletRequestWrapper(HttpServletRequest request) {
+ super(request);
+
+ }
+
+ @Override
+ public HttpSession getSession() {
+
+ return session;
+ }
+
+ @Override
+ public HttpSession getSession(boolean create) {
+
+ return session;
+ }
+
+ }
+
+ @Test
+ public void test()
+ {
+ assert(true);
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/lm/FusionLicenseManagerImplTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/lm/FusionLicenseManagerImplTest.java
new file mode 100644
index 00000000..6c1e52f7
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/lm/FusionLicenseManagerImplTest.java
@@ -0,0 +1,29 @@
+package org.openecomp.portalapp.portal.lm;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.Date;
+
+import org.junit.Test;
+import org.openecomp.portalapp.lm.FusionLicenseManagerImpl;
+
+public class FusionLicenseManagerImplTest {
+
+
+ @Test
+ public void FusionLicenseManagerImplTest(){
+ FusionLicenseManagerImpl fusionLicenseManagerImpl = new FusionLicenseManagerImpl();
+
+ String nvlReturn = null;
+
+ int installLicenseInt = fusionLicenseManagerImpl.installLicense();
+ nvlReturn = fusionLicenseManagerImpl.nvl("test");
+ Date expiredDateReturn = fusionLicenseManagerImpl.getExpiredDate();
+
+ assertEquals(installLicenseInt, 0);
+ assertEquals(nvlReturn, null);
+ assertEquals(expiredDateReturn, null);
+
+ }
+
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/lm/LicenseableClassImplTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/lm/LicenseableClassImplTest.java
new file mode 100644
index 00000000..b57291ee
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/lm/LicenseableClassImplTest.java
@@ -0,0 +1,31 @@
+package org.openecomp.portalapp.portal.lm;
+
+import static org.junit.Assert.assertEquals;
+
+import java.io.FileNotFoundException;
+
+import org.junit.Test;
+import org.openecomp.portalapp.lm.LicenseableClassImpl;
+
+public class LicenseableClassImplTest {
+
+ @Test
+ public void licenseableClassImplTest() throws FileNotFoundException{
+ LicenseableClassImpl licenseableClassImpl = new LicenseableClassImpl();
+
+ String appNameReturn = licenseableClassImpl.getApplicationName();
+ java.io.InputStream inputStream = licenseableClassImpl.getPublicKeystoreAsInputStream();
+ String aliasReturn = licenseableClassImpl.getAlias();
+ String pswdReturn = licenseableClassImpl.getKeyPasswd();
+ String pkPswd = licenseableClassImpl.getPublicKeystorePassword();
+ String cpPswd = licenseableClassImpl.getCipherParamPassword();
+
+ assertEquals(appNameReturn, "");
+ assertEquals(inputStream, null);
+ assertEquals(aliasReturn, "");
+ assertEquals(pswdReturn, "");
+ assertEquals(pkPswd, "");
+ assertEquals(cpPswd, "");
+
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/model/AppCatalogItemTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/model/AppCatalogItemTest.java
new file mode 100644
index 00000000..5b8440b8
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/model/AppCatalogItemTest.java
@@ -0,0 +1,35 @@
+package org.openecomp.portalapp.portal.model;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.ecomp.model.AppCatalogItem;
+
+public class AppCatalogItemTest {
+
+ public AppCatalogItem mockAppCatalogItem(){
+ AppCatalogItem appCatalogItem = new AppCatalogItem();
+
+ appCatalogItem.setAlternateUrl("test");
+ appCatalogItem.setMlAppName("test");
+
+ return appCatalogItem;
+ }
+
+ @Test
+ public void appCatalogItemTest(){
+ AppCatalogItem appCatalogItem = mockAppCatalogItem();
+
+ AppCatalogItem appCatalogItem1 = new AppCatalogItem();
+ appCatalogItem1.setAlternateUrl("test");
+ appCatalogItem1.setMlAppName("test");
+
+ assertEquals(appCatalogItem.getAlternateUrl(), appCatalogItem1.getAlternateUrl());
+ assertEquals(appCatalogItem.getMlAppName(), appCatalogItem1.getMlAppName());
+
+ assertEquals(appCatalogItem.toString(), "AppCatalogItem [id=null, name=null, access=null, select=null, pending=null]");
+ assertEquals(appCatalogItem.hashCode(), appCatalogItem1.hashCode());
+ assertTrue(appCatalogItem.equals(appCatalogItem1));
+
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/model/AppCategoryFunctionsItemTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/model/AppCategoryFunctionsItemTest.java
new file mode 100644
index 00000000..817f5e13
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/model/AppCategoryFunctionsItemTest.java
@@ -0,0 +1,42 @@
+package org.openecomp.portalapp.portal.model;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.ecomp.model.AppCategoryFunctionsItem;
+
+public class AppCategoryFunctionsItemTest {
+
+ public AppCategoryFunctionsItem mockAppCategoryFunctionsItem(){
+ AppCategoryFunctionsItem appCategoryFunctionsItem = new AppCategoryFunctionsItem();
+
+ appCategoryFunctionsItem.setRowId("test");
+ appCategoryFunctionsItem.setAppId("test");
+ appCategoryFunctionsItem.setApplication("test");
+ appCategoryFunctionsItem.setFunctions("test");
+
+ return appCategoryFunctionsItem;
+ }
+
+ @Test
+ public void appCategoryFunctionsItemTest(){
+ AppCategoryFunctionsItem appCategoryFunctionsItem = mockAppCategoryFunctionsItem();
+
+ AppCategoryFunctionsItem appCategoryFunctionsItem1 = new AppCategoryFunctionsItem();
+
+ appCategoryFunctionsItem1.setRowId("test");
+ appCategoryFunctionsItem1.setAppId("test");
+ appCategoryFunctionsItem1.setApplication("test");
+ appCategoryFunctionsItem1.setFunctions("test");
+
+ assertEquals(appCategoryFunctionsItem.getRowId(), appCategoryFunctionsItem1.getRowId());
+ assertEquals(appCategoryFunctionsItem.getAppId(), appCategoryFunctionsItem1.getAppId());
+ assertEquals(appCategoryFunctionsItem.getApplication(), appCategoryFunctionsItem1.getApplication());
+ assertEquals(appCategoryFunctionsItem.getFunctions(), appCategoryFunctionsItem1.getFunctions());
+ assertEquals(appCategoryFunctionsItem.toString(), "AppCategoryFunctionsItem [rowId=test, appId=test, application=test, category=null, functions=test]");
+ assertEquals(appCategoryFunctionsItem.hashCode(), appCategoryFunctionsItem1.hashCode());
+ assertTrue(appCategoryFunctionsItem.equals(appCategoryFunctionsItem1));
+
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/model/AppContactUsItemTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/model/AppContactUsItemTest.java
new file mode 100644
index 00000000..1e286208
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/model/AppContactUsItemTest.java
@@ -0,0 +1,49 @@
+package org.openecomp.portalapp.portal.model;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.ecomp.model.AppContactUsItem;
+
+public class AppContactUsItemTest {
+
+ public AppContactUsItem mockAppContactUsItem(){
+ AppContactUsItem appContactUsItem = new AppContactUsItem();
+
+ appContactUsItem.setAppId((long)1);
+ appContactUsItem.setAppName("test");
+ appContactUsItem.setDescription("test");
+ appContactUsItem.setContactName("test");
+ appContactUsItem.setContactEmail("test");
+ appContactUsItem.setUrl("test");
+ appContactUsItem.setActiveYN("test");
+
+ return appContactUsItem;
+ }
+
+ @Test
+ public void appContactUsItemTest(){
+ AppContactUsItem appContactUsItem = mockAppContactUsItem();
+
+ AppContactUsItem appContactUsItem1 = new AppContactUsItem();
+ appContactUsItem1.setAppId((long)1);
+ appContactUsItem1.setAppName("test");
+ appContactUsItem1.setDescription("test");
+ appContactUsItem1.setContactName("test");
+ appContactUsItem1.setContactEmail("test");
+ appContactUsItem1.setUrl("test");
+ appContactUsItem1.setActiveYN("test");
+
+ assertEquals(appContactUsItem.getAppId(), appContactUsItem1.getAppId());
+ assertEquals(appContactUsItem.getAppName(), appContactUsItem1.getAppName());
+ assertEquals(appContactUsItem.getDescription(), appContactUsItem1.getDescription());
+ assertEquals(appContactUsItem.getContactName(), appContactUsItem1.getContactName());
+ assertEquals(appContactUsItem.getContactEmail(), appContactUsItem1.getContactEmail());
+ assertEquals(appContactUsItem.getUrl(), appContactUsItem1.getUrl());
+ assertEquals(appContactUsItem.getActiveYN(), appContactUsItem1.getActiveYN());
+ assertEquals(appContactUsItem.toString(), "AppContactUsItem [appId=1, appName=test, description=test, contactName=test, contactEmail=test, url=test, activeYN=test]");
+ assertEquals(appContactUsItem.hashCode(), appContactUsItem1.hashCode());
+ assertTrue(appContactUsItem.equals(appContactUsItem1));
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/model/SearchResultItemTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/model/SearchResultItemTest.java
new file mode 100644
index 00000000..84527d09
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/model/SearchResultItemTest.java
@@ -0,0 +1,41 @@
+package org.openecomp.portalapp.portal.model;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.ecomp.model.SearchResultItem;
+
+public class SearchResultItemTest {
+
+ public SearchResultItem mockSearchResultItem(){
+ SearchResultItem searchResultItem = new SearchResultItem();
+
+ searchResultItem.setRowId("test");
+ searchResultItem.setCategory("test");
+ searchResultItem.setName("test");
+ searchResultItem.setTarget("test");
+ searchResultItem.setUuid("test");
+
+ return searchResultItem;
+ }
+
+ @Test
+ public void searchResultItemTest(){
+ SearchResultItem searchResultItem = mockSearchResultItem();
+
+ SearchResultItem searchResultItem1 = new SearchResultItem();
+ searchResultItem1.setRowId("test");
+ searchResultItem1.setCategory("test");
+ searchResultItem1.setName("test");
+ searchResultItem1.setTarget("test");
+ searchResultItem1.setUuid("test");
+
+ assertEquals(searchResultItem.getRowId(), searchResultItem.getRowId());
+ assertEquals(searchResultItem.getCategory(), searchResultItem.getCategory());
+ assertEquals(searchResultItem.getName(), searchResultItem.getName());
+ assertEquals(searchResultItem.getTarget(), searchResultItem.getTarget());
+ assertEquals(searchResultItem.getUuid(), searchResultItem.getUuid());
+ assertEquals(searchResultItem.toString(), searchResultItem.toString());
+
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/AppContactUsServiceImplTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/AppContactUsServiceImplTest.java
new file mode 100644
index 00000000..5c6d04f5
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/AppContactUsServiceImplTest.java
@@ -0,0 +1,147 @@
+package org.openecomp.portalapp.portal.service;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.domain.AppContactUs;
+import org.openecomp.portalapp.portal.domain.EPApp;
+import org.openecomp.portalapp.portal.ecomp.model.AppCategoryFunctionsItem;
+import org.openecomp.portalapp.portal.ecomp.model.AppContactUsItem;
+import org.openecomp.portalapp.portal.service.AppContactUsService;
+import org.openecomp.portalapp.portal.service.AppContactUsServiceImpl;
+import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
+import org.openecomp.portalsdk.core.service.DataAccessService;
+import org.openecomp.portalsdk.core.service.DataAccessServiceImpl;
+
+public class AppContactUsServiceImplTest {
+
+
+ @Mock
+ DataAccessService dataAccessService = new DataAccessServiceImpl();
+
+ @Mock
+ AppContactUsService AppContactUsService = new AppContactUsServiceImpl();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ @InjectMocks
+ AppContactUsServiceImpl appContactUsServiceImpl = new AppContactUsServiceImpl();
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+ NullPointerException nullPointerException = new NullPointerException();
+
+
+ public EPApp getApp() {
+ EPApp app = new EPApp();
+ app.setName("Test");
+ app.setImageUrl("test");
+ app.setDescription("test");
+ app.setNotes("test");
+ app.setUrl("test");
+ app.setId((long) 1);
+ app.setAppRestEndpoint("test");
+ app.setAlternateUrl("test");
+ app.setName("test");
+ app.setMlAppName("test");
+ app.setMlAppAdminId("test");
+ app.setUsername("test");
+ app.setAppPassword("test");
+ app.setOpen(true);
+ app.setEnabled(false);
+ app.setUebKey("test");
+ app.setUebSecret("test");
+ app.setUebTopicName("test");
+ app.setAppType(1);
+ return app;
+ }
+ @Test
+ public void getAppContactUsTest() throws Exception
+ {
+
+ List<AppContactUsItem> contactUsItemList = new ArrayList<>();
+ AppContactUsItem appContactUsItem= new AppContactUsItem();
+ appContactUsItem.setAppName("testNew");
+ contactUsItemList.add(appContactUsItem);
+ AppContactUsItem appContactUsItem1= new AppContactUsItem();
+ appContactUsItem1.setAppName("test");
+ contactUsItemList.add(appContactUsItem1);
+ Mockito.when(dataAccessService.executeNamedQuery("getAppContactUsItems", null, null)).thenReturn(contactUsItemList);
+ List<AppContactUsItem> expectedcontactUsItemList = appContactUsServiceImpl.getAppContactUs();
+ assertEquals(expectedcontactUsItemList, contactUsItemList);
+ }
+
+ @Test
+ public void getAppsAndContactsTest() throws Exception
+ {
+ List<AppContactUsItem> contactUsItemList = new ArrayList<>();
+ AppContactUsItem appContactUsItem= new AppContactUsItem();
+ appContactUsItem.setAppName("testNew");
+ contactUsItemList.add(appContactUsItem);
+ AppContactUsItem appContactUsItem1= new AppContactUsItem();
+ appContactUsItem1.setAppName("test");
+ contactUsItemList.add(appContactUsItem1);
+ Mockito.when(dataAccessService.executeNamedQuery("getAppsAndContacts", null, null)).thenReturn(contactUsItemList);
+ List<AppContactUsItem> expectedcontactUsItemList = appContactUsServiceImpl.getAppsAndContacts();
+ assertEquals(expectedcontactUsItemList, contactUsItemList);
+ }
+
+ @Test
+ public void getAppCategoryFunctionsTest() throws Exception
+ {
+ List<AppCategoryFunctionsItem> list = new ArrayList<>();
+ Mockito.when(dataAccessService.executeNamedQuery("getAppCategoryFunctions", null, null)).thenReturn(list);
+ List<AppCategoryFunctionsItem> expectedlist = appContactUsServiceImpl.getAppCategoryFunctions();
+ assertEquals(list, expectedlist);
+ }
+
+ @Test(expected = java.lang.Exception.class)
+ public void saveAppContactUsTest() throws Exception
+ {
+ HashMap<String, Object> map = new HashMap<String, Object>();
+ List<AppContactUsItem> contactUsModelList = new ArrayList<>();
+ AppContactUsItem appContactUsItem= new AppContactUsItem();
+ appContactUsItem.setAppId((long) 1);
+ contactUsModelList.add(appContactUsItem);
+ AppContactUs appContact = new AppContactUs();
+ Mockito.when(dataAccessService.getDomainObject(AppContactUs.class, 1, map)).thenReturn(appContact);
+ EPApp app = getApp();
+ Mockito.when(dataAccessService.getDomainObject(EPApp.class, 1, new HashMap<String, Object>())).thenReturn(app);
+ AppContactUs contactUs = new AppContactUs();
+ contactUs.setApp(app);
+ contactUs.setDescription(appContactUsItem.getDescription());
+ contactUs.setContactName(appContactUsItem.getContactName());
+ contactUs.setContactEmail(appContactUsItem.getContactEmail());
+ contactUs.setActiveYN(appContactUsItem.getActiveYN());
+ contactUs.setUrl(appContactUsItem.getUrl());
+ Mockito.doNothing().when(dataAccessService).saveDomainObject(contactUs,map);
+ appContactUsServiceImpl.saveAppContactUs(contactUsModelList);
+ }
+
+ @Test(expected = java.lang.NullPointerException.class)
+ public void deleteContactUsTest() throws Exception
+ {
+ HashMap<String, Object> map = new HashMap<String, Object>();
+ AppContactUs contactUs = new AppContactUs();
+ Mockito.when((AppContactUs) dataAccessService.getDomainObject(AppContactUs.class, 1, map)).thenReturn(contactUs);
+ appContactUsServiceImpl.deleteContactUs((long) 1);
+ }
+
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/DashboardSearchServiceImplTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/DashboardSearchServiceImplTest.java
new file mode 100644
index 00000000..d67f8773
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/DashboardSearchServiceImplTest.java
@@ -0,0 +1,114 @@
+package org.openecomp.portalapp.portal.service;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.ecomp.model.SearchResultItem;
+import org.openecomp.portalapp.portal.service.DashboardSearchServiceImpl;
+import org.openecomp.portalapp.portal.core.MockEPUser;
+import org.openecomp.portalapp.portal.transport.CommonWidget;
+import org.openecomp.portalapp.portal.transport.CommonWidgetMeta;
+import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
+import org.openecomp.portalsdk.core.service.DataAccessService;
+
+public class DashboardSearchServiceImplTest {
+
+ @Mock
+ DataAccessService dataAccessService;
+
+ @InjectMocks
+ DashboardSearchServiceImpl dashboardSearchServiceImpl = new DashboardSearchServiceImpl();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ NullPointerException nullPointerException = new NullPointerException();
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+ MockEPUser mockUser = new MockEPUser();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+
+ @Test
+ public void searchResultsTest()
+ {
+ Map<String, String> params = new HashMap<>();
+ params.put("userId", "guestT");
+ params.put("searchQuery", "test");
+
+ List<SearchResultItem> list = new ArrayList<>();
+ SearchResultItem searchResultItem= new SearchResultItem();
+ searchResultItem.setCategory("test");
+ list.add(searchResultItem);
+ Mockito.when(dataAccessService.executeNamedQuery("searchPortal", params, null)).thenReturn(list);
+ Map<String, List<SearchResultItem>> result = dashboardSearchServiceImpl.searchResults("guestT", "test");
+ assertTrue(result.keySet().contains("test"));
+ }
+
+ @Test
+ public void getRelatedUsersTest()
+ {
+ List<String> activeUsers = new ArrayList<>();
+ Map<String, String> params = new HashMap<>();
+ params.put("userId", "guestT");
+ Mockito.when(dataAccessService.executeNamedQuery("relatedUsers", params, null)).thenReturn(activeUsers);
+ List<String> expectedActiveUsers = dashboardSearchServiceImpl.getRelatedUsers("guestT");
+ assertEquals(expectedActiveUsers,activeUsers);
+ }
+ @Test
+ public void getWidgetDataTest()
+ {
+ CommonWidgetMeta CommonWidgetMeta = null;
+ Map<String, String> params = new HashMap<>();
+ params.put("cat", "test");
+ @SuppressWarnings("unchecked")
+ List<CommonWidget> widgetItems = new ArrayList<>();
+ CommonWidget commonWidget = new CommonWidget();
+ widgetItems.add(commonWidget);
+ Mockito.when(dataAccessService.executeNamedQuery("getCommonWidgetItem", params, null)).thenReturn(widgetItems);
+ CommonWidgetMeta expectedCommonWidgetMeta =dashboardSearchServiceImpl.getWidgetData("test");
+ assertEquals(expectedCommonWidgetMeta.getCategory(), "test");
+ }
+
+ @Test
+ public void saveWidgetDataBulkTest()
+ {
+ CommonWidgetMeta CommonWidgetMeta = new CommonWidgetMeta();
+ List<CommonWidget> widgetList = new ArrayList<>();
+ CommonWidget commonWidget = new CommonWidget();
+ widgetList.add(commonWidget);
+ CommonWidgetMeta.setItems(widgetList);
+ Mockito.doNothing().when(dataAccessService).saveDomainObject(commonWidget, null);
+ assertEquals(dashboardSearchServiceImpl.saveWidgetDataBulk(CommonWidgetMeta), "success");
+ }
+
+ @Test
+ public void saveWidgetDataTest()
+ {
+ CommonWidget commonWidget = new CommonWidget();
+ Mockito.doNothing().when(dataAccessService).saveDomainObject(commonWidget, null);
+ assertEquals(dashboardSearchServiceImpl.saveWidgetData(commonWidget), "success");
+ }
+
+ @Test
+ public void deleteWidgetDataTest()
+ {
+ CommonWidget commonWidget = new CommonWidget();
+ Mockito.doNothing().when(dataAccessService).deleteDomainObject(commonWidget, null);
+ assertEquals(dashboardSearchServiceImpl.deleteWidgetData(commonWidget), "success");
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/EPRoleFunctionServiceCentralizedImplTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/EPRoleFunctionServiceCentralizedImplTest.java
new file mode 100644
index 00000000..789f2bfd
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/EPRoleFunctionServiceCentralizedImplTest.java
@@ -0,0 +1,89 @@
+package org.openecomp.portalapp.portal.service;
+
+import static org.junit.Assert.*;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+
+import org.hibernate.SessionFactory;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.domain.CentralRoleFunction;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.service.EPRoleFunctionServiceCentralizedImpl;
+import org.openecomp.portalapp.portal.core.MockEPUser;
+import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
+import org.openecomp.portalsdk.core.domain.RoleFunction;
+import org.openecomp.portalsdk.core.service.DataAccessService;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest(SystemProperties.class)
+public class EPRoleFunctionServiceCentralizedImplTest {
+
+
+ @Mock
+ DataAccessService dataAccessService;
+
+ @Mock
+ SessionFactory sessionFactory;
+
+ @InjectMocks
+ EPRoleFunctionServiceCentralizedImpl ePRoleFunctionServiceCentralizedImpl = new EPRoleFunctionServiceCentralizedImpl();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ NullPointerException nullPointerException = new NullPointerException();
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+ MockEPUser mockUser = new MockEPUser();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+
+ @Test
+ public void getRoleFunctions()
+ {
+ List<CentralRoleFunction> getRoleFuncList = new ArrayList<>();
+ CentralRoleFunction centralRoleFunction = new CentralRoleFunction();
+ getRoleFuncList.add(centralRoleFunction);
+ List<RoleFunction> getRoleFuncListOfPortal = new ArrayList<>();
+ RoleFunction roleFunction = new RoleFunction();
+ getRoleFuncListOfPortal.add(roleFunction);
+ final Map<String, Long> params = new HashMap<>();
+ params.put("appId", (long) 1);
+ Mockito.when(dataAccessService.executeNamedQuery("getAllRoleFunctions", params, null)).thenReturn(getRoleFuncList);
+ List<RoleFunction> expectedGetRoleFuncListOfPortal = ePRoleFunctionServiceCentralizedImpl.getRoleFunctions();
+ assertEquals(expectedGetRoleFuncListOfPortal.size(),getRoleFuncListOfPortal.size());
+ }
+
+ @Test
+ public void getRoleFunctionsNewTest()
+ {
+ HttpSession session = mockedRequest.getSession();
+ EPUser user = mockUser.mockEPUser();
+ user.setId((long) 1);
+ String userId = user.getId().toString();
+ final Map<String, String> params = new HashMap<>();
+ params.put("userId", userId);
+ @SuppressWarnings("unused")
+ List getRoleFuncListOfPortal = new ArrayList<>();
+ Mockito.when(dataAccessService.executeNamedQuery("getRoleFunctionsOfUser", params, null)).thenReturn(getRoleFuncListOfPortal);
+ Set<String> getRoleFuncListOfPortalSet = ePRoleFunctionServiceCentralizedImpl.getRoleFunctions(mockedRequest, user);
+ assertTrue(getRoleFuncListOfPortalSet.size() == 0);
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/EPRoleFunctionServiceImplTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/EPRoleFunctionServiceImplTest.java
new file mode 100644
index 00000000..07eeed7e
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/EPRoleFunctionServiceImplTest.java
@@ -0,0 +1,98 @@
+package org.openecomp.portalapp.portal.service;
+
+import static org.junit.Assert.*;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.SortedSet;
+import java.util.TreeSet;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.domain.EPRole;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.service.EPRoleFunctionServiceImpl;
+import org.openecomp.portalapp.portal.core.MockEPUser;
+import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
+import org.openecomp.portalapp.util.EPUserUtils;
+import org.openecomp.portalsdk.core.domain.RoleFunction;
+import org.openecomp.portalsdk.core.service.DataAccessService;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest({ SystemProperties.class, EPUserUtils.class })
+public class EPRoleFunctionServiceImplTest {
+
+ @Mock
+ DataAccessService dataAccessService;
+
+ @InjectMocks
+ EPRoleFunctionServiceImpl ePRoleFunctionServiceImpl = new EPRoleFunctionServiceImpl();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ NullPointerException nullPointerException = new NullPointerException();
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+ MockEPUser mockUser = new MockEPUser();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+
+ @Test
+ public void getRoleFunctionsTest() {
+ List<RoleFunction> functions = new ArrayList<>();
+ Mockito.when(dataAccessService.getList(RoleFunction.class, null)).thenReturn(functions);
+ List<RoleFunction> expectedFunctions = ePRoleFunctionServiceImpl.getRoleFunctions();
+ assertEquals(expectedFunctions, functions);
+ }
+
+ @Test
+ public void getRoleFunctionsRequestTest() {
+ EPUser user = mockUser.mockEPUser();
+ HashSet roleFunctions = new HashSet<>();
+ PowerMockito.mockStatic(SystemProperties.class);
+ HttpSession session = mockedRequest.getSession();
+ Mockito.when(session.getAttribute(SystemProperties.getProperty(SystemProperties.ROLE_FUNCTIONS_ATTRIBUTE_NAME)))
+ .thenReturn(roleFunctions);
+ HashSet expectedRoleFunctions = (HashSet) ePRoleFunctionServiceImpl.getRoleFunctions(mockedRequest, user);
+ assertEquals(expectedRoleFunctions, roleFunctions);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Test
+ public void getRoleFunctionsRequestIfNullTest() {
+ EPUser user = mockUser.mockEPUser();
+ HashSet roleFunctions = null;
+ PowerMockito.mockStatic(SystemProperties.class);
+ PowerMockito.mockStatic(EPUserUtils.class);
+ HttpSession session = mockedRequest.getSession();
+ Mockito.when(session.getAttribute(SystemProperties.getProperty(SystemProperties.ROLE_FUNCTIONS_ATTRIBUTE_NAME)))
+ .thenReturn(roleFunctions);
+ HashMap roles = new HashMap<>();
+ EPRole role = new EPRole();
+ SortedSet<RoleFunction> roleFunctionSet = new TreeSet<RoleFunction>();
+ RoleFunction rolefun = new RoleFunction();
+ roleFunctionSet.add(rolefun);
+ role.setRoleFunctions(roleFunctionSet);
+ roles.put((long) 1, role);
+ Mockito.when(EPUserUtils.getRoles(mockedRequest)).thenReturn(roles);
+ HashSet expectedRoleFunctions = (HashSet) ePRoleFunctionServiceImpl.getRoleFunctions(mockedRequest, user);
+ assertTrue(expectedRoleFunctions.size() == 1);
+
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/EPRoleServiceImplTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/EPRoleServiceImplTest.java
new file mode 100644
index 00000000..766d51be
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/EPRoleServiceImplTest.java
@@ -0,0 +1,208 @@
+package org.openecomp.portalapp.portal.service;
+
+import static org.junit.Assert.*;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.domain.EPRole;
+import org.openecomp.portalapp.portal.service.EPRoleServiceImpl;
+import org.openecomp.portalapp.portal.core.MockEPUser;
+import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
+import org.openecomp.portalsdk.core.domain.RoleFunction;
+import org.openecomp.portalsdk.core.service.DataAccessService;
+
+public class EPRoleServiceImplTest {
+
+ @Mock
+ DataAccessService dataAccessService;
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ @InjectMocks
+ EPRoleServiceImpl ePRoleServiceImpl = new EPRoleServiceImpl();
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+ NullPointerException nullPointerException = new NullPointerException();
+ MockEPUser mockUser = new MockEPUser();
+
+ @Test
+ public void getRoleFunctionsTest() {
+ List<RoleFunction> roleFunctionList = new ArrayList<>();
+ Mockito.when(dataAccessService.getList(RoleFunction.class, null)).thenReturn(roleFunctionList);
+ List<RoleFunction> expectedRoleFunctionList = ePRoleServiceImpl.getRoleFunctions();
+ assertEquals(roleFunctionList, expectedRoleFunctionList);
+ }
+
+ @Test
+ public void getAvailableChildRolesIfRoleIdIsNullTest() {
+ List<EPRole> roleList = new ArrayList<>();
+ EPRole role = new EPRole();
+ EPRole role1 = new EPRole();
+ role.addChildRole(role1);
+ roleList.add(role);
+ Mockito.when(dataAccessService.getList(EPRole.class, null)).thenReturn(roleList);
+ List<EPRole> expectedRoleList = ePRoleServiceImpl.getAvailableChildRoles(null);
+ assertEquals(roleList, expectedRoleList);
+ }
+
+ // @Test
+ // public void getAvailableChildRolesIfRoleIdNotNullTest()
+ // {
+ // List<EPRole> roleList = new ArrayList<>();
+ // EPRole role = new EPRole();
+ // EPRole role1= new EPRole();
+ // role.addChildRole(role1);
+ // roleList.add(role);
+ // Mockito.when(dataAccessService.getDomainObject(EPRole.class, 1,
+ // null)).thenReturn(role);
+ // Mockito.when(dataAccessService.getList(EPRole.class,
+ // null)).thenReturn(roleList);
+ //
+ // List<EPRole> expectedRoleList =
+ // ePRoleServiceImpl.getAvailableChildRoles((long) 1);
+ // System.out.println(expectedRoleList);
+ // assertEquals(roleList,expectedRoleList);
+ // }
+ //
+ @Test
+ public void getRoleFunctionTest() {
+ RoleFunction roleFunction = new RoleFunction();
+ Mockito.when(dataAccessService.getDomainObject(RoleFunction.class, "test", null)).thenReturn(roleFunction);
+ RoleFunction expectedRoleFunction = ePRoleServiceImpl.getRoleFunction("test");
+ assertEquals(expectedRoleFunction, roleFunction);
+ }
+
+ @Test
+ public void saveRoleFunctionTest() {
+ EPRole role = new EPRole();
+ Mockito.doNothing().when(dataAccessService).saveDomainObject(role, null);
+ ePRoleServiceImpl.saveRole(role);
+ }
+
+ @Test
+ public void deleteRoleFunctionTest() {
+ RoleFunction roleFunction = new RoleFunction();
+ Mockito.doNothing().when(dataAccessService).deleteDomainObject(roleFunction, null);
+ ePRoleServiceImpl.deleteRoleFunction(roleFunction);
+ }
+
+ @Test
+ public void getRoleTest() {
+ EPRole role = null;
+ Mockito.when(dataAccessService.getDomainObject(EPRole.class, 1, null)).thenReturn(role);
+ EPRole expectedRole = ePRoleServiceImpl.getRole((long) 1);
+ assertEquals(expectedRole, role);
+ }
+
+ @Test
+ public void getRoleIfappIdNullTest() {
+ assertNull(ePRoleServiceImpl.getRole(null, null));
+
+ }
+
+ @Test
+ public void getRoleIfappIdNotNullTest() {
+ List<EPRole> roles = new ArrayList<>();
+ EPRole role = new EPRole();
+ roles.add(role);
+ String sql = "SELECT * FROM fn_role where APP_ID = 1 AND APP_ROLE_ID = 1";
+ Mockito.when(dataAccessService.executeSQLQuery(sql, EPRole.class, null)).thenReturn(roles);
+ EPRole expectedRole = ePRoleServiceImpl.getRole((long) 1, (long) 1);
+ assertEquals(expectedRole, role);
+
+ }
+
+ @Test
+ public void getRoleIfListSizeIsMoreThan1Test() {
+ List<EPRole> roles = new ArrayList<>();
+ EPRole role = new EPRole();
+ EPRole role1 = new EPRole();
+ roles.add(role);
+ roles.add(role1);
+ String sql = "SELECT * FROM fn_role where APP_ID = 1 AND APP_ROLE_ID = 1";
+ Mockito.when(dataAccessService.executeSQLQuery(sql, EPRole.class, null)).thenReturn(roles);
+ EPRole expectedRole = ePRoleServiceImpl.getRole((long) 1, (long) 1);
+ assertEquals(expectedRole, role);
+
+ }
+
+ @Test
+ public void getRoleIfListSizeIsEmptyTest() {
+ List<EPRole> roles = new ArrayList<>();
+ String sql = "SELECT * FROM fn_role where APP_ID = 1 AND APP_ROLE_ID = 1";
+ Mockito.when(dataAccessService.executeSQLQuery(sql, EPRole.class, null)).thenReturn(roles);
+ assertNull(ePRoleServiceImpl.getRole((long) 1, (long) 1));
+
+ }
+
+ @Test
+ public void saveRoleTest() {
+ EPRole role = new EPRole();
+ Mockito.doNothing().when(dataAccessService).saveDomainObject(role, null);
+ ePRoleServiceImpl.saveRole(role);
+ }
+
+ @Test
+ public void deleteRoleTest() {
+ EPRole role = new EPRole();
+ Mockito.doNothing().when(dataAccessService).deleteDomainObject(role, null);
+ ePRoleServiceImpl.deleteRole(role);
+ }
+
+ @Test
+ public void getAvailableRolesTest() {
+ List<EPRole> roleList = new ArrayList<>();
+ Mockito.when(dataAccessService.getList(EPRole.class, null)).thenReturn(roleList);
+ List<EPRole> expectedRoleList = ePRoleServiceImpl.getAvailableRoles();
+ assertEquals(expectedRoleList, roleList);
+ }
+
+ @Test
+ public void getAppRolesTest() {
+ final Map<String, String> portalParams = null;
+ List<EPRole> roleList = new ArrayList<>();
+ Mockito.when(dataAccessService.executeNamedQuery("getPortalAppRoles", portalParams, null)).thenReturn(roleList);
+ assertNull(ePRoleServiceImpl.getAppRole("test", (long) 1));
+
+ }
+
+ @SuppressWarnings("unchecked")
+ @Test
+ public void getAppRolesIfNotPortalTest() {
+ final Map<String, String> params = null;
+ List<EPRole> roleList = new ArrayList<>();
+ EPRole role = new EPRole();
+ EPRole role1 = new EPRole();
+ roleList.add(role);
+ roleList.add(role1);
+ Mockito.when((List<EPRole>) dataAccessService.executeNamedQuery("getAppRoles", params, null))
+ .thenReturn(roleList);
+ List<EPRole> expectedRoleList = (List<EPRole>) ePRoleServiceImpl.getAppRole("test", (long) 10);
+ System.out.println(expectedRoleList);
+
+ }
+
+ @Test
+ public void saveRoleFunction() {
+ RoleFunction domainRoleFunction = new RoleFunction();
+ Mockito.doNothing().when(dataAccessService).saveDomainObject(domainRoleFunction, null);
+ ePRoleServiceImpl.saveRoleFunction(domainRoleFunction);
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/ExternalAccessRolesServiceImplTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/ExternalAccessRolesServiceImplTest.java
new file mode 100644
index 00000000..4c67fa06
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/ExternalAccessRolesServiceImplTest.java
@@ -0,0 +1,391 @@
+package org.openecomp.portalapp.portal.service;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Matchers;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.core.MockEPUser;
+import org.openecomp.portalapp.portal.domain.CentralRoleFunction;
+import org.openecomp.portalapp.portal.domain.EPApp;
+import org.openecomp.portalapp.portal.domain.EPAppRoleFunction;
+import org.openecomp.portalapp.portal.domain.EPRole;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
+import org.openecomp.portalapp.portal.transport.EcompUserRoles;
+import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;
+import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
+import org.openecomp.portalsdk.core.domain.Role;
+import org.openecomp.portalsdk.core.restful.domain.EcompUser;
+import org.openecomp.portalsdk.core.service.DataAccessService;
+import org.openecomp.portalsdk.core.service.DataAccessServiceImpl;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.client.HttpClientErrorException;
+import org.springframework.web.client.RestTemplate;
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest({ EcompPortalUtils.class, SystemProperties.class, EPCommonSystemProperties.class })
+public class ExternalAccessRolesServiceImplTest {
+ @Mock
+ DataAccessService dataAccessService1 = new DataAccessServiceImpl();
+
+ @Mock
+ RestTemplate template = new RestTemplate();
+
+ @InjectMocks
+ ExternalAccessRolesServiceImpl externalAccessRolesServiceImpl = new ExternalAccessRolesServiceImpl();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+ NullPointerException nullPointerException = new NullPointerException();
+ MockEPUser mockUser = new MockEPUser();
+ String uebKey = "test-ueb-key";
+
+ public EPApp mockApp() {
+ EPApp app = new EPApp();
+ app.setName("Test");
+ app.setImageUrl("test");
+ app.setDescription("test");
+ app.setNotes("test");
+ app.setUrl("test");
+ app.setId((long) 10);
+ app.setAppRestEndpoint("test");
+ app.setAlternateUrl("test");
+ app.setName("test");
+ app.setMlAppName("test");
+ app.setMlAppAdminId("test");
+ app.setUsername("test");
+ app.setAppPassword("test");
+ app.setOpen(false);
+ app.setEnabled(false);
+ app.setUebKey("test");
+ app.setUebSecret("test");
+ app.setUebTopicName("test");
+ app.setAppType(1);
+ return app;
+ }
+
+ @Test
+ public void getAppRolesIfAppIsPortalTest() throws Exception {
+ List<EPRole> applicationRoles = new ArrayList<>();
+ Mockito.when(dataAccessService1.getList(EPRole.class, "test", null, null)).thenReturn(applicationRoles);
+ List<EPRole> expectedApplicationRoles = externalAccessRolesServiceImpl.getAppRoles((long) 1);
+ assertEquals(expectedApplicationRoles, applicationRoles);
+ }
+
+ @Test
+ public void getAppRolesTest() throws Exception {
+ List<EPRole> applicationRoles = new ArrayList<>();
+ Mockito.when(dataAccessService1.getList(EPRole.class, "test", null, null)).thenReturn(applicationRoles);
+ List<EPRole> expectedApplicationRoles = externalAccessRolesServiceImpl.getAppRoles((long) 10);
+ assertEquals(expectedApplicationRoles, applicationRoles);
+ }
+
+ // @SuppressWarnings("null")
+ // @Test(expected = java.lang.Exception.class)
+ // public void getAppRolesExceptionTest() throws Exception{
+ // List<EPRole> applicationRoles = new ArrayList<>();
+ // DataAccessService dataAccessService = null ;
+ // Mockito.when(dataAccessService.getList(EPRole.class, "where app_id = 10",
+ // null, null)).thenThrow(nullPointerException);
+ // List<EPRole> expectedApplicationRoles =
+ // externalAccessRolesServiceImpl.getAppRoles((long) 10);
+ // assertEquals(expectedApplicationRoles,applicationRoles);
+ // }
+
+ @Test(expected = java.lang.Exception.class)
+ public void getAppExceptionTest() throws Exception {
+ List<EPApp> app = new ArrayList<>();
+ Mockito.when(dataAccessService1.getList(EPApp.class, " where ueb_key = '" + uebKey + "'", null, null))
+ .thenReturn(app);
+ List<EPApp> expectedapp = externalAccessRolesServiceImpl.getApp(uebKey);
+ assertEquals(app, expectedapp);
+ }
+
+ @Test(expected = java.lang.Exception.class)
+ public void getAppTest() throws Exception {
+ List<EPApp> appList = new ArrayList<>();
+ EPApp app = mockApp();
+ appList.add(app);
+ Mockito.when(dataAccessService1.getList(EPApp.class, " where ueb_key = '" + uebKey + "'", null, null))
+ .thenReturn(appList);
+ List<EPApp> expectedapp = externalAccessRolesServiceImpl.getApp(uebKey);
+ }
+
+ @Test
+ public void getAppErrorTest() throws Exception {
+ List<EPApp> appList = new ArrayList<>();
+ EPApp app = mockApp();
+ app.setId((long) 1);
+ appList.add(app);
+ Mockito.when(dataAccessService1.getList(EPApp.class, " where ueb_key = '" + uebKey + "'", null, null))
+ .thenReturn(appList);
+ List<EPApp> expectedapp = externalAccessRolesServiceImpl.getApp(uebKey);
+ assertEquals(appList, expectedapp);
+ }
+
+ @Test
+ public void addRoleTest() throws Exception {
+ HttpHeaders headers = new HttpHeaders();
+ PowerMockito.mockStatic(EcompPortalUtils.class);
+ PowerMockito.mockStatic(SystemProperties.class);
+ PowerMockito.mockStatic(EPCommonSystemProperties.class);
+ String uebKey = "test-ueb-key";
+ Role role = new Role();
+ role.setId((long) 25);
+ EPApp app = mockApp();
+ app.setEnabled(true);
+ app.setId((long) 10);
+ app.setNameSpace("test_namesapce");
+ Mockito.when(EcompPortalUtils.base64encodeKeyForAAFBasicAuth()).thenReturn(headers);
+ List<EPApp> appList = new ArrayList<>();
+ appList.add(app);
+ List<EPRole> roleList = new ArrayList<>();
+ EPRole ePRole = new EPRole();
+ role.setName("Test Role");
+ roleList.add(ePRole);
+ Mockito.when(dataAccessService1.getList(EPApp.class, " where ueb_key = '" + uebKey + "'", null, null))
+ .thenReturn(appList);
+ Mockito.when(dataAccessService1.getList(EPRole.class, " where app_role_id = " + role.getId() + " and app_id ="+app.getId(), null, null)).thenReturn(roleList);
+ Mockito.when(SystemProperties.getProperty(EPCommonSystemProperties.EXTERNAL_CENTRAL_ACCESS_URL))
+ .thenReturn("Testurl");
+ ResponseEntity<String> addResponse = new ResponseEntity<>(HttpStatus.CREATED);
+ Mockito.when(template.exchange(Matchers.anyString(), Matchers.eq(HttpMethod.POST),
+ Matchers.<HttpEntity<String>>any(), Matchers.eq(String.class))).thenReturn(addResponse);
+
+ assertTrue(externalAccessRolesServiceImpl.addRole(role, uebKey));
+ }
+
+
+ @Test
+ public void addRoleMethodNotAllowedTest() throws Exception {
+ HttpHeaders headers = new HttpHeaders();
+ PowerMockito.mockStatic(EcompPortalUtils.class);
+ PowerMockito.mockStatic(SystemProperties.class);
+ PowerMockito.mockStatic(EPCommonSystemProperties.class);
+ Role role = new Role();
+ role.setId((long) 25);
+ EPApp app = mockApp();
+ app.setEnabled(true);
+ app.setId((long) 10);
+ app.setNameSpace("test_namesapce");
+ Mockito.when(EcompPortalUtils.base64encodeKeyForAAFBasicAuth()).thenReturn(headers);
+ List<EPApp> appList = new ArrayList<>();
+ appList.add(app);
+ List<EPRole> roleList = new ArrayList<>();
+ EPRole ePRole = new EPRole();
+ role.setName("Test Role");
+ roleList.add(ePRole);
+ Mockito.when(dataAccessService1.getList(EPApp.class, " where ueb_key = '" + uebKey + "'", null, null))
+ .thenReturn(appList);
+
+ Mockito.when(dataAccessService1.getList(EPRole.class, " where app_role_id = " + role.getId() + " and app_id ="+app.getId(), null, null)).thenReturn(roleList);
+// Mockito.when(dataAccessService1.getList(EPRole.class, " where app_role_id = " + role.getId(), null, null))
+// .thenReturn(roleList);
+ Mockito.when(SystemProperties.getProperty(EPCommonSystemProperties.EXTERNAL_CENTRAL_ACCESS_URL))
+ .thenReturn("Testurl");
+ ResponseEntity<String> addResponse = new ResponseEntity<>(HttpStatus.METHOD_NOT_ALLOWED);
+ Mockito.when(template.exchange(Matchers.anyString(), Matchers.eq(HttpMethod.POST),
+ Matchers.<HttpEntity<String>>any(), Matchers.eq(String.class))).thenReturn(addResponse);
+
+ assertFalse(externalAccessRolesServiceImpl.addRole(role, uebKey));
+ }
+
+ public EPApp getApp() {
+ EPApp app = new EPApp();
+ app.setName("Test");
+ app.setImageUrl("test");
+ app.setDescription("test");
+ app.setNotes("test");
+ app.setUrl("test");
+ app.setId((long) 1);
+ app.setAppRestEndpoint("test");
+ app.setAlternateUrl("test");
+ app.setName("test");
+ app.setMlAppName("test");
+ app.setMlAppAdminId("test");
+ app.setUsername("test");
+ app.setAppPassword("test");
+ app.setOpen(true);
+ app.setEnabled(false);
+ app.setUebKey("test");
+ app.setUebSecret("test");
+ app.setUebTopicName("test");
+ app.setAppType(1);
+ return app;
+ }
+
+ @Test
+ public void deleteCentralRoleFunctionTest() throws Exception {
+ final Map<String, String> params = new HashMap<>();
+ EPApp app = mockApp();
+ params.put("functionCode", "menu_fun_code");
+ params.put("appId", String.valueOf(10));
+ List<CentralRoleFunction> centralRoleFunctionList = new ArrayList<>();
+ CentralRoleFunction domainCentralRoleFunction = new CentralRoleFunction();
+ domainCentralRoleFunction.setCode("menu_fun_code");
+ centralRoleFunctionList.add(domainCentralRoleFunction);
+ Mockito.when(dataAccessService1.executeNamedQuery("getRoleFunction", params, null))
+ .thenReturn(centralRoleFunctionList);
+ ResponseEntity<String> addResponse = new ResponseEntity<>(HttpStatus.OK);
+ Mockito.when(template.exchange(Matchers.anyString(), Matchers.eq(HttpMethod.DELETE),
+ Matchers.<HttpEntity<String>>any(), Matchers.eq(String.class))).thenReturn(addResponse);
+ HttpHeaders headers = new HttpHeaders();
+ PowerMockito.mockStatic(EcompPortalUtils.class);
+ Mockito.when(EcompPortalUtils.base64encodeKeyForAAFBasicAuth()).thenReturn(headers);
+
+ Mockito.doNothing().when(dataAccessService1).deleteDomainObjects(EPAppRoleFunction.class,
+ "app_id = " + app.getId() + " and function_cd = '" + "menu_fun_code" + "'", null);
+
+ assertTrue(externalAccessRolesServiceImpl.deleteCentralRoleFunction("menu_fun_code", app));
+ }
+ @Test
+ public void deleteCentralRoleFunctionFailTest() throws Exception {
+ final Map<String, String> params = new HashMap<>();
+ EPApp app = mockApp();
+ params.put("functionCode", "menu_fun_code");
+ params.put("appId", String.valueOf(10));
+ List<CentralRoleFunction> centralRoleFunctionList = new ArrayList<>();
+ CentralRoleFunction domainCentralRoleFunction = new CentralRoleFunction();
+ domainCentralRoleFunction.setCode("menu_fun_code");
+ centralRoleFunctionList.add(domainCentralRoleFunction);
+ HttpClientErrorException httpClientErrorException = new HttpClientErrorException(HttpStatus.NOT_FOUND);
+ Mockito.when(dataAccessService1.executeNamedQuery("getRoleFunction", params, null))
+ .thenReturn(centralRoleFunctionList);
+ ResponseEntity<String> addResponse = new ResponseEntity<>(HttpStatus.NOT_FOUND);
+ Mockito.when(template.exchange(Matchers.anyString(), Matchers.eq(HttpMethod.DELETE),
+ Matchers.<HttpEntity<String>>any(), Matchers.eq(String.class))).thenThrow(httpClientErrorException);
+ HttpHeaders headers = new HttpHeaders();
+ PowerMockito.mockStatic(EcompPortalUtils.class);
+ Mockito.when(EcompPortalUtils.base64encodeKeyForAAFBasicAuth()).thenReturn(headers);
+
+ Mockito.doNothing().when(dataAccessService1).deleteDomainObjects(EPAppRoleFunction.class,
+ "app_id = " + app.getId() + " and function_cd = '" + "menu_fun_code" + "'", null);
+
+ assertTrue(externalAccessRolesServiceImpl.deleteCentralRoleFunction("menu_fun_code", app));
+ }
+
+ @Test
+ public void deleteCentralRoleFunctionExceptionTest() {
+ final Map<String, String> params = new HashMap<>();
+ EPApp app = mockApp();
+ params.put("functionCd", "menu_fun_code");
+ params.put("appId", String.valueOf(10));
+ List<CentralRoleFunction> centralRoleFunctionList = new ArrayList<>();
+ CentralRoleFunction domainCentralRoleFunction = new CentralRoleFunction();
+ domainCentralRoleFunction.setCode("menu_fun_code");
+ centralRoleFunctionList.add(domainCentralRoleFunction);
+ Mockito.when(dataAccessService1.executeNamedQuery("getAppFunctionDetails", params, null))
+ .thenThrow(nullPointerException);
+ assertFalse(externalAccessRolesServiceImpl.deleteCentralRoleFunction("menu_fun_code", app));
+ }
+
+ @Test
+ public void getUserTest() {
+ List<EPUser> userList = new ArrayList<>();
+ EPUser user = mockUser.mockEPUser();
+ userList.add(user);
+ Mockito.when(dataAccessService1.getList(EPUser.class, " where org_user_id = '" + "guestT" + "'", null, null))
+ .thenReturn(userList);
+ List<EPUser> expectedUserList = externalAccessRolesServiceImpl.getUser("guestT");
+ assertEquals(expectedUserList, userList);
+ }
+
+
+ public void saveCentralRoleFunctionTest() throws Exception {
+ CentralRoleFunction centralRoleFunction = new CentralRoleFunction();
+ centralRoleFunction.setCode("menu_test");
+ EPApp app = mockApp();
+ app.setId((long) 1);
+ final Map<String, String> params = new HashMap<>();
+ params.put("functionCd", "menu_test");
+ params.put("appId", String.valueOf(1));
+ PowerMockito.mockStatic(EcompPortalUtils.class);
+ HttpHeaders headers = new HttpHeaders();
+ Mockito.when(EcompPortalUtils.base64encodeKeyForAAFBasicAuth()).thenReturn(headers);
+ List<CentralRoleFunction> appRoleFunc = new ArrayList<>();
+ appRoleFunc.add(centralRoleFunction);
+ Mockito.when(dataAccessService1.executeNamedQuery("getAppFunctionDetails", params,
+ null)).thenReturn(appRoleFunc);
+ ResponseEntity<String> addResponse = new ResponseEntity<>(HttpStatus.OK);
+ Mockito.when(template.exchange(Matchers.anyString(), Matchers.eq(HttpMethod.GET),
+ Matchers.<HttpEntity<String>>any(), Matchers.eq(String.class))).thenReturn(addResponse);
+ }
+
+// @Test
+// public void getAllAppUsersIfAppIsPortalTest() throws Exception
+// {
+// List<EPApp> expectedapps = new ArrayList<>();
+// EPApp app = new EPApp();
+// app.setEnabled(true);
+// app.setId((long) 1);
+// expectedapps.add(app);
+// List<EPRole> applicationRoles = new ArrayList<>();
+// Mockito.when(dataAccessService1.getList(EPRole.class, "test", null, null)).thenReturn(applicationRoles);
+// Mockito.when(dataAccessService1.getList(EPApp.class, " where ueb_key = '" + uebKey + "'", null, null)).thenReturn(expectedapps);
+// externalAccessRolesServiceImpl.getAllAppUsers(uebKey);
+// }
+
+
+ @Test
+ public void getAllAppUsersTest() throws Exception
+ {
+ List<EPApp> expectedapps = new ArrayList<>();
+ EPApp app = new EPApp();
+ app.setEnabled(true);
+ app.setId((long) 10);
+ expectedapps.add(app);
+ List<EPRole> applicationRoles = new ArrayList<>();
+ Mockito.when(dataAccessService1.getList(EPRole.class, "test", null, null)).thenReturn(applicationRoles);
+ Mockito.when(dataAccessService1.getList(EPApp.class, " where ueb_key = '" + uebKey + "'", null, null)).thenReturn(expectedapps);
+ final Map<String, Long> appParams = new HashMap<>();
+ appParams.put("appId", app.getId());
+ List<EcompUserRoles> userList = new ArrayList<>();
+ EcompUserRoles ecompUserRoles = new EcompUserRoles();
+ ecompUserRoles.setOrgUserId("guestT");
+ ecompUserRoles.setRoleId((long) 1);
+ ecompUserRoles.setRoleName("test");
+
+ EcompUserRoles ecompUserRoles2 = new EcompUserRoles();
+ ecompUserRoles2.setOrgUserId("guestT");
+ ecompUserRoles2.setRoleId((long) 2);
+ ecompUserRoles2.setRoleName("test new");
+ userList.add(ecompUserRoles);
+ userList.add(ecompUserRoles2);
+
+ Mockito.when(dataAccessService1.executeNamedQuery("ApplicationUserRoles", appParams, null)).thenReturn(userList);
+ List<EcompUser> usersfinalList = externalAccessRolesServiceImpl.getAllAppUsers(uebKey);
+ assertEquals(usersfinalList.get(0).getRoles().size(), 2);
+ }
+
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/FunctionalMenuMockServiceImplTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/FunctionalMenuMockServiceImplTest.java
new file mode 100644
index 00000000..77988aae
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/FunctionalMenuMockServiceImplTest.java
@@ -0,0 +1,204 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.service;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.domain.FunctionalMenuItemWithAppID;
+import org.openecomp.portalapp.portal.service.FunctionalMenuService;
+import org.openecomp.portalapp.portal.service.FunctionalMenuServiceImpl;
+import org.openecomp.portalapp.portal.transport.FavoritesFunctionalMenuItemJson;
+import org.openecomp.portalapp.portal.transport.FunctionalMenuItem;
+import org.openecomp.portalapp.portal.transport.FunctionalMenuRole;
+import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;
+import org.openecomp.portalsdk.core.service.DataAccessService;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest({SystemProperties.class, EPCommonSystemProperties.class})
+public class FunctionalMenuMockServiceImplTest {
+
+ @Mock
+ FunctionalMenuService functionalMenuService;
+
+ @Mock
+ DataAccessService dataAccessService;
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ @InjectMocks
+ FunctionalMenuServiceImpl functionalMenuServiceImpl= new FunctionalMenuServiceImpl();
+
+ @Test
+ public void assignHelpURLsTest(){
+ List<FunctionalMenuItem> menuItems = new ArrayList<FunctionalMenuItem>();
+ FunctionalMenuItem functionalMenuItem1 = new FunctionalMenuItem();
+ functionalMenuItem1.text = "Contact Us";
+ FunctionalMenuItem functionalMenuItem2 = new FunctionalMenuItem();
+ functionalMenuItem2.text = "Get Access";
+ FunctionalMenuItem functionalMenuItem3 = new FunctionalMenuItem();
+ functionalMenuItem3.text = "User Guide";
+ menuItems.add(functionalMenuItem1);
+ menuItems.add(functionalMenuItem2);
+ menuItems.add(functionalMenuItem3);
+
+ PowerMockito.mockStatic(SystemProperties.class);
+ Mockito.when(SystemProperties.getProperty(EPCommonSystemProperties.USER_GUIDE_URL)).thenReturn("http://todo_enter_user_guide_link");
+// Mockito.doNothing().when(functionalMenuServiceImpl).assignHelpURLs(menuItems);
+ functionalMenuServiceImpl.assignHelpURLs(menuItems);
+ }
+
+ @Test
+ public void getFunctionalMenuItemsTest(){
+ String sql = "SELECT m.menu_id, m.column_num, m.text, m.parent_menu_id, m.url, m.active_yn, r.app_id FROM fn_menu_functional m, "
+ + "fn_menu_functional_roles r WHERE m.menu_id = r.menu_id AND UPPER(m.active_yn) = 'Y' AND r.role_id != '900' "
+ + "UNION SELECT m.menu_id, m.column_num, m.text, m.parent_menu_id, m.url, m.active_yn,-1 app_id FROM fn_menu_functional m "
+ + "WHERE m.url='' AND UPPER(m.active_yn) = 'Y'";
+ List<FunctionalMenuItem> actualResult = new ArrayList<FunctionalMenuItem>();
+ List<FunctionalMenuItem> expectedResult = new ArrayList<FunctionalMenuItem>();
+
+ Mockito.when(dataAccessService.executeSQLQuery(sql, FunctionalMenuItemWithAppID.class, null)).thenReturn(expectedResult);
+
+ actualResult = functionalMenuServiceImpl.getFunctionalMenuItems(true);
+ assertEquals(actualResult, expectedResult);
+ }
+
+ @Test
+ public void getFunctionalMenuItemsNegativeTest(){
+ String sql = "SELECT m.menu_id, m.column_num, m.text, m.parent_menu_id, m.url, m.active_yn, r.app_id FROM fn_menu_functional m, "
+ + "fn_menu_functional_roles r WHERE m.menu_id = r.menu_id AND UPPER(m.active_yn) = 'Y' AND r.role_id != '900' "
+ + "UNION SELECT m.menu_id, m.column_num, m.text, m.parent_menu_id, m.url, m.active_yn,-1 app_id FROM fn_menu_functional m "
+ + "WHERE m.url='' AND UPPER(m.active_yn) = 'Y'";
+ List<FunctionalMenuItem> actualResult = new ArrayList<FunctionalMenuItem>();
+ List<FunctionalMenuItem> expectedResult = new ArrayList<FunctionalMenuItem>();
+
+ Mockito.when(dataAccessService.executeSQLQuery(sql, FunctionalMenuItemWithAppID.class, null)).thenReturn(expectedResult);
+
+ actualResult = functionalMenuServiceImpl.getFunctionalMenuItems(false);
+ assertEquals(actualResult, expectedResult);
+ }
+
+ @Test
+ public void getFunctionalMenuItemsForNotificationTreeTest(){
+ String sql = "SELECT m.menu_id, m.column_num, m.text, m.parent_menu_id, m.url, m.active_yn, r.app_id FROM fn_menu_functional m, fn_menu_functional_roles r "
+ + "WHERE m.menu_id = r.menu_id AND UPPER(m.active_yn) = 'Y' AND r.role_id != '900' UNION SELECT m.menu_id, m.column_num, m.text, m.parent_menu_id,"
+ + " m.url, m.active_yn,-1 app_id FROM fn_menu_functional m WHERE m.url='' AND UPPER(m.active_yn) = 'Y'";
+ List<FunctionalMenuItem> actualResult = new ArrayList<FunctionalMenuItem>();
+ List<FunctionalMenuItem> expectedResult = new ArrayList<FunctionalMenuItem>();
+
+ Mockito.when(dataAccessService.executeSQLQuery(sql, FunctionalMenuItemWithAppID.class, null)).thenReturn(expectedResult);
+
+ actualResult = functionalMenuServiceImpl.getFunctionalMenuItemsForNotificationTree(true);
+ assertEquals(actualResult, expectedResult);
+
+ }
+
+ @Test
+ public void getFunctionalMenuItemsForNotificationNegativeTreeTest(){
+ String sql = "SELECT m.menu_id, m.column_num, m.text, m.parent_menu_id, m.url, m.active_yn, r.app_id FROM fn_menu_functional m, fn_menu_functional_roles r "
+ + "WHERE m.menu_id = r.menu_id AND UPPER(m.active_yn) = 'Y' AND r.role_id != '900' UNION SELECT m.menu_id, m.column_num, m.text, m.parent_menu_id,"
+ + " m.url, m.active_yn,-1 app_id FROM fn_menu_functional m WHERE m.url='' AND UPPER(m.active_yn) = 'Y'";
+ List<FunctionalMenuItem> actualResult = new ArrayList<FunctionalMenuItem>();
+ List<FunctionalMenuItem> expectedResult = new ArrayList<FunctionalMenuItem>();
+
+ Mockito.when(dataAccessService.executeSQLQuery(sql, FunctionalMenuItemWithAppID.class, null)).thenReturn(expectedResult);
+
+ actualResult = functionalMenuServiceImpl.getFunctionalMenuItemsForNotificationTree(false);
+ assertEquals(actualResult, expectedResult);
+ }
+
+ @Test
+ public void getFunctionalMenuItemsForAppTest(){
+ String sql = "SELECT DISTINCT m1.menu_id, m1.column_num, m1.text, m1.parent_menu_id, m1.url, m.active_yn "
+ + "FROM fn_menu_functional m, fn_menu_functional m1, fn_menu_functional_ancestors a, fn_menu_functional_roles mr "
+ + "WHERE mr.app_id='1' AND mr.menu_id = m.menu_id AND UPPER(m.active_yn) = 'Y' AND UPPER(m1.active_yn) ='Y' AND a.menu_id = m.menu_id "
+ + "AND a.ancestor_menu_id = m1.menu_id";
+ Integer appId = 1;
+ List<FunctionalMenuItem> actualResult = new ArrayList<FunctionalMenuItem>();
+ List<FunctionalMenuItem> expectedResult = new ArrayList<FunctionalMenuItem>();
+
+ Mockito.when(dataAccessService.executeSQLQuery(sql, FunctionalMenuItemWithAppID.class, null)).thenReturn(expectedResult);
+
+ actualResult = functionalMenuServiceImpl.getFunctionalMenuItemsForApp(appId);
+ assertEquals(actualResult, expectedResult);
+ }
+
+ @Test
+ public void getFunctionalMenuItemsForUserTest(){
+ String orgUserId = "test";
+ String sql = "SELECT DISTINCT m1.menu_id, m1.column_num, m1.text, m1.parent_menu_id, m1.url, m.active_yn "
+ + "FROM fn_menu_functional m, fn_menu_functional m1, fn_menu_functional_ancestors a, fn_menu_functional_roles mr, fn_user u , fn_user_role ur "
+ + "WHERE u.org_user_id='test' AND u.user_id = ur.user_id AND ur.app_id = mr.app_id AND (ur.role_id = mr.role_id OR ur.role_id = '999') "
+ + "AND m.menu_id = mr.menu_id AND UPPER(m.active_yn) = 'Y' AND UPPER(m1.active_yn) ='Y' AND a.menu_id = m.menu_id "
+ + "AND a.ancestor_menu_id = m1.menu_id UNION select m1.menu_id, m1.column_num, m1.text, m1.parent_menu_id, m1.url, m1.active_yn "
+ + "FROM fn_menu_functional m, fn_menu_functional_roles mr, fn_menu_functional m1, fn_menu_functional_ancestors a where a.menu_id = m.menu_id AND a.ancestor_menu_id = m1.menu_id AND m.menu_id != m1.menu_id AND m.menu_id = mr.menu_id AND mr.role_id = '900' AND UPPER(m.active_yn) = 'Y' AND UPPER(m1.active_yn) ='Y' UNION SELECT m.menu_id, m.column_num, m.text, m.parent_menu_id, m.url, m.active_yn FROM fn_menu_functional m WHERE m.text in ('Favorites','Get Access','Contact Us','Support','User Guide','Help')";
+ List<FunctionalMenuItem> actualResult = new ArrayList<FunctionalMenuItem>();
+ List<FunctionalMenuItem> expectedResult = new ArrayList<FunctionalMenuItem>();
+
+ Mockito.when(dataAccessService.executeSQLQuery(sql, FunctionalMenuItemWithAppID.class, null)).thenReturn(expectedResult);
+
+ actualResult = functionalMenuServiceImpl.getFunctionalMenuItemsForUser(orgUserId);
+ assertEquals(actualResult, expectedResult);
+ }
+
+ @Test
+ public void getFunctionalMenuItemDetailsTest(){
+ Integer menuid = 1;
+ String sql = "SELECT * FROM fn_menu_functional_roles WHERE menu_id = '1'";
+ FunctionalMenuItem actualResult = null;
+ FunctionalMenuItem expectedResult = null;
+ List<FunctionalMenuRole> roleItems = new ArrayList<FunctionalMenuRole>();
+ Mockito.when(dataAccessService.executeSQLQuery(sql, FunctionalMenuItemWithAppID.class, null)).thenReturn(roleItems);
+
+ actualResult = functionalMenuServiceImpl.getFunctionalMenuItemDetails(menuid);
+ assertEquals(actualResult, expectedResult);
+ }
+
+ @Test
+ public void getFavoriteItemsTest(){
+ Long userId = (long)1;
+ String sql = "SELECT DISTINCT f.user_id,f.menu_id,m.text,m.url "
+ + "FROM fn_menu_favorites f, fn_menu_functional m, fn_menu_functional_roles mr "
+ + "WHERE f.user_id='1' AND f.menu_id = m.menu_id AND f.menu_id = mr.menu_id AND mr.role_id != '900' ";
+ List<FavoritesFunctionalMenuItemJson> actualResult = new ArrayList<FavoritesFunctionalMenuItemJson>();
+ List<FavoritesFunctionalMenuItemJson> expectedResult = new ArrayList<FavoritesFunctionalMenuItemJson>();
+
+ Mockito.when(dataAccessService.executeSQLQuery(sql, FavoritesFunctionalMenuItemJson.class, null)).thenReturn(expectedResult);
+
+ actualResult = functionalMenuServiceImpl.getFavoriteItems(userId);
+ assertEquals(actualResult, expectedResult);
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/FunctionalMenuServiceImplTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/FunctionalMenuServiceImplTest.java
new file mode 100644
index 00000000..71bf067b
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/FunctionalMenuServiceImplTest.java
@@ -0,0 +1,73 @@
+///*-
+// * ================================================================================
+// * ECOMP Portal
+// * ================================================================================
+// * Copyright (C) 2017 AT&T Intellectual Property
+// * ================================================================================
+// * Licensed under the Apache License, Version 2.0 (the "License");
+// * you may not use this file except in compliance with the License.
+// * You may obtain a copy of the License at
+// *
+// * http://www.apache.org/licenses/LICENSE-2.0
+// *
+// * Unless required by applicable law or agreed to in writing, software
+// * distributed under the License is distributed on an "AS IS" BASIS,
+// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// * See the License for the specific language governing permissions and
+// * limitations under the License.
+// * ================================================================================
+// */
+//package org.openecomp.portalapp.portal.test.service;
+//
+//import static org.junit.Assert.assertTrue;
+//
+//import java.util.ArrayList;
+//import java.util.HashMap;
+//import java.util.List;
+//import java.util.Map;
+//
+//import org.junit.Test;
+//import org.openecomp.portalapp.portal.service.FunctionalMenuService;
+//import org.openecomp.portalapp.portal.transport.BusinessCardApplicationRole;
+//import org.openecomp.portalapp.portal.transport.FunctionalMenuRole;
+//import org.openecomp.portalapp.test.framework.ApplicationCommonContextTestSuite;
+//import org.springframework.beans.factory.annotation.Autowired;
+//
+//public class FunctionalMenuServiceImplTest extends ApplicationCommonContextTestSuite {
+//
+// @Autowired
+// FunctionalMenuService functionalMenuService;
+//
+// @Test
+// public void getAppListTestService() throws Exception {
+//
+// String userId = "guestT";
+// List<BusinessCardApplicationRole> userAppRolesActualResult = null;
+//
+// List<BusinessCardApplicationRole> userAppRolesExpectedResult = new ArrayList<BusinessCardApplicationRole>();
+// BusinessCardApplicationRole businessCardApplicationRole = new BusinessCardApplicationRole();
+// businessCardApplicationRole.setAppName("ECOMP Portal");
+// businessCardApplicationRole.setRoleName("System Administrator");
+// userAppRolesExpectedResult.add(businessCardApplicationRole);
+// Map<String, String> params = new HashMap<String, String>();
+// params.put("userId", userId);
+// userAppRolesActualResult = functionalMenuService.getUserAppRolesList(userId);
+// assertTrue(userAppRolesActualResult.contains(businessCardApplicationRole));
+//
+// }
+//
+// @Test
+// public void getFunctionalMenuRoleTest() throws Exception {
+//
+// FunctionalMenuRole expectedFunctionalMenuRole = new FunctionalMenuRole();
+// expectedFunctionalMenuRole.setId(new Integer(-1));
+//
+// expectedFunctionalMenuRole.setMenuId((long) 137);
+// expectedFunctionalMenuRole.setAppId(new Integer(456));
+// expectedFunctionalMenuRole.setRoleId(new Integer(6214));
+// List<FunctionalMenuRole> actualFunctionalMenuRoleList = null;
+// actualFunctionalMenuRoleList = functionalMenuService.getFunctionalMenuRole();
+// assertTrue(actualFunctionalMenuRoleList.contains(expectedFunctionalMenuRole));
+//
+// }
+//}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/GetAccessServiceImplTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/GetAccessServiceImplTest.java
new file mode 100644
index 00000000..84096f13
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/GetAccessServiceImplTest.java
@@ -0,0 +1,50 @@
+package org.openecomp.portalapp.portal.service;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.domain.GetAccessResult;
+import org.openecomp.portalapp.portal.service.GetAccessServiceImpl;
+import org.openecomp.portalapp.portal.core.MockEPUser;
+import org.openecomp.portalsdk.core.service.DataAccessService;
+import org.openecomp.portalsdk.core.service.DataAccessServiceImpl;
+
+public class GetAccessServiceImplTest {
+
+
+ @Mock
+ DataAccessService dataAccessService = new DataAccessServiceImpl();
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ @InjectMocks
+ GetAccessServiceImpl getAccessServiceImpl = new GetAccessServiceImpl();
+
+ MockEPUser mockUser = new MockEPUser();
+
+ @Test
+ public void getAppAccessListTest()
+ {
+ EPUser user = mockUser.mockEPUser();
+ Map<String, Long> params = new HashMap<>();
+ params.put("userId", user.getId());
+ List<GetAccessResult> appAccessList = new ArrayList<>();
+ Mockito.when(dataAccessService.executeNamedQuery("getAppAccessFunctionRole", params, null)).thenReturn(appAccessList);
+
+ List<GetAccessResult> expectedAppAccessList = getAccessServiceImpl.getAppAccessList(user);
+ assertEquals(expectedAppAccessList, appAccessList);
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/LicenseableClassImplTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/LicenseableClassImplTest.java
new file mode 100644
index 00000000..d04355d2
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/LicenseableClassImplTest.java
@@ -0,0 +1,61 @@
+package org.openecomp.portalapp.portal.service;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
+import java.io.IOException;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.lm.LicenseableClassImpl;
+
+public class LicenseableClassImplTest {
+
+ @InjectMocks
+ LicenseableClassImpl licenseableClassImpl= new LicenseableClassImpl();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ @Test
+ public void getApplicationNameTest()
+ {
+ assertEquals(licenseableClassImpl.getApplicationName(), "");
+ }
+ @Test
+ public void getPublicKeystoreAsInputStreamTest() throws IOException
+ {
+ assertNull(licenseableClassImpl.getPublicKeystoreAsInputStream());
+ }
+ @Test
+ public void getAliasTest()
+ {
+ assertEquals(licenseableClassImpl.getAlias(), "");
+ }
+ @Test
+ public void getKeyPasswdTest()
+ {
+ assertEquals(licenseableClassImpl.getKeyPasswd(), "");
+ }
+ @Test
+ public void getPublicKeystorePasswordTest()
+ {
+ assertEquals(licenseableClassImpl.getPublicKeystorePassword(), "");
+ }
+ @Test
+ public void getCipherParamPasswordTest()
+ {
+ assertEquals(licenseableClassImpl.getPublicKeystorePassword(), "");
+ }
+ @Test
+ public void getClassToLicenseTest()
+ {
+ assertEquals(licenseableClassImpl.getClassToLicense(), LicenseableClassImpl.class);
+ }
+
+
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/ManifestServiceImplTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/ManifestServiceImplTest.java
new file mode 100644
index 00000000..1c09a49d
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/ManifestServiceImplTest.java
@@ -0,0 +1,55 @@
+package org.openecomp.portalapp.portal.service;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.jar.Attributes;
+
+import javax.servlet.ServletContext;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.service.ManifestServiceImpl;
+
+public class ManifestServiceImplTest {
+
+ @Mock
+ ServletContext context;
+
+ @Mock
+ ServletContext context1 = null;
+
+ @InjectMocks
+ ManifestServiceImpl manifestServiceImpl = new ManifestServiceImpl();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ NullPointerException nullPointerException = new NullPointerException();
+
+ @Test
+ public void getWebappManifestTest() throws IOException {
+ final String MANIFEST_RESOURCE_PATH = "/META-INF/MANIFEST.MF";
+ InputStream inputStream = new ByteArrayInputStream("test data".getBytes());
+ Mockito.when(context.getResourceAsStream(MANIFEST_RESOURCE_PATH)).thenReturn(inputStream);
+ Attributes attributes = manifestServiceImpl.getWebappManifest();
+ assertTrue(attributes.size() == 0);
+ }
+
+ @Test(expected = java.lang.NullPointerException.class)
+ public void getWebappManifestExceptionTest() throws IOException {
+ final String MANIFEST_RESOURCE_PATH = "/META-INF/MANIFEST.MF";
+ InputStream inputStream = new ByteArrayInputStream("test data".getBytes());
+ Mockito.when(context1.getResourceAsStream(MANIFEST_RESOURCE_PATH)).thenThrow(nullPointerException);
+ Attributes attributes = manifestServiceImpl.getWebappManifest();
+ assertTrue(attributes.size() == 0);
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/PersUserAppServiceImplTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/PersUserAppServiceImplTest.java
new file mode 100644
index 00000000..7155e146
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/service/PersUserAppServiceImplTest.java
@@ -0,0 +1,181 @@
+package org.openecomp.portalapp.portal.service;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.domain.EPApp;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.domain.EPUserApp;
+import org.openecomp.portalapp.portal.domain.PersUserAppSelection;
+import org.openecomp.portalapp.portal.service.AdminRolesService;
+import org.openecomp.portalapp.portal.service.PersUserAppServiceImpl;
+import org.openecomp.portalapp.portal.service.UserRolesService;
+import org.openecomp.portalapp.portal.core.MockEPUser;
+import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
+import org.openecomp.portalsdk.core.service.DataAccessService;
+
+public class PersUserAppServiceImplTest {
+
+ @Mock
+ DataAccessService dataAccessService;
+ @Mock
+ AdminRolesService adminRolesService;
+ @Mock
+ UserRolesService userRolesService;
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ @InjectMocks
+ PersUserAppServiceImpl persUserAppServiceImpl = new PersUserAppServiceImpl();
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+ NullPointerException nullPointerException = new NullPointerException();
+ MockEPUser mockUser = new MockEPUser();
+
+ public EPApp getApp() {
+ EPApp app = new EPApp();
+ app.setName("Test");
+ app.setImageUrl("test");
+ app.setDescription("test");
+ app.setNotes("test");
+ app.setUrl("test");
+ app.setId((long) 1);
+ app.setAppRestEndpoint("test");
+ app.setAlternateUrl("test");
+ app.setName("test");
+ app.setMlAppName("test");
+ app.setMlAppAdminId("test");
+ app.setUsername("test");
+ app.setAppPassword("test");
+ app.setOpen(true);
+ app.setEnabled(false);
+ app.setUebKey("test");
+ app.setUebSecret("test");
+ app.setUebTopicName("test");
+ app.setAppType(1);
+ return app;
+ }
+
+ @Test(expected = IllegalArgumentException.class)
+ public void setPersUserAppValueIfUserNull() {
+ persUserAppServiceImpl.setPersUserAppValue(null, null, false, false);
+ }
+
+ @Test
+ public void setPersUserAppValueTest() {
+ EPApp app = getApp();
+ EPUser user = mockUser.mockEPUser();
+ List<PersUserAppSelection> persUserAppSelectionList = new ArrayList<>();
+ PersUserAppSelection persUserAppSelection = new PersUserAppSelection();
+ persUserAppSelection.setId((long) 1);
+ persUserAppSelectionList.add(persUserAppSelection);
+ Mockito.when(dataAccessService.getList(PersUserAppSelection.class, "test", null, null))
+ .thenReturn(persUserAppSelectionList);
+ Mockito.doNothing().when(dataAccessService).deleteDomainObject(persUserAppSelection, null);
+ persUserAppServiceImpl.setPersUserAppValue(user, app, false, true);
+ }
+
+ @Test
+ public void setPersUserAppValueIfSelectTest() {
+ EPApp app = getApp();
+ EPUser user = mockUser.mockEPUser();
+ List<PersUserAppSelection> persUserAppSelectionList = new ArrayList<>();
+ PersUserAppSelection persUserAppSelection = new PersUserAppSelection();
+ persUserAppSelection.setId((long) 1);
+ persUserAppSelectionList.add(persUserAppSelection);
+ Mockito.when(dataAccessService.getList(PersUserAppSelection.class, "test", null, null))
+ .thenReturn(persUserAppSelectionList);
+ Mockito.doNothing().when(dataAccessService).saveDomainObject(persUserAppSelection, null);
+ persUserAppServiceImpl.setPersUserAppValue(user, app, true, true);
+ }
+
+ @Test
+ public void setPersUserAppValueIfOpenTest() {
+ EPApp app = getApp();
+ app.setOpen(false);
+ EPUser user = mockUser.mockEPUser();
+ List<PersUserAppSelection> persUserAppSelectionList = new ArrayList<>();
+ PersUserAppSelection persUserAppSelection = new PersUserAppSelection();
+ persUserAppSelection.setId((long) 1);
+ persUserAppSelectionList.add(persUserAppSelection);
+ Mockito.when(dataAccessService.getList(PersUserAppSelection.class, "test", null, null))
+ .thenReturn(persUserAppSelectionList);
+ Mockito.doNothing().when(dataAccessService).saveDomainObject(persUserAppSelection, null);
+ persUserAppServiceImpl.setPersUserAppValue(user, app, true, true);
+ }
+
+ @Test
+ public void setPersUserAppValueIfAppNotOpenTest() {
+ EPApp app = getApp();
+ app.setOpen(false);
+ EPUser user = mockUser.mockEPUser();
+ List<PersUserAppSelection> persUserAppSelectionList = new ArrayList<>();
+ PersUserAppSelection persUserAppSelection = new PersUserAppSelection();
+ persUserAppSelection.setId((long) 1);
+ persUserAppSelectionList.add(persUserAppSelection);
+ Mockito.when(dataAccessService.getList(PersUserAppSelection.class, "test", null, null))
+ .thenReturn(persUserAppSelectionList);
+ Mockito.doNothing().when(dataAccessService).saveDomainObject(persUserAppSelection, null);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ List<EPUserApp> roles = new ArrayList<>();
+ EPUserApp epUserApp = new EPUserApp();
+ roles.add(epUserApp);
+ Mockito.when(userRolesService.getCachedAppRolesForUser(app.getId(), user.getId())).thenReturn(roles);
+ persUserAppServiceImpl.setPersUserAppValue(user, app, true, false);
+ }
+
+ @Test
+ public void setPersUserAppValueIfNotPortalAdminTest() {
+ EPApp app = getApp();
+ app.setOpen(false);
+ EPUser user = mockUser.mockEPUser();
+ List<PersUserAppSelection> persUserAppSelectionList = new ArrayList<>();
+ PersUserAppSelection persUserAppSelection = new PersUserAppSelection();
+ persUserAppSelection.setId((long) 1);
+ persUserAppSelectionList.add(persUserAppSelection);
+ Mockito.when(dataAccessService.getList(PersUserAppSelection.class, "test", null, null))
+ .thenReturn(persUserAppSelectionList);
+ Mockito.doNothing().when(dataAccessService).deleteDomainObject(persUserAppSelection, null);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+ List<EPUserApp> roles = new ArrayList<>();
+ EPUserApp epUserApp = new EPUserApp();
+ roles.add(epUserApp);
+ Mockito.when(userRolesService.getCachedAppRolesForUser(app.getId(), user.getId())).thenReturn(roles);
+ persUserAppServiceImpl.setPersUserAppValue(user, app, true, false);
+ }
+
+ @Test
+ public void setPersUserAppValueNewTest() {
+ EPApp app = getApp();
+ app.setOpen(false);
+ EPUser user = mockUser.mockEPUser();
+ List<PersUserAppSelection> persUserAppSelectionList = new ArrayList<>();
+ PersUserAppSelection persUserAppSelection = new PersUserAppSelection();
+ persUserAppSelection.setId((long) 1);
+ persUserAppSelectionList.add(persUserAppSelection);
+ Mockito.when(dataAccessService.getList(PersUserAppSelection.class, "test", null, null))
+ .thenReturn(persUserAppSelectionList);
+ Mockito.doNothing().when(dataAccessService).saveDomainObject(persUserAppSelection, null);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ List<EPUserApp> roles = new ArrayList<>();
+ EPUserApp epUserApp = new EPUserApp();
+ roles.add(epUserApp);
+ Mockito.when(userRolesService.getCachedAppRolesForUser(app.getId(), user.getId())).thenReturn(roles);
+ persUserAppServiceImpl.setPersUserAppValue(user, app, false, false);
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/AnalyticsTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/AnalyticsTest.java
new file mode 100644
index 00000000..7fd3c03f
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/AnalyticsTest.java
@@ -0,0 +1,33 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.Analytics;
+
+public class AnalyticsTest {
+
+ public Analytics mockAnalytics(){
+ Analytics analytics = new Analytics();
+
+ analytics.setAction("test");
+ analytics.setPage("test");
+ analytics.setFunction("test");
+ analytics.setUserid("test");
+ analytics.setType("test");
+
+ return analytics;
+ }
+
+ @Test
+ public void analyticsTest(){
+ Analytics analytics = mockAnalytics();
+
+ assertEquals(analytics.getAction(), "test");
+ assertEquals(analytics.getPage(), "test");
+ assertEquals(analytics.getFunction(), "test");
+ assertEquals(analytics.getUserid(), "test");
+ assertEquals(analytics.getType(), "test");
+
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/AppCatalogPersonalizationTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/AppCatalogPersonalizationTest.java
new file mode 100644
index 00000000..c583c9cd
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/AppCatalogPersonalizationTest.java
@@ -0,0 +1,25 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+public class AppCatalogPersonalizationTest {
+
+ public AppCatalogPersonalization mockAppCatalogPersonalization(){
+ AppCatalogPersonalization appCatalogPersonalization = new AppCatalogPersonalization();
+
+ return appCatalogPersonalization;
+ }
+
+ @Test
+ public void appCatalogPersonalizationTest(){
+ AppCatalogPersonalization appCatalogPersonalization = mockAppCatalogPersonalization();
+
+ AppCatalogPersonalization appCatalogPersonalization1 = new AppCatalogPersonalization();
+
+ assertEquals(appCatalogPersonalization.hashCode(), appCatalogPersonalization1.hashCode());
+ assertTrue(appCatalogPersonalization.equals(appCatalogPersonalization1));
+ }
+
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/AppNameIdIsAdminTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/AppNameIdIsAdminTest.java
new file mode 100644
index 00000000..a1dffd28
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/AppNameIdIsAdminTest.java
@@ -0,0 +1,38 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.AppNameIdIsAdmin;
+
+public class AppNameIdIsAdminTest {
+
+ public AppNameIdIsAdmin mockAppNameIdIsAdmin(){
+ AppNameIdIsAdmin appNameIdIsAdmin = new AppNameIdIsAdmin();
+ appNameIdIsAdmin.setId((long)1);
+ appNameIdIsAdmin.setAppName("test");
+ appNameIdIsAdmin.setRestrictedApp(false);
+ appNameIdIsAdmin.setIsAdmin(false);
+ return appNameIdIsAdmin;
+ }
+
+ @Test
+ public void appNameIdIsAdminTest(){
+ AppNameIdIsAdmin appNameIdIsAdmin = mockAppNameIdIsAdmin();
+
+ AppNameIdIsAdmin appNameIdIsAdmin1 = new AppNameIdIsAdmin();
+ appNameIdIsAdmin1.setId((long)1);
+ appNameIdIsAdmin1.setAppName("test");
+ appNameIdIsAdmin1.setRestrictedApp(false);
+ appNameIdIsAdmin1.setIsAdmin(false);
+
+ assertEquals(appNameIdIsAdmin.getId(), new Long(1));
+ assertEquals(appNameIdIsAdmin.getAppName(), "test");
+ assertEquals(appNameIdIsAdmin.getRestrictedApp(), false);
+ assertEquals(appNameIdIsAdmin.getIsAdmin(), false);
+
+ assertEquals(appNameIdIsAdmin.toString(), "AppNameIdIsAdmin [id=1, appName=test, isAdmin=false, restrictedApp=false]");
+ assertEquals(appNameIdIsAdmin.hashCode(), appNameIdIsAdmin1.hashCode());
+ assertTrue(appNameIdIsAdmin.equals(appNameIdIsAdmin1));
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/AppWithRolesForUserTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/AppWithRolesForUserTest.java
new file mode 100644
index 00000000..2a7c343c
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/AppWithRolesForUserTest.java
@@ -0,0 +1,32 @@
+package org.openecomp.portalapp.portal.transport;
+
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import org.openecomp.portalapp.portal.transport.AppWithRolesForUser;
+
+public class AppWithRolesForUserTest {
+
+ public AppWithRolesForUser mockAppWithRolesForUser(){
+ AppWithRolesForUser appWithRolesForUser = new AppWithRolesForUser();
+
+ // List<RoleInAppForUser> appRoles = new ArrayList<RoleInAppForUser>();
+
+ appWithRolesForUser.setOrgUserId("test");
+ appWithRolesForUser.setAppId((long)1);
+ appWithRolesForUser.setAppName("test");
+ appWithRolesForUser.setAppRoles(null);
+
+ return appWithRolesForUser;
+ }
+
+ @Test
+ public void roleInAppForUserTest(){
+ AppWithRolesForUser appWithRolesForUser = mockAppWithRolesForUser();
+
+ assertEquals(appWithRolesForUser.getOrgUserId(), "test");
+ assertEquals(appWithRolesForUser.getAppId(), new Long(1));
+ assertEquals(appWithRolesForUser.getAppName(), "test");
+ assertEquals(appWithRolesForUser.getAppRoles(), null);
+ assertEquals(appWithRolesForUser.toString(), "AppWithRolesForUser [orgUserId=test, appId=1, appName=test, appRoles=null]");
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/AppsListWithAdminRoleTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/AppsListWithAdminRoleTest.java
new file mode 100644
index 00000000..2c601d3c
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/AppsListWithAdminRoleTest.java
@@ -0,0 +1,46 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.*;
+
+import java.util.ArrayList;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.AppNameIdIsAdmin;
+import org.openecomp.portalapp.portal.transport.AppsListWithAdminRole;
+
+public class AppsListWithAdminRoleTest {
+
+ public AppsListWithAdminRole mockAppsListWithAdminRole(){
+ AppsListWithAdminRole appsListWithAdminRole = new AppsListWithAdminRole();
+
+ ArrayList<AppNameIdIsAdmin> appsRoles = new ArrayList<AppNameIdIsAdmin>();
+ AppNameIdIsAdmin appNameIdIsAdmin = new AppNameIdIsAdmin();
+ appsRoles.add(appNameIdIsAdmin);
+
+ appsListWithAdminRole.setOrgUserId("test");
+ appsListWithAdminRole.setAppsRoles(appsRoles);
+
+ return appsListWithAdminRole;
+ }
+
+ @Test
+ public void appsListWithAdminRoleTest(){
+ AppsListWithAdminRole appsListWithAdminRole = mockAppsListWithAdminRole();
+
+ AppsListWithAdminRole appsListWithAdminRole1 = new AppsListWithAdminRole();
+
+ ArrayList<AppNameIdIsAdmin> appsRoles = new ArrayList<AppNameIdIsAdmin>();
+ AppNameIdIsAdmin appNameIdIsAdmin = new AppNameIdIsAdmin();
+ appsRoles.add(appNameIdIsAdmin);
+
+ appsListWithAdminRole1.setOrgUserId("test");
+ appsListWithAdminRole1.setAppsRoles(appsRoles);
+
+ assertEquals(appsListWithAdminRole.getOrgUserId(), "test");
+ assertEquals(appsListWithAdminRole.getAppsRoles(), appsRoles);
+
+ assertTrue(appsListWithAdminRole.equals(appsListWithAdminRole1));
+ assertEquals(appsListWithAdminRole.hashCode(), appsListWithAdminRole1.hashCode());
+ assertEquals(appsListWithAdminRole.toString(), "AppsListWithAdminRole [orgUserId=test, appsRoles=[AppNameIdIsAdmin [id=null, appName=null, isAdmin=null, restrictedApp=null]]]");
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/BulkUploadRoleFunctionTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/BulkUploadRoleFunctionTest.java
new file mode 100644
index 00000000..854afccc
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/BulkUploadRoleFunctionTest.java
@@ -0,0 +1,35 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.BulkUploadRoleFunction;
+
+public class BulkUploadRoleFunctionTest {
+
+ public BulkUploadRoleFunction mockBulkUploadRoleFunction(){
+
+ BulkUploadRoleFunction bulkUploadRoleFunction = new BulkUploadRoleFunction();
+
+ bulkUploadRoleFunction.setFunctionName("test");
+ bulkUploadRoleFunction.setFunctionCd("test");
+
+ return bulkUploadRoleFunction;
+ }
+
+ @Test
+ public void bulkUploadRoleFunctionTest(){
+ BulkUploadRoleFunction bulkUploadRoleFunction = mockBulkUploadRoleFunction();
+
+ BulkUploadRoleFunction bulkUploadRoleFunction1 = new BulkUploadRoleFunction();
+
+ bulkUploadRoleFunction1.setFunctionName("test");
+ bulkUploadRoleFunction1.setFunctionCd("test");
+
+ assertEquals(bulkUploadRoleFunction.getFunctionCd(), "test");
+ assertEquals(bulkUploadRoleFunction.getFunctionName(), "test");
+ assertEquals(bulkUploadRoleFunction.hashCode(), bulkUploadRoleFunction1.hashCode());
+ assertTrue(bulkUploadRoleFunction.equals(bulkUploadRoleFunction1));
+
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/BulkUploadUserRolesTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/BulkUploadUserRolesTest.java
new file mode 100644
index 00000000..b2bbba68
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/BulkUploadUserRolesTest.java
@@ -0,0 +1,37 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.BulkUploadUserRoles;
+
+public class BulkUploadUserRolesTest {
+
+ public BulkUploadUserRoles mockBulkUploadUserRoles(){
+ BulkUploadUserRoles bulkUploadUserRoles = new BulkUploadUserRoles();
+
+ bulkUploadUserRoles.setRoleName("test");
+ bulkUploadUserRoles.setOrgUserId("test");
+ bulkUploadUserRoles.setAppNameSpace("test");
+
+ return bulkUploadUserRoles;
+ }
+
+ @Test
+ public void bulkUploadUserRolesTest(){
+ BulkUploadUserRoles bulkUploadUserRoles = mockBulkUploadUserRoles();
+
+ BulkUploadUserRoles bulkUploadUserRoles1 = new BulkUploadUserRoles();
+
+ bulkUploadUserRoles1.setRoleName("test");
+ bulkUploadUserRoles1.setOrgUserId("test");
+ bulkUploadUserRoles1.setAppNameSpace("test");
+
+ assertEquals(bulkUploadUserRoles.getRoleName(), "test");
+ assertEquals(bulkUploadUserRoles.getOrgUserId(), "test");
+ assertEquals(bulkUploadUserRoles.getAppNameSpace(), "test");
+
+ assertEquals(bulkUploadUserRoles.hashCode(), bulkUploadUserRoles1.hashCode());
+ assertTrue(bulkUploadUserRoles.equals(bulkUploadUserRoles1));
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/BusinessCardApplicationRoleTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/BusinessCardApplicationRoleTest.java
new file mode 100644
index 00000000..0ed06b12
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/BusinessCardApplicationRoleTest.java
@@ -0,0 +1,26 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+public class BusinessCardApplicationRoleTest {
+
+ public BusinessCardApplicationRole mockBusinessCardApplicationRole(){
+ BusinessCardApplicationRole businessCardApplicationRole = new BusinessCardApplicationRole();
+
+ return businessCardApplicationRole;
+ }
+
+ @Test
+ public void businessCardApplicationRoleTest(){
+ BusinessCardApplicationRole businessCardApplicationRole = mockBusinessCardApplicationRole();
+
+ BusinessCardApplicationRole businessCardApplicationRole1 = new BusinessCardApplicationRole();
+
+ assertEquals(businessCardApplicationRole.hashCode(), businessCardApplicationRole1.hashCode());
+ assertTrue(businessCardApplicationRole.equals(businessCardApplicationRole1));
+ assertEquals(businessCardApplicationRole.toString(), "BusinessCardUserApplicationRoles [appName=null, roleName=null]");
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/BusinessCardApplicationRolesListTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/BusinessCardApplicationRolesListTest.java
new file mode 100644
index 00000000..9f5e6785
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/BusinessCardApplicationRolesListTest.java
@@ -0,0 +1,26 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+public class BusinessCardApplicationRolesListTest {
+
+ public BusinessCardApplicationRolesList mockBusinessCardApplicationRolesList(){
+ BusinessCardApplicationRolesList businessCardApplicationRolesList = new BusinessCardApplicationRolesList();
+
+ return businessCardApplicationRolesList;
+ }
+
+ @Test
+ public void businessCardApplicationRolesListTest(){
+ BusinessCardApplicationRolesList businessCardApplicationRolesList = mockBusinessCardApplicationRolesList();
+
+ BusinessCardApplicationRolesList businessCardApplicationRolesList1 = new BusinessCardApplicationRolesList();
+
+ assertEquals(businessCardApplicationRolesList.hashCode(), businessCardApplicationRolesList1.hashCode());
+ assertTrue(businessCardApplicationRolesList.equals(businessCardApplicationRolesList1));
+ assertEquals(businessCardApplicationRolesList.toString(), "BusinessCardUserAppRoles [appName=null, roleNames=null]");
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/CentralAppTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/CentralAppTest.java
new file mode 100644
index 00000000..97c9c59f
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/CentralAppTest.java
@@ -0,0 +1,102 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.CentralApp;
+
+public class CentralAppTest {
+
+ public CentralApp mockCentralApp(){
+ CentralApp centralApp = new CentralApp((long)1, null, null, (long)1, (long)1, (long)1, "test", "test", "test", "test", "test", "test", "test", "test", "test",
+ "test", "test", "test", "test", null, "test", "test", "test", "test");
+
+
+ /* public CentralApp(Long id, Date created, Date modified, Long createdId, Long modifiedId, Long rowNum, String name,
+ String imageUrl, String description, String notes, String url, String alternateUrl, String restEndpoint,
+ String mlAppName, String mlAppAdminId, String motsId, String appPassword, String open, String enabled,
+ byte[] thumbnail, String username, String uebKey, String uebSecret, String uebTopicName)*/
+
+ centralApp.setId((long)1);
+ centralApp.setCreatedId((long)1);
+ centralApp.setModifiedId((long)1);
+ centralApp.setRowNum((long)1);
+ centralApp.setName("test");
+ centralApp.setImageUrl("test");
+ centralApp.setDescription("test");
+ centralApp.setNotes("test");
+ centralApp.setUrl("test");
+ centralApp.setAlternateUrl("test");
+ centralApp.setRestEndpoint("test");
+ centralApp.setMlAppName("test");
+ centralApp.setMlAppAdminId("test");
+ centralApp.setMotsId("test");
+ centralApp.setAppPassword("test");
+ centralApp.setOpen("test");
+ centralApp.setEnabled("test");
+ centralApp.setUsername("test");
+ centralApp.setUebKey("test");
+ centralApp.setUebSecret("test");
+ centralApp.setUebTopicName("test");
+
+ return centralApp;
+ }
+
+ @Test
+ public void centralAppTest(){
+ CentralApp centralApp = mockCentralApp();
+
+ CentralApp centralApp1 = new CentralApp((long)1, null, null, (long)1, (long)1, (long)1, "test", "test", "test", "test", "test", "test", "test", "test", "test",
+ "test", "test", "test", "test", null, "test", "test", "test", "test");
+
+ /*centralApp1.setId((long)1);
+ centralApp1.setCreatedId((long)1);
+ centralApp1.setModifiedId((long)1);
+ centralApp1.setRowNum((long)1);
+ centralApp1.setName("test");
+ centralApp1.setImageUrl("test");
+ centralApp1.setDescription("test");
+ centralApp1.setNotes("test");
+ centralApp1.setUrl("test");
+ centralApp1.setAlternateUrl("test");
+ centralApp1.setRestEndpoint("test");
+ centralApp1.setMlAppName("test");
+ centralApp1.setMlAppAdminId("test");
+ centralApp1.setMotsId("test");
+ centralApp1.setAppPassword("test");
+ centralApp1.setOpen("test");
+ centralApp1.setEnabled("test");
+ centralApp1.setUsername("test");
+ centralApp1.setUebKey("test");
+ centralApp1.setUebSecret("test");
+ centralApp1.setUebTopicName("test");*/
+
+ assertEquals(centralApp.getId(), new Long(1));
+ assertEquals(centralApp.getCreatedId(), new Long(1));
+ assertEquals(centralApp.getModifiedId(), new Long(1));
+ assertEquals(centralApp.getRowNum(), new Long(1));
+ assertEquals(centralApp.getName(), "test");
+ assertEquals(centralApp.getImageUrl(), "test");
+ assertEquals(centralApp.getDescription(), "test");
+ assertEquals(centralApp.getNotes(), "test");
+ assertEquals(centralApp.getUrl(), "test");
+ assertEquals(centralApp.getAlternateUrl(), "test");
+ assertEquals(centralApp.getRestEndpoint(), "test");
+ assertEquals(centralApp.getMlAppName(), "test");
+ assertEquals(centralApp.getMlAppAdminId(), "test");
+ assertEquals(centralApp.getMotsId(), "test");
+ assertEquals(centralApp.getAppPassword(), "test");
+ assertEquals(centralApp.getOpen(), "test");
+ assertEquals(centralApp.getEnabled(), "test");
+ assertEquals(centralApp.getUsername(), "test");
+ assertEquals(centralApp.getUebKey(), "test");
+ assertEquals(centralApp.getUebSecret(), "test");
+ assertEquals(centralApp.getUebTopicName(), "test");
+
+ assertTrue(centralApp.equals(centralApp1));
+ assertEquals(centralApp.hashCode(), centralApp1.hashCode());
+ /* assertTrue(centralApp.equals(new CentralApp((long)1, null, null, (long)1, (long)1, (long)1, "test", "test", "test", "test", "test", "test", "test", "test", "test",
+ "test", "test", "test", "test", null, "test", "test", "test", "test")));*/
+ }
+
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/CentralRoleTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/CentralRoleTest.java
new file mode 100644
index 00000000..6ba0a444
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/CentralRoleTest.java
@@ -0,0 +1,63 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.*;
+
+import java.util.Date;
+import java.util.SortedSet;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.domain.CentralRoleFunction;
+import org.openecomp.portalapp.portal.transport.CentralRole;
+
+public class CentralRoleTest {
+
+ public CentralRole mockCentralRole(){
+ CentralRole centralRole = new CentralRole((long)1, null, null, (long)1, (long)1, (long)1,
+ "test", false, 1, null, null, null);
+
+ centralRole.setId((long)1);
+ centralRole.setCreatedId((long)1);
+ centralRole.setModifiedId((long)1);
+ centralRole.setRowNum((long)1);
+ centralRole.setName("test");
+ centralRole.setActive(false);
+ centralRole.setPriority(1);
+
+ centralRole.setCreated(null);
+ centralRole.setModified(null);
+ centralRole.setRoleFunctions(null);
+ centralRole.setChildRoles(null);
+ centralRole.setParentRoles(null);
+
+ return centralRole;
+ }
+
+ @Test
+ public void centralRoleTest(){
+ CentralRole centralRole = mockCentralRole();
+
+ CentralRole centralRole1 = new CentralRole((long)1, null, null, (long)1, (long)1, (long)1,
+ "test", false, 1, null, null, null);
+
+ CentralRole centralRole2 = new CentralRole((long)1, "test");
+
+ assertEquals(centralRole.getId(), new Long(1));
+ assertEquals(centralRole.getCreatedId(), new Long(1));
+ assertEquals(centralRole.getModifiedId(), new Long(1));
+ assertEquals(centralRole.getRowNum(), new Long(1));
+ assertEquals(centralRole.getName(), "test");
+ assertEquals(centralRole.isActive(), false);
+ assertEquals(centralRole.getCreated(), null);
+ assertEquals(centralRole.getModified(), null);
+ assertEquals(centralRole.getRoleFunctions(), null);
+ assertEquals(centralRole.getChildRoles(), null);
+ assertEquals(centralRole.getParentRoles(), null);
+ assertEquals(centralRole.getPriority().toString(), "1");
+ assertEquals(centralRole.hashCode(), centralRole1.hashCode());
+ assertTrue(centralRole.equals(centralRole1));
+ assertEquals(centralRole, centralRole1);
+ assertEquals(centralRole2, new CentralRole((long)1, "test"));
+ }
+
+
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/CentralUserAppTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/CentralUserAppTest.java
new file mode 100644
index 00000000..f3582647
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/CentralUserAppTest.java
@@ -0,0 +1,41 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.assertEquals;
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.CentralApp;
+import org.openecomp.portalapp.portal.transport.CentralRole;
+import org.openecomp.portalapp.portal.transport.CentralUserApp;
+
+public class CentralUserAppTest {
+
+ public CentralUserApp mockCentralUserApp(){
+ CentralUserApp centralUserApp = new CentralUserApp();
+
+ CentralApp app = new CentralApp((long)1, null, null, (long)1, (long)1, (long)1, "test", "test", "test", "test", "test", "test", "test", "test", "test",
+ "test", "test", "test", "test", null, "test", "test", "test", "test");
+
+ CentralRole role = new CentralRole();
+
+ centralUserApp.setUserId((long)1);
+ centralUserApp.setApp(app);
+ centralUserApp.setRole(role);
+ centralUserApp.setPriority((short) 123);
+
+ return centralUserApp;
+ }
+
+ @Test
+ public void centralUserAppTest(){
+ CentralUserApp centralUserApp = mockCentralUserApp();
+
+ CentralApp app1 = new CentralApp((long)1, null, null, (long)1, (long)1, (long)1, "test", "test", "test", "test", "test", "test", "test", "test", "test",
+ "test", "test", "test", "test", null, "test", "test", "test", "test");
+
+ CentralRole role1 = new CentralRole();
+
+ assertEquals(centralUserApp.getUserId(), new Long(1));
+ assertEquals(centralUserApp.getPriority(), new Short((short) 123));
+ assertEquals(centralUserApp.getApp(), app1);
+ assertEquals(centralUserApp.getRole(), role1);
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/CentralUserTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/CentralUserTest.java
new file mode 100644
index 00000000..9df86bc9
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/CentralUserTest.java
@@ -0,0 +1,52 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.*;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.CentralRole;
+import org.openecomp.portalapp.portal.transport.CentralUser;
+import org.openecomp.portalapp.portal.transport.CentralUserApp;
+
+public class CentralUserTest {
+
+ public CentralUser mockCentralUser(){
+ Set<CentralUserApp> userApps = new HashSet<CentralUserApp>();
+ Set<CentralRole> pseudoRoles = new HashSet<CentralRole>();
+ CentralUser centralUser = new CentralUser((long)1, null, null, (long)1, (long)1, (long)1, (long)1,
+ (long)1, "test", "test", "test", "test", "test",
+ "test", "test", (long)1, "test", "test", "test",
+ "test", "test", "test", "test", "test", "test", "test",
+ "test", "test", "test", "test",
+ "test", "test", "test", "test", "test",
+ "test", "test", "test", "test", "test",
+ "test", "test", "test", "test", null,
+ false, false, (long)1, (long)1, false, "test", userApps, pseudoRoles);
+
+ return centralUser;
+ }
+
+ @Test
+ public void centralRoleTest(){
+ CentralUser centralUser = mockCentralUser();
+
+ Set<CentralUserApp> userApps = new HashSet<CentralUserApp>();
+ Set<CentralRole> pseudoRoles = new HashSet<CentralRole>();
+ CentralUser centralUser1 = new CentralUser((long)1, null, null, (long)1, (long)1, (long)1, (long)1,
+ (long)1, "test", "test", "test", "test", "test",
+ "test", "test", (long)1, "test", "test", "test",
+ "test", "test", "test", "test", "test", "test", "test",
+ "test", "test", "test", "test",
+ "test", "test", "test", "test", "test",
+ "test", "test", "test", "test", "test",
+ "test", "test", "test", "test", null,
+ false, false, (long)1, (long)1, false, "test", userApps, pseudoRoles);
+
+
+ assertEquals(centralUser, centralUser1);
+ assertEquals(centralUser.hashCode(), centralUser1.hashCode());
+ assertTrue(centralUser.equals(centralUser1));
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EPAppsManualPreferenceTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EPAppsManualPreferenceTest.java
new file mode 100644
index 00000000..6e8b4018
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EPAppsManualPreferenceTest.java
@@ -0,0 +1,47 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.EPAppsManualPreference;
+
+public class EPAppsManualPreferenceTest {
+
+ public EPAppsManualPreference mockEPAppsManualPreference(){
+ EPAppsManualPreference epAppsManualPreference = new EPAppsManualPreference();
+
+ epAppsManualPreference.setAppid((long)1);
+ epAppsManualPreference.setCol(1);
+ epAppsManualPreference.setHeaderText("test");
+ epAppsManualPreference.setImageLink("test");
+ epAppsManualPreference.setOrder(1);
+ epAppsManualPreference.setRestrictedApp(false);
+ epAppsManualPreference.setRow(1);
+ epAppsManualPreference.setSizeX(1);
+ epAppsManualPreference.setSizeY(1);
+ epAppsManualPreference.setSubHeaderText("test");
+ epAppsManualPreference.setUrl("test");
+ epAppsManualPreference.setAddRemoveApps(false);
+
+ return epAppsManualPreference;
+ }
+
+ @Test
+ public void epAppsManualPreferenceTest(){
+
+ EPAppsManualPreference epAppsManualPreference = mockEPAppsManualPreference();
+
+ assertEquals(epAppsManualPreference.getAppid(), new Long(1));
+ assertEquals(epAppsManualPreference.getCol(), 1);
+ assertEquals(epAppsManualPreference.getHeaderText(), "test");
+ assertEquals(epAppsManualPreference.getImageLink(), "test");
+ assertEquals(epAppsManualPreference.getOrder(), 1);
+ assertEquals(epAppsManualPreference.isRestrictedApp(), false);
+ assertEquals(epAppsManualPreference.getRow(), 1);
+ assertEquals(epAppsManualPreference.getSizeX(), 1);
+ assertEquals(epAppsManualPreference.getSizeY(), 1);
+ assertEquals(epAppsManualPreference.getSubHeaderText(), "test");
+ assertEquals(epAppsManualPreference.getUrl(), "test");
+ assertEquals(epAppsManualPreference.isAddRemoveApps(), false);
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EPAppsSortPreferenceTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EPAppsSortPreferenceTest.java
new file mode 100644
index 00000000..6c67424a
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EPAppsSortPreferenceTest.java
@@ -0,0 +1,29 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.EPAppsSortPreference;
+
+public class EPAppsSortPreferenceTest {
+
+ public EPAppsSortPreference mockEPAppsSortPreference(){
+ EPAppsSortPreference epAppsSortPreference = new EPAppsSortPreference();
+
+ epAppsSortPreference.setIndex(1);
+ epAppsSortPreference.setValue("test");
+ epAppsSortPreference.setTitle("test");
+
+ return epAppsSortPreference;
+ }
+
+ @Test
+ public void epAppsSortPreferenceTest(){
+ EPAppsSortPreference epAppsSortPreference = mockEPAppsSortPreference();
+
+ assertEquals(epAppsSortPreference.getIndex(), 1);
+ assertEquals(epAppsSortPreference.getValue(), "test");
+ assertEquals(epAppsSortPreference.getTitle(), "test");
+
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EPDeleteAppsManualSortPrefTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EPDeleteAppsManualSortPrefTest.java
new file mode 100644
index 00000000..78bb8474
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EPDeleteAppsManualSortPrefTest.java
@@ -0,0 +1,29 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.EPDeleteAppsManualSortPref;
+
+public class EPDeleteAppsManualSortPrefTest {
+
+ public EPDeleteAppsManualSortPref mockEPDeleteAppsManualSortPref(){
+ EPDeleteAppsManualSortPref epDeleteAppsManualSortPref = new EPDeleteAppsManualSortPref();
+
+ epDeleteAppsManualSortPref.setAppId((long)1);
+ epDeleteAppsManualSortPref.setSelect(false);
+ epDeleteAppsManualSortPref.setPending(false);
+
+ return epDeleteAppsManualSortPref;
+ }
+
+ @Test
+ public void epDeleteAppsManualSortPrefTest(){
+ EPDeleteAppsManualSortPref epDeleteAppsManualSortPref = mockEPDeleteAppsManualSortPref();
+
+ assertEquals(epDeleteAppsManualSortPref.getAppId(), new Long(1));
+ assertEquals(epDeleteAppsManualSortPref.isSelect(), false);
+ assertEquals(epDeleteAppsManualSortPref.isPending(), false);
+
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EPUserAppCurrentRolesTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EPUserAppCurrentRolesTest.java
new file mode 100644
index 00000000..9c82ad37
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EPUserAppCurrentRolesTest.java
@@ -0,0 +1,41 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.EPUserAppCurrentRoles;
+
+public class EPUserAppCurrentRolesTest {
+
+ public EPUserAppCurrentRoles mockEPUserAppCurrentRoles(){
+ EPUserAppCurrentRoles epUserAppCurrentRoles = new EPUserAppCurrentRoles();
+
+ epUserAppCurrentRoles.setRoleName("test");
+ epUserAppCurrentRoles.setUserId((long)1);
+ epUserAppCurrentRoles.setPriority("test");
+ epUserAppCurrentRoles.setRoleId((long)1);
+
+ return epUserAppCurrentRoles;
+ }
+
+ @Test
+ public void epUserAppCurrentRolesTest(){
+ EPUserAppCurrentRoles epUserAppCurrentRoles = mockEPUserAppCurrentRoles();
+
+ EPUserAppCurrentRoles epUserAppCurrentRoles1 = new EPUserAppCurrentRoles();
+
+ epUserAppCurrentRoles1.setRoleName("test");
+ epUserAppCurrentRoles1.setUserId((long)1);
+ epUserAppCurrentRoles1.setPriority("test");
+ epUserAppCurrentRoles1.setRoleId((long)1);
+
+ assertEquals(epUserAppCurrentRoles.getRoleName(), "test");
+ assertEquals(epUserAppCurrentRoles.getUserId(), new Long(1));
+ assertEquals(epUserAppCurrentRoles.getRoleId(), new Long(1));
+ assertEquals(epUserAppCurrentRoles.getPriority(), "test");
+ assertEquals(epUserAppCurrentRoles.hashCode(), epUserAppCurrentRoles1.hashCode());
+ assertTrue(epUserAppCurrentRoles.equals(epUserAppCurrentRoles1));
+
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EPWidgetsSortPreferenceTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EPWidgetsSortPreferenceTest.java
new file mode 100644
index 00000000..d466d91c
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EPWidgetsSortPreferenceTest.java
@@ -0,0 +1,41 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.EPWidgetsSortPreference;
+
+public class EPWidgetsSortPreferenceTest {
+
+ public EPWidgetsSortPreference mockEPWidgetsSortPreference(){
+ EPWidgetsSortPreference epWidgetsSortPreference = new EPWidgetsSortPreference();
+
+ epWidgetsSortPreference.setSizeX(1);
+ epWidgetsSortPreference.setSizeY(1);
+ epWidgetsSortPreference.setHeaderText("test");
+ epWidgetsSortPreference.setUrl("test");
+ epWidgetsSortPreference.setWidgetid((long)1);
+ epWidgetsSortPreference.setWidgetIdentifier("test");
+ epWidgetsSortPreference.setRow(1);
+ epWidgetsSortPreference.setCol(1);
+
+ return epWidgetsSortPreference;
+ }
+
+ @Test
+ public void epWidgetsSortPreferenceTest(){
+ EPWidgetsSortPreference epWidgetsSortPreference = mockEPWidgetsSortPreference();
+
+ assertEquals(epWidgetsSortPreference.getSizeX(), 1);
+ assertEquals(epWidgetsSortPreference.getSizeY(), 1);
+ assertEquals(epWidgetsSortPreference.getHeaderText(), "test");
+ assertEquals(epWidgetsSortPreference.getUrl(), "test");
+ assertEquals(epWidgetsSortPreference.getWidgetid(), new Long(1));
+ assertEquals(epWidgetsSortPreference.getWidgetIdentifier(), "test");
+ assertEquals(epWidgetsSortPreference.getRow(), 1);
+ assertEquals(epWidgetsSortPreference.getRow(), 1);
+
+ }
+
+
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EcompUserAppRolesTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EcompUserAppRolesTest.java
new file mode 100644
index 00000000..928c3737
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EcompUserAppRolesTest.java
@@ -0,0 +1,33 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.EcompUserAppRoles;
+
+public class EcompUserAppRolesTest {
+
+ public EcompUserAppRoles mockEcompUserAppRoles(){
+ EcompUserAppRoles ecompUserAppRoles = new EcompUserAppRoles();
+
+ ecompUserAppRoles.setAppId("test");
+ ecompUserAppRoles.setUserId((long)1);
+ ecompUserAppRoles.setPriority("test");
+ ecompUserAppRoles.setRoleId((long)1);
+ ecompUserAppRoles.setRoleName("test");
+
+ return ecompUserAppRoles;
+ }
+
+ @Test
+ public void ecompUserAppRolesTest(){
+
+ EcompUserAppRoles ecompUserAppRoles = mockEcompUserAppRoles();
+
+ assertEquals(ecompUserAppRoles.getAppId(), "test");
+ assertEquals(ecompUserAppRoles.getPriority(), "test");
+ assertEquals(ecompUserAppRoles.getRoleName(), "test");
+ assertEquals(ecompUserAppRoles.getUserId(), new Long(1));
+ assertEquals(ecompUserAppRoles.getRoleId(), new Long(1));
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EpNotificationItemExtVOTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EpNotificationItemExtVOTest.java
new file mode 100644
index 00000000..11fe2cf7
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EpNotificationItemExtVOTest.java
@@ -0,0 +1,33 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.EpNotificationItemExtVO;
+
+public class EpNotificationItemExtVOTest {
+
+ public EpNotificationItemExtVO mockEpNotificationItemExtVO(){
+ EpNotificationItemExtVO epNotificationItemExtVO = new EpNotificationItemExtVO();
+
+ //epNotificationItemExtVO.setActiveYn("abc");
+ epNotificationItemExtVO.setMsgHeader("test");
+ epNotificationItemExtVO.setMsgDescription("test");
+ epNotificationItemExtVO.setPriority(1);
+ epNotificationItemExtVO.setCreatorId(1);
+ epNotificationItemExtVO.setLoginId("test");
+
+ return epNotificationItemExtVO;
+ }
+
+ @Test
+ public void epNotificationItemExtVOTest(){
+ EpNotificationItemExtVO epNotificationItemExtVO = mockEpNotificationItemExtVO();
+
+ assertEquals(epNotificationItemExtVO.getMsgHeader(), "test");
+ assertEquals(epNotificationItemExtVO.getMsgDescription(), "test");
+ assertEquals(epNotificationItemExtVO.getPriority().toString(), "1");
+ assertEquals(epNotificationItemExtVO.getCreatorId().toString(), "1");
+ assertEquals(epNotificationItemExtVO.getLoginId(), "test");
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EpNotificationItemTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EpNotificationItemTest.java
new file mode 100644
index 00000000..6e1e48c6
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EpNotificationItemTest.java
@@ -0,0 +1,64 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.EpNotificationItem;
+
+public class EpNotificationItemTest {
+
+ public EpNotificationItem mockEpNotificationItem(){
+ EpNotificationItem epNotificationItem = new EpNotificationItem();
+
+ epNotificationItem.setNotificationId((long)1);
+ epNotificationItem.setIsForOnlineUsers("test");
+ epNotificationItem.setIsForAllRoles("test");
+ epNotificationItem.setActiveYn("test");
+ epNotificationItem.setMsgHeader("test");
+ epNotificationItem.setMsgDescription("test");
+ epNotificationItem.setMsgSource("test");
+
+ epNotificationItem.setPriority((long)1);
+ epNotificationItem.setCreatedId((long)1);
+ epNotificationItem.setNotificationHyperlink("test");
+
+ return epNotificationItem;
+ }
+
+ @Test
+ public void epNotificationItemTest(){
+ EpNotificationItem epNotificationItem = mockEpNotificationItem();
+
+ EpNotificationItem epNotificationItem1 = new EpNotificationItem();
+ epNotificationItem1.setNotificationId((long)1);
+ epNotificationItem1.setIsForOnlineUsers("test");
+ epNotificationItem1.setIsForAllRoles("test");
+ epNotificationItem1.setActiveYn("test");
+ epNotificationItem1.setMsgHeader("test");
+ epNotificationItem1.setMsgDescription("test");
+ epNotificationItem1.setMsgSource("test");
+
+ epNotificationItem1.setPriority((long)1);
+ epNotificationItem1.setCreatedId((long)1);
+ epNotificationItem1.setNotificationHyperlink("test");
+
+ assertEquals(epNotificationItem.getNotificationId(), new Long(1));
+ assertEquals(epNotificationItem.getIsForOnlineUsers(), "test");
+ assertEquals(epNotificationItem.getIsForAllRoles(), "test");
+ assertEquals(epNotificationItem.getActiveYn(), "test");
+ assertEquals(epNotificationItem.getMsgHeader(), "test");
+ assertEquals(epNotificationItem.getMsgDescription(), "test");
+ assertEquals(epNotificationItem.getMsgSource(), "test");
+ assertEquals(epNotificationItem.getPriority(), new Long(1));
+ assertEquals(epNotificationItem.getCreatedId(), new Long(1));
+ assertEquals(epNotificationItem.getNotificationHyperlink(), "test");
+
+ assertEquals(epNotificationItem.toString(), "EpNotificationItem [notificationId=1, isForOnlineUsers=test, isForAllRoles=test, activeYn=test, msgHeader=test, msgDescription=test, msgSource=test, startTime=null, endTime=null, priority=1, creatorId=null, createdDate=null, roles=null, roleIds=null]");
+ assertEquals(epNotificationItem.hashCode(), epNotificationItem1.hashCode());
+ assertTrue(epNotificationItem.equals(epNotificationItem1));
+
+ }
+
+}
+
+
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EpNotificationItemVOTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EpNotificationItemVOTest.java
new file mode 100644
index 00000000..35a11833
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EpNotificationItemVOTest.java
@@ -0,0 +1,46 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.Date;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.EpNotificationItemVO;
+
+public class EpNotificationItemVOTest {
+
+ public EpNotificationItemVO mockEpNotificationItemVO(){
+ EpNotificationItemVO epNotificationItemVO = new EpNotificationItemVO();
+
+ epNotificationItemVO.setNotificationId(1);
+ epNotificationItemVO.setIsForOnlineUsers('a');
+ epNotificationItemVO.setIsForAllRoles('a');
+ epNotificationItemVO.setActiveYn('a');
+ epNotificationItemVO.setMsgHeader("test");
+ epNotificationItemVO.setMsgDescription("test");
+ epNotificationItemVO.setMsgSource("test");
+ epNotificationItemVO.setPriority(1);
+ epNotificationItemVO.setCreatorId(1);
+ epNotificationItemVO.setLoginId("test");
+ epNotificationItemVO.setNotificationHyperlink("test");
+
+ return epNotificationItemVO;
+ }
+
+ @Test
+ public void epNotificationItemVOTest(){
+ EpNotificationItemVO epNotificationItemVO = mockEpNotificationItemVO();
+
+ assertEquals(epNotificationItemVO.getNotificationId().toString(), "1");
+ /*assertEquals(epNotificationItemVO.getIsForOnlineUsers(), 'a');
+ assertEquals(epNotificationItemVO.getIsForAllRoles(), 'a');
+ assertEquals(epNotificationItemVO.getActiveYn(), 'a');*/
+ assertEquals(epNotificationItemVO.getMsgHeader(), "test");
+ assertEquals(epNotificationItemVO.getMsgDescription(), "test");
+ assertEquals(epNotificationItemVO.getMsgSource(), "test");
+ assertEquals(epNotificationItemVO.getPriority().toString(), "1");
+ assertEquals(epNotificationItemVO.getCreatorId().toString(), "1");
+ assertEquals(epNotificationItemVO.getLoginId(), "test");
+ assertEquals(epNotificationItemVO.getNotificationHyperlink(), "test");
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EpRoleNotificationItemTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EpRoleNotificationItemTest.java
new file mode 100644
index 00000000..beb67ba9
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/EpRoleNotificationItemTest.java
@@ -0,0 +1,31 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.EpRoleNotificationItem;
+
+public class EpRoleNotificationItemTest {
+
+ public EpRoleNotificationItem mockEpRoleNotificationItem(){
+ EpRoleNotificationItem epRoleNotificationItem = new EpRoleNotificationItem();
+
+ epRoleNotificationItem.setId((long)1);
+ epRoleNotificationItem.setNotificationId((long)1);
+ epRoleNotificationItem.setRoleId(1);
+ epRoleNotificationItem.setRecvUserId(1);
+
+ return epRoleNotificationItem;
+ }
+
+ @Test
+ public void epRoleNotificationItemTest(){
+ EpRoleNotificationItem epRoleNotificationItem = mockEpRoleNotificationItem();
+
+ assertEquals(epRoleNotificationItem.getId(), new Long(1));
+ assertEquals(epRoleNotificationItem.getNotificationId(), new Long(1));
+ assertEquals(epRoleNotificationItem.getRoleId().toString(), "1");
+ assertEquals(epRoleNotificationItem.getRecvUserId().toString(), "1");
+ }
+
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalAccessPermsDetailTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalAccessPermsDetailTest.java
new file mode 100644
index 00000000..f490973a
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalAccessPermsDetailTest.java
@@ -0,0 +1,39 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.ExternalAccessPermsDetail;
+
+public class ExternalAccessPermsDetailTest {
+
+ public ExternalAccessPermsDetail mockExternalAccessPermsDetail(){
+ ExternalAccessPermsDetail externalAccessPermsDetail = new ExternalAccessPermsDetail();
+
+ List<String> roles = new ArrayList<String>();
+
+ externalAccessPermsDetail.setType("test");
+ externalAccessPermsDetail.setInstance("test");
+ externalAccessPermsDetail.setAction("test");
+ externalAccessPermsDetail.setDescription("test");
+ externalAccessPermsDetail.setRoles(roles);
+
+ return externalAccessPermsDetail;
+ }
+
+ @Test
+ public void externalAccessPermsDetailTest(){
+ ExternalAccessPermsDetail externalAccessPermsDetail = mockExternalAccessPermsDetail();
+
+ List<String> roles = new ArrayList<String>();
+
+ assertEquals(externalAccessPermsDetail.getType(), "test");
+ assertEquals(externalAccessPermsDetail.getInstance(), "test");
+ assertEquals(externalAccessPermsDetail.getAction(), "test");
+ assertEquals(externalAccessPermsDetail.getDescription(), "test");
+ assertEquals(externalAccessPermsDetail.getRoles(), roles);
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalAccessPermsTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalAccessPermsTest.java
new file mode 100644
index 00000000..dfae6042
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalAccessPermsTest.java
@@ -0,0 +1,42 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.ExternalAccessPerms;
+
+public class ExternalAccessPermsTest {
+
+ public ExternalAccessPerms mockExternalAccessPerms(){
+ ExternalAccessPerms externalAccessPerms = new ExternalAccessPerms();
+
+ externalAccessPerms.setType("test");
+ externalAccessPerms.setInstance("test");
+ externalAccessPerms.setAction("test");
+ externalAccessPerms.setDescription("test");
+
+ return externalAccessPerms;
+ }
+
+ @Test
+ public void externalAccessPermsTest(){
+ ExternalAccessPerms externalAccessPerms = mockExternalAccessPerms();
+
+ ExternalAccessPerms externalAccessPerms1 = new ExternalAccessPerms("test", "test", "test");
+ ExternalAccessPerms externalAccessPerms2 = new ExternalAccessPerms("test", "test", "test", "test");
+ ExternalAccessPerms externalAccessPerms3 = new ExternalAccessPerms();
+ externalAccessPerms3.setType("test");
+ externalAccessPerms3.setInstance("test");
+ externalAccessPerms3.setAction("test");
+ externalAccessPerms3.setDescription("test");
+
+ assertEquals(externalAccessPerms.getType(), "test");
+ assertEquals(externalAccessPerms.getInstance(), "test");
+ assertEquals(externalAccessPerms.getAction(), "test");
+ assertEquals(externalAccessPerms.getDescription(), "test");
+ assertEquals(externalAccessPerms.hashCode(), externalAccessPerms3.hashCode());
+
+ assertTrue(externalAccessPerms1.equals(new ExternalAccessPerms("test", "test", "test")));
+ assertTrue(externalAccessPerms2.equals(new ExternalAccessPerms("test", "test", "test", "test")));
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalAccessRolePermsTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalAccessRolePermsTest.java
new file mode 100644
index 00000000..4e736eba
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalAccessRolePermsTest.java
@@ -0,0 +1,35 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.ExternalAccessPerms;
+import org.openecomp.portalapp.portal.transport.ExternalAccessRolePerms;
+
+public class ExternalAccessRolePermsTest {
+
+ public ExternalAccessRolePerms mockExternalAccessRolePerms(){
+ ExternalAccessPerms externalAccessPerms = new ExternalAccessPerms();
+ externalAccessPerms.setAction("test");
+ externalAccessPerms.setDescription("test");
+ externalAccessPerms.setInstance("test");
+ externalAccessPerms.setType("test");
+ ExternalAccessRolePerms ExternalAccessRolePerms = new ExternalAccessRolePerms(externalAccessPerms, "test");
+
+ return ExternalAccessRolePerms;
+ }
+
+ @Test
+ public void externalAccessRolePermsTest(){
+ ExternalAccessPerms externalAccessPerms = new ExternalAccessPerms();
+ externalAccessPerms.setAction("test");
+ externalAccessPerms.setDescription("test");
+ externalAccessPerms.setInstance("test");
+ externalAccessPerms.setType("test");
+
+ ExternalAccessRolePerms ExternalAccessRolePerms = mockExternalAccessRolePerms();
+
+ assertEquals(ExternalAccessRolePerms.getRole(), "test");
+ assertEquals(ExternalAccessRolePerms.getPerm(), externalAccessPerms);
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalAccessRoleTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalAccessRoleTest.java
new file mode 100644
index 00000000..19dee193
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalAccessRoleTest.java
@@ -0,0 +1,26 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.ExternalAccessRole;
+
+public class ExternalAccessRoleTest {
+
+ public ExternalAccessRole mockExternalAccessRole(){
+ ExternalAccessRole externalAccessRole = new ExternalAccessRole();
+
+ externalAccessRole.setName("test");
+ externalAccessRole.setDescription("test");
+
+ return externalAccessRole;
+ }
+
+ @Test
+ public void externalAccessRoleTest(){
+ ExternalAccessRole externalAccessRole = mockExternalAccessRole();
+
+ assertEquals(externalAccessRole.getName(), "test");
+ assertEquals(externalAccessRole.getDescription(), "test");
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalAccessUserRoleDetailTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalAccessUserRoleDetailTest.java
new file mode 100644
index 00000000..6ffab981
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalAccessUserRoleDetailTest.java
@@ -0,0 +1,47 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.ExternalAccessUserRoleDetail;
+import org.openecomp.portalapp.portal.transport.ExternalRoleDescription;
+
+public class ExternalAccessUserRoleDetailTest {
+
+ public ExternalAccessUserRoleDetail mockExternalAccessUserRoleDetail(){
+
+ ExternalRoleDescription externalRoleDescription = new ExternalRoleDescription();
+ externalRoleDescription.setId("test");
+ externalRoleDescription.setName("test");
+ externalRoleDescription.setActive("test");
+ externalRoleDescription.setPriority("test");
+ externalRoleDescription.setAppId("test");
+ externalRoleDescription.setAppRoleId("test");
+
+ ExternalAccessUserRoleDetail externalAccessUserRoleDetail = new ExternalAccessUserRoleDetail("test", externalRoleDescription);
+
+ externalAccessUserRoleDetail.setName("test");
+ externalAccessUserRoleDetail.setDescription(externalRoleDescription);
+ return externalAccessUserRoleDetail;
+ }
+
+ @Test
+ public void externalAccessUserRoleDetailTest(){
+ ExternalAccessUserRoleDetail externalAccessUserRoleDetail = mockExternalAccessUserRoleDetail();
+
+ ExternalRoleDescription externalRoleDescription1 = new ExternalRoleDescription();
+ externalRoleDescription1.setId("test");
+ externalRoleDescription1.setName("test");
+ externalRoleDescription1.setActive("test");
+ externalRoleDescription1.setPriority("test");
+ externalRoleDescription1.setAppId("test");
+ externalRoleDescription1.setAppRoleId("test");
+
+ ExternalAccessUserRoleDetail externalAccessUserRoleDetail1 = new ExternalAccessUserRoleDetail("test", externalRoleDescription1);
+
+ assertEquals(externalAccessUserRoleDetail.getName(), externalAccessUserRoleDetail1.getName());
+ assertEquals(externalAccessUserRoleDetail.getDescription(), externalAccessUserRoleDetail1.getDescription());
+ assertEquals(externalAccessUserRoleDetail.hashCode(), externalAccessUserRoleDetail1.hashCode());
+ assertTrue(externalAccessUserRoleDetail.equals(externalAccessUserRoleDetail1));
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalAccessUserTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalAccessUserTest.java
new file mode 100644
index 00000000..d2be97b1
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalAccessUserTest.java
@@ -0,0 +1,24 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.ExternalAccessUser;
+
+public class ExternalAccessUserTest {
+
+ public ExternalAccessUser mockExternalAccessUser(){
+ ExternalAccessUser externalAccessUser = new ExternalAccessUser("test", "test");
+
+ return externalAccessUser;
+ }
+
+ @Test
+ public void externalAccessUserTest(){
+ ExternalAccessUser externalAccessUser = mockExternalAccessUser();
+
+ assertEquals(externalAccessUser.getRole(), "test");
+ assertEquals(externalAccessUser.getUser(), "test");
+
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalRoleDescriptionTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalRoleDescriptionTest.java
new file mode 100644
index 00000000..5b6fe825
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/ExternalRoleDescriptionTest.java
@@ -0,0 +1,35 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.ExternalRoleDescription;
+
+public class ExternalRoleDescriptionTest {
+
+ public ExternalRoleDescription mockExternalRoleDescription(){
+
+ ExternalRoleDescription externalRoleDescription = new ExternalRoleDescription();
+
+ externalRoleDescription.setId("test");
+ externalRoleDescription.setName("test");
+ externalRoleDescription.setActive("test");
+ externalRoleDescription.setPriority("test");
+ externalRoleDescription.setAppId("test");
+ externalRoleDescription.setAppRoleId("test");
+
+ return externalRoleDescription;
+ }
+
+ @Test
+ public void externalRoleDescriptionTest(){
+ ExternalRoleDescription externalRoleDescription = mockExternalRoleDescription();
+
+ assertEquals(externalRoleDescription.getId(), "test");
+ assertEquals(externalRoleDescription.getName(), "test");
+ assertEquals(externalRoleDescription.getActive(), "test");
+ assertEquals(externalRoleDescription.getPriority(), "test");
+ assertEquals(externalRoleDescription.getAppId(), "test");
+ assertEquals(externalRoleDescription.getAppRoleId(), "test");
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/FunctionalMenuItemTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/FunctionalMenuItemTest.java
new file mode 100644
index 00000000..7d4b96e5
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/FunctionalMenuItemTest.java
@@ -0,0 +1,42 @@
+package org.openecomp.portalapp.portal.transport;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.FunctionalMenuItem;
+
+public class FunctionalMenuItemTest {
+
+ public FunctionalMenuItem mockFunctionalMenuItem(){
+ FunctionalMenuItem functionalMenuItem = new FunctionalMenuItem();
+
+ List<Integer> roles = new ArrayList<Integer>();
+
+ functionalMenuItem.setRestrictedApp(false);
+ functionalMenuItem.setUrl("test");
+ functionalMenuItem.setRoles(roles);
+
+ return functionalMenuItem;
+ }
+
+ @Test
+ public void functionalMenuItemTest(){
+ FunctionalMenuItem functionalMenuItem = mockFunctionalMenuItem();
+
+ FunctionalMenuItem functionalMenuItem1 = mockFunctionalMenuItem();
+
+ List<Integer> roles = new ArrayList<Integer>();
+
+ functionalMenuItem1.setRestrictedApp(false);
+ functionalMenuItem1.setUrl("test");
+ functionalMenuItem1.setRoles(roles);
+
+ assertEquals(functionalMenuItem.getRoles(), functionalMenuItem1.getRoles());
+ assertEquals(functionalMenuItem.toString(), "FunctionalMenuItem [menuId=null, column=null, text=null, parentMenuId=null, url=test, active_yn=null, appid=null, roles=[], restrictedApp=false]");
+ // assertTrue(functionalMenuItem.normalize(), functionalMenuItem1.normalize());
+ }
+
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/FunctionalMenuRoleTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/FunctionalMenuRoleTest.java
new file mode 100644
index 00000000..09f4bc67
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/FunctionalMenuRoleTest.java
@@ -0,0 +1,40 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.FunctionalMenuRole;
+
+public class FunctionalMenuRoleTest {
+
+ public FunctionalMenuRole mockFunctionalMenuRole(){
+ FunctionalMenuRole functionalMenuRole = new FunctionalMenuRole();
+
+ functionalMenuRole.setId(1);
+ functionalMenuRole.setMenuId((long)1);
+ functionalMenuRole.setAppId(1);
+ functionalMenuRole.setRoleId(1);
+
+ return functionalMenuRole;
+ }
+
+ @Test
+ public void functionalMenuRoleTest(){
+ FunctionalMenuRole functionalMenuRole = mockFunctionalMenuRole();
+
+ FunctionalMenuRole functionalMenuRole1 = new FunctionalMenuRole();
+ functionalMenuRole1.setId(1);
+ functionalMenuRole1.setMenuId((long)1);
+ functionalMenuRole1.setAppId(1);
+ functionalMenuRole1.setRoleId(1);
+
+ assertEquals(functionalMenuRole.getId().toString(), "1");
+ assertEquals(functionalMenuRole.getMenuId(), new Long(1));
+ assertEquals(functionalMenuRole.getAppId().toString(), "1");
+ assertEquals(functionalMenuRole.getRoleId().toString(), "1");
+ assertEquals(functionalMenuRole.toString(), "FunctionalMenuRole [id=1, menuId=1, appId=1, roleId=1]");
+ assertTrue(functionalMenuRole.equals(functionalMenuRole1));
+ assertEquals(functionalMenuRole.hashCode(), functionalMenuRole1.hashCode());
+
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/RemoteUserWithRolesTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/RemoteUserWithRolesTest.java
new file mode 100644
index 00000000..ef926f6a
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/RemoteUserWithRolesTest.java
@@ -0,0 +1,65 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.RemoteRole;
+import org.openecomp.portalapp.portal.transport.RemoteUserWithRoles;
+
+public class RemoteUserWithRolesTest {
+
+ public RemoteUserWithRoles mockRemoteUserWithRoles(){
+ RemoteUserWithRoles remoteUserWithRoles = new RemoteUserWithRoles();
+
+ List<RemoteRole> roles = new ArrayList<RemoteRole>();
+ RemoteRole remoteRole = new RemoteRole();
+ remoteRole.setId((long)1);
+ remoteRole.setName("test");
+ roles.add(remoteRole);
+
+ remoteUserWithRoles.setOrgId((long)1);
+ remoteUserWithRoles.setManagerId((long)1);
+ remoteUserWithRoles.setFirstName("test");
+ remoteUserWithRoles.setMiddleInitial("test");
+ remoteUserWithRoles.setLastName("test");
+ remoteUserWithRoles.setPhone("test");
+ remoteUserWithRoles.setEmail("test");
+ remoteUserWithRoles.setHrid("test");
+ remoteUserWithRoles.setOrgUserId("test");
+ remoteUserWithRoles.setOrgCode("test");
+ remoteUserWithRoles.setOrgManagerUserId("test");
+ remoteUserWithRoles.setJobTitle("test");
+ remoteUserWithRoles.setLoginId("test");
+ remoteUserWithRoles.setActive(false);
+ remoteUserWithRoles.setRoles(roles);
+
+ return remoteUserWithRoles;
+ }
+
+ @Test
+ public void remoteUserWithRolesTest(){
+ RemoteUserWithRoles remoteUserWithRoles = mockRemoteUserWithRoles();
+
+ assertEquals(remoteUserWithRoles.getOrgId(), new Long(1));
+ assertEquals(remoteUserWithRoles.getManagerId(), new Long(1));
+ assertEquals(remoteUserWithRoles.getFirstName(), "test");
+ assertEquals(remoteUserWithRoles.getMiddleInitial(), "test");
+ assertEquals(remoteUserWithRoles.getLastName(), "test");
+ assertEquals(remoteUserWithRoles.getPhone(), "test");
+ assertEquals(remoteUserWithRoles.getEmail(), "test");
+ assertEquals(remoteUserWithRoles.getHrid(), "test");
+ assertEquals(remoteUserWithRoles.getOrgUserId(), "test");
+ assertEquals(remoteUserWithRoles.getOrgCode(), "test");
+ assertEquals(remoteUserWithRoles.getOrgManagerUserId(), "test");
+ assertEquals(remoteUserWithRoles.getJobTitle(), "test");
+ assertEquals(remoteUserWithRoles.getLoginId(), "test");
+ assertEquals(remoteUserWithRoles.getActive(), false);
+ assertEquals(remoteUserWithRoles.getRoles().size(), 1);
+ assertEquals(remoteUserWithRoles.toString(), "RemoteUserWithRoles [orgId=1, managerId=1, firstName=test, middleInitial=test, lastName=test, phone=test, "
+ + "email=test, hrid=test, orgUserId=test, orgCode=test, orgManagerUserId=test, jobTitle=test, loginId=test, active=false, roles=[RemoteRole [id=1, name=test]]]");
+
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/RoleInAppForUserTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/RoleInAppForUserTest.java
new file mode 100644
index 00000000..66624c2a
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/RoleInAppForUserTest.java
@@ -0,0 +1,37 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.RoleInAppForUser;
+
+public class RoleInAppForUserTest {
+
+ public RoleInAppForUser mockRoleInAppForUser(){
+ RoleInAppForUser roleInAppForUser = new RoleInAppForUser((long)1 , "test");
+ roleInAppForUser.setRoleId((long)1);
+ roleInAppForUser.setRoleName("test");
+ roleInAppForUser.setIsApplied(false);
+
+ return roleInAppForUser;
+ }
+
+ @Test
+ public void roleInAppForUserTest(){
+ RoleInAppForUser roleInAppForUser = mockRoleInAppForUser();
+
+ RoleInAppForUser roleInAppForUser1 = new RoleInAppForUser((long)1 , "test");
+ roleInAppForUser1.setRoleId((long)1);
+ roleInAppForUser1.setRoleName("test");
+ roleInAppForUser1.setIsApplied(false);
+
+ assertEquals(roleInAppForUser.getRoleId(), new Long(1));
+ assertEquals(roleInAppForUser.getRoleName(), "test");
+ assertEquals(roleInAppForUser.getIsApplied(), false);
+
+ assertEquals(roleInAppForUser.toString(), "RoleInAppForUser [roleId=1, roleName=test, isApplied=false]");
+ assertTrue(roleInAppForUser.equals(roleInAppForUser1));
+ assertEquals(roleInAppForUser.hashCode(), roleInAppForUser1.hashCode());
+ //constructor
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/UserApplicationRolesTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/UserApplicationRolesTest.java
new file mode 100644
index 00000000..632eeb4f
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/UserApplicationRolesTest.java
@@ -0,0 +1,58 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.RemoteRole;
+import org.openecomp.portalapp.portal.transport.UserApplicationRoles;
+
+public class UserApplicationRolesTest {
+
+ public UserApplicationRoles mockUserApplicationRoles(){
+ UserApplicationRoles userApplicationRoles = new UserApplicationRoles();
+
+ List<RemoteRole> roles = new ArrayList<RemoteRole>();
+ RemoteRole remoteRole = new RemoteRole();
+ remoteRole.setId((long)1);
+ remoteRole.setName("test");
+ roles.add(remoteRole);
+
+ userApplicationRoles.setAppId((long)1);
+ userApplicationRoles.setOrgUserId("test");
+ userApplicationRoles.setFirstName("test");
+ userApplicationRoles.setLastName("test");
+ userApplicationRoles.setRoles(roles);
+
+ return userApplicationRoles;
+ }
+
+ @Test
+ public void userApplicationRolesTest(){
+ UserApplicationRoles userApplicationRoles = mockUserApplicationRoles();
+
+ UserApplicationRoles userApplicationRoles1 = new UserApplicationRoles();
+
+ List<RemoteRole> roles = new ArrayList<RemoteRole>();
+ RemoteRole remoteRole = new RemoteRole();
+ remoteRole.setId((long)1);
+ remoteRole.setName("test");
+ roles.add(remoteRole);
+
+ userApplicationRoles1.setAppId((long)1);
+ userApplicationRoles1.setOrgUserId("test");
+ userApplicationRoles1.setFirstName("test");
+ userApplicationRoles1.setLastName("test");
+ userApplicationRoles1.setRoles(roles);
+
+ assertEquals(userApplicationRoles.getAppId(), userApplicationRoles1.getAppId());
+ assertEquals(userApplicationRoles.getOrgUserId(), userApplicationRoles1.getOrgUserId());
+ assertEquals(userApplicationRoles.getFirstName(), userApplicationRoles1.getFirstName());
+ assertEquals(userApplicationRoles.getLastName(), userApplicationRoles1.getLastName());
+ assertEquals(userApplicationRoles.getRoles(), userApplicationRoles1.getRoles());
+
+
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/UserWithNameSurnameTitleTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/UserWithNameSurnameTitleTest.java
new file mode 100644
index 00000000..7267dcde
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/UserWithNameSurnameTitleTest.java
@@ -0,0 +1,19 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.UserWithNameSurnameTitle;
+
+public class UserWithNameSurnameTitleTest {
+
+ @Test
+ public void userWithNameSurnameTitleTest(){
+
+ UserWithNameSurnameTitle userWithNameSurnameTitle = new UserWithNameSurnameTitle("test", "test", "test", "test");
+
+ assertEquals(userWithNameSurnameTitle, new UserWithNameSurnameTitle("test", "test", "test", "test"));
+ assertEquals(userWithNameSurnameTitle.hashCode(), new UserWithNameSurnameTitle("test", "test", "test", "test").hashCode());
+ assertTrue(userWithNameSurnameTitle.equals(new UserWithNameSurnameTitle("test", "test", "test", "test")));
+ }
+}
diff --git a/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/WidgetCatalogPersonalizationTest.java b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/WidgetCatalogPersonalizationTest.java
new file mode 100644
index 00000000..6681d0a4
--- /dev/null
+++ b/ecomp-portal-BE-common/src/test/java/org/openecomp/portalapp/portal/transport/WidgetCatalogPersonalizationTest.java
@@ -0,0 +1,25 @@
+package org.openecomp.portalapp.portal.transport;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.openecomp.portalapp.portal.transport.WidgetCatalogPersonalization;
+
+public class WidgetCatalogPersonalizationTest {
+
+ public WidgetCatalogPersonalization mockWidgetCatalogPersonalization(){
+ WidgetCatalogPersonalization widgetCatalogPersonalization = new WidgetCatalogPersonalization();
+
+ widgetCatalogPersonalization.setWidgetId((long)1);
+ widgetCatalogPersonalization.setSelect(false);
+ return widgetCatalogPersonalization;
+ }
+
+ @Test
+ public void widgetCatalogPersonalizationTest(){
+ WidgetCatalogPersonalization widgetCatalogPersonalization = mockWidgetCatalogPersonalization();
+
+ assertEquals(widgetCatalogPersonalization.getWidgetId(), new Long(1));
+ assertEquals(widgetCatalogPersonalization.getSelect(), false);
+ }
+}
diff --git a/ecomp-portal-BE-os/README.md b/ecomp-portal-BE-os/README.md
index b30d7e7a..45b0a791 100644
--- a/ecomp-portal-BE-os/README.md
+++ b/ecomp-portal-BE-os/README.md
@@ -34,6 +34,14 @@ Version 1.1.0 (Amsterdam), November 2017
- [Portal-61] Fixed the routing problem, loaded data and changed the notification hyperlink
- [Portal-77] Changes to remove preview image and update the new image automatically on App onbarding page
- [Portal-82] Unable to pick Role in Widget onboarding for assigned app
+- [Portal-94] Unable to see the updates on Edit Functional Menu
+- [Portal-104] Replaced mysql DB connector with mariaDB
+- [Portal-72] Sonar scan - resolving severity Blocker issues
+- [Portal-103] Fix to enhanced notification ticket source for ONAP
+- [Portal-50] Fix to get the Sonar coverage for ONAP
+- [Portal-86] Remove internal att.com usages from tests and other files
+- [Portal-102] Fixed the page refresh issue on App Account Management page
+- [Portal-104] replace mysql DB connector with mariaDB connector
Version 1.0.0, February 2017
- Initial release
diff --git a/ecomp-portal-BE-os/pom.xml b/ecomp-portal-BE-os/pom.xml
index 00e77c20..0a45000f 100644
--- a/ecomp-portal-BE-os/pom.xml
+++ b/ecomp-portal-BE-os/pom.xml
@@ -18,11 +18,11 @@
<!-- If skipTests is false use this command to generate the report:
mvn clean jacoco:prepare-agent install jacoco:report -->
<skipTests>false</skipTests>
- <skipCoverage>true</skipCoverage>
+ <skipCoverage>false</skipCoverage>
<jacoco.data.file>${project.build.directory}/coverage-reports/jacoco-ut.exec</jacoco.data.file>
<sonar-jacoco-listeners.version>3.8</sonar-jacoco-listeners.version>
<sonar.core.codeCoveragePlugin>jacoco</sonar.core.codeCoveragePlugin>
- <sonar.jacoco.reportPath>${project.build.directory}/code-coverage/jacoco.exec</sonar.jacoco.reportPath>
+ <sonar.jacoco.reportPath>${project.build.directory}/code-coverage/jacoco.exec</sonar.jacoco.reportPath>
<sonar.jacoco.itReportPath>${project.build.directory}/code-coverage/jacoco-it.exec</sonar.jacoco.itReportPath>
<!-- Note: This list should match jacoco-maven-plugin's exclusion list below -->
<sonar.exclusions>**.js</sonar.exclusions>
@@ -85,63 +85,67 @@
<target>1.8</target>
</configuration>
</plugin>
- <plugin>
- <groupId>org.jacoco</groupId>
- <artifactId>jacoco-maven-plugin</artifactId>
- <version>0.7.5.201505241946</version>
- <executions>
- <!-- Prepares the property pointing to the JaCoCo runtime agent which
- is passed as VM argument when Maven the Surefire plugin is executed. -->
- <execution>
- <id>pre-unit-test</id>
- <goals>
- <goal>prepare-agent</goal>
- </goals>
- <configuration>
- <!-- path to the file which contains the execution data. -->
- <destFile>${jacoco.data.file}</destFile>
- <!-- name of the property containing the settings for JaCoCo runtime agent. -->
- <propertyName>surefireArgLine</propertyName>
- <skip>${skipCoverage}</skip>
- </configuration>
- </execution>
- <!-- Ensures that the code coverage report for unit tests is created
- after unit tests have been run. -->
- <execution>
- <id>post-unit-test</id>
- <phase>test</phase>
- <goals>
- <goal>report</goal>
- </goals>
- <configuration>
- <!-- path to the file which contains the execution data. -->
- <dataFile>${jacoco.data.file}</dataFile>
- <!-- output directory for the code coverage report. -->
- <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
- <skip>${skipCoverage}</skip>
- </configuration>
- </execution>
- <!-- Will see build errors while running the test cases because of dual
- instrumentation -->
- <execution>
- <id>default-instrument</id>
- <goals>
- <goal>instrument</goal>
- </goals>
- <configuration>
- <skip>${skipCoverage}</skip>
- </configuration>
- </execution>
- <execution>
- <id>default-restore-instrumented-classes</id>
- <goals>
- <goal>restore-instrumented-classes</goal>
- </goals>
- <configuration>
- <skip>${skipCoverage}</skip>
- </configuration>
- </execution>
- </executions>
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <version>0.7.6.201602180812</version>
+ <executions>
+ <execution>
+ <id>prepare-agent</id>
+ <goals>
+ <goal>prepare-agent</goal>
+ </goals>
+ <phase>test</phase>
+ <configuration>
+ <destFile>${sonar.jacoco.reportPath}</destFile>
+ <skip>${skipCoverage}</skip>
+ </configuration>
+ </execution>
+ <execution>
+ <id>report</id>
+ <goals>
+ <goal>report</goal>
+ </goals>
+ <phase>test</phase>
+ <configuration>
+ <dataFile>${sonar.jacoco.reportPath}</dataFile>
+ <outputDirectory>${project.basedir}/target/site/jacoco</outputDirectory>
+ <skip>${skipCoverage}</skip>
+ </configuration>
+ </execution>
+ <!-- Integration Tests (Only report goal) -->
+ <execution>
+ <id>report-integration</id>
+ <goals>
+ <goal>report-integration</goal>
+ </goals>
+ <configuration>
+ <dataFile>${sonar.jacoco.itReportPath}</dataFile>
+ <outputDirectory>${project.basedir}/target/site/it-jacoco</outputDirectory>
+ <skip>${skipCoverage}</skip>
+ </configuration>
+ </execution>
+ <!-- Will see build errors while running the test cases because of dual
+ instrumentation -->
+ <execution>
+ <id>default-instrument</id>
+ <goals>
+ <goal>instrument</goal>
+ </goals>
+ <configuration>
+ <skip>${skipCoverage}</skip>
+ </configuration>
+ </execution>
+ <execution>
+ <id>default-restore-instrumented-classes</id>
+ <goals>
+ <goal>restore-instrumented-classes</goal>
+ </goals>
+ <configuration>
+ <skip>${skipCoverage}</skip>
+ </configuration>
+ </execution>
+ </executions>
</plugin>
<plugin>
@@ -275,23 +279,23 @@
</resources>
</configuration>
</execution>
- <execution>
- <id>copy-src</id>
- <phase>generate-resources</phase>
- <goals>
- <goal>copy-resources</goal>
- </goals>
- <configuration>
- <outputDirectory>${basedir}/target/classes</outputDirectory>
- <overwrite>false</overwrite>
- <skip>${skipTests}</skip>
- <resources>
- <resource>
- <directory>${basedir}/../ecomp-portal-BE-common/target/classes</directory>
- </resource>
- </resources>
- </configuration>
- </execution>
+<!-- <execution> -->
+<!-- <id>copy-src</id> -->
+<!-- <phase>generate-resources</phase> -->
+<!-- <goals> -->
+<!-- <goal>copy-resources</goal> -->
+<!-- </goals> -->
+<!-- <configuration> -->
+<!-- <outputDirectory>${basedir}/target/classes</outputDirectory> -->
+<!-- <overwrite>false</overwrite> -->
+<!-- <skip>${skipTests}</skip> -->
+<!-- <resources> -->
+<!-- <resource> -->
+<!-- <directory>${basedir}/../ecomp-portal-BE-common/target/classes</directory> -->
+<!-- </resource> -->
+<!-- </resources> -->
+<!-- </configuration> -->
+<!-- </execution> -->
</executions>
</plugin>
</plugins>
@@ -482,13 +486,14 @@
<artifactId>classmate</artifactId>
<version>1.3.1</version>
</dependency>
-
+
+ <!-- Use Mariadb connector/j for failover -->
<dependency>
- <groupId>mysql</groupId>
- <artifactId>mysql-connector-java</artifactId>
- <version>5.1.22</version>
+ <groupId>org.mariadb.jdbc</groupId>
+ <artifactId>mariadb-java-client</artifactId>
+ <version>1.5.8</version>
</dependency>
-
+
<!-- Elastic Search -->
<dependency>
<groupId>org.elasticsearch</groupId>
@@ -727,10 +732,19 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.onap.portal</groupId>
- <artifactId>ecomp-portal-BE-common-test</artifactId>
- <version>${portal.version}</version>
- <scope>test</scope>
+ <groupId>org.powermock</groupId>
+ <artifactId>powermock-api-mockito</artifactId>
+ <version>1.6.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.powermock</groupId>
+ <artifactId>powermock-core</artifactId>
+ <version>1.6.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.powermock</groupId>
+ <artifactId>powermock-module-junit4</artifactId>
+ <version>1.6.1</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/controller/ONAPWelcomeController.java b/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/controller/ONAPWelcomeController.java
index 52473102..9d8a7893 100644
--- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/controller/ONAPWelcomeController.java
+++ b/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/controller/ONAPWelcomeController.java
@@ -48,7 +48,7 @@ public class ONAPWelcomeController extends EPRestrictedBaseController{
return "/index";
}
- @RequestMapping(value = {"/applicationsHome", "/dashboard", "/widgetsHome", "/kpidash*", "/admins", "/users", "/portalAdmins", "/applications", "/widgets", "/functionalMenu", "/contactUs", "/getAccess","/appCatalog" }, method = RequestMethod.GET)
+ @RequestMapping(value = {"/applicationsHome", "/dashboard", "/widgetsHome", "/kpidash*", "/admins", "/users", "/portalAdmins", "/applications", "/widgets", "/functionalMenu", "/contactUs", "/getAccess","/appCatalog", "/widgetOnboarding", "/accountOnboarding"}, method = RequestMethod.GET)
public String getEcompSinglePage(HttpServletRequest request, HttpServletResponse response) {
return "forward:/index.html";
}
diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/service/SearchServiceImpl.java b/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/service/SearchServiceImpl.java
index 35fc00bd..2be95244 100644
--- a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/service/SearchServiceImpl.java
+++ b/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/service/SearchServiceImpl.java
@@ -185,6 +185,7 @@ public class SearchServiceImpl implements SearchService {
}
} catch (Exception e) {
logger.error(EELFLoggerDelegate.errorLogger, "searchInPhoneBookWithToken Exception = " + EcompPortalUtils.getStackTrace(e));
+ return null;
}
return foundUsers.get(0);
}
diff --git a/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/service/TicketEventServiceImpl.java b/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/service/TicketEventServiceImpl.java
new file mode 100644
index 00000000..37acfe53
--- /dev/null
+++ b/ecomp-portal-BE-os/src/main/java/org/openecomp/portalapp/portal/service/TicketEventServiceImpl.java
@@ -0,0 +1,18 @@
+package org.openecomp.portalapp.portal.service;
+
+import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.springframework.stereotype.Service;
+
+import com.fasterxml.jackson.databind.JsonNode;
+
+@Service("ticketService")
+public class TicketEventServiceImpl implements TicketEventService{
+
+ @Override
+ public String getNotificationHyperLink(JsonNode application, String ticket, String eventSource) {
+ String hyperlink = SystemProperties.getProperty(EPCommonSystemProperties.EXTERNAL_SYSTEM_NOTIFICATION_URL)+ticket;
+ return hyperlink;
+ }
+
+}
diff --git a/ecomp-portal-BE-os/src/main/webapp/WEB-INF/conf/system.properties b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/conf/system.properties
index 8f74a9f2..860cc47a 100644
--- a/ecomp-portal-BE-os/src/main/webapp/WEB-INF/conf/system.properties
+++ b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/conf/system.properties
@@ -18,8 +18,8 @@
# ================================================================================
###
-db.driver = com.mysql.jdbc.Driver
-db.connectionURL = jdbc:mysql://localhost:3306/ecomp_portal
+db.driver = org.mariadb.jdbc.Driver
+db.connectionURL = jdbc:mariadb:failover://localhost:3306/ecomp_portal
db.userName = XXXX
db.password = XXXX
# is the db.password property encrypted?
@@ -118,4 +118,24 @@ window_width_threshold_left_menu = 1400
window_width_threshold_right_menu = 1350
#External system notification URL
-external_system_notification_url= http://todo_external_system_notification_url?
+external_system_notification_url= https://jira.onap.org/browse/
+
+#scheduler properties
+scheduler.server.url=http://mtanjv9sdlg10.aic.cip.onap.com:8989/scheduler
+scheduler.create.new.vnf.change.instance=/v1/ChangeManagement/schedules/
+scheduler.get.time.slots=/v1/ChangeManagement/schedules/
+scheduler.submit.new.vnf.change=/v1/ChangeManagement/schedules/{scheduleId}/approvals
+vid.truststore.filename=C:\\Temp\\vid_keystore.jks
+vid.truststore.passwd.x=OBF:1wgg1wfq1uus1uui1x131x0r1x1v1x1j1uvo1uve1wg81wfi
+
+#scheduler-policy properties
+policy.server.url=https://policypdp-conexus-e2e.ecomp.cci.onap.com:8081/pdp
+policy.get.config=/api/getConfig
+policy.ClientAuth=UHlQRFBTZXJ2ZXI6dGVzdA==
+policy.client.mechId=m06814@controller.dcae.ecomp.onap.com
+policy.client.password=OBF:1ffu1qvu1t2z1l161fuk1i801nz91ro41xf71xfv1rqi1nx51i7y1fuq1kxw1t371qxw1fh0
+policy.username=testpdp
+policy.password=OBF:1igd1kft1l1a1sw61svs1kxs1kcl1idt
+policy.Authorization=dGVzdHBkcDphbHBoYTEyMw==
+policy.environment=TEST
+
diff --git a/ecomp-portal-BE-os/src/main/webapp/WEB-INF/jsp/welcome.jsp b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/jsp/welcome.jsp
deleted file mode 100644
index 054c38fe..00000000
--- a/ecomp-portal-BE-os/src/main/webapp/WEB-INF/jsp/welcome.jsp
+++ /dev/null
@@ -1,695 +0,0 @@
-<%--
- ================================================================================
- eCOMP Portal
- ================================================================================
- Copyright (C) 2017 AT&T Intellectual Property
- ================================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ================================================================================
- --%>
-<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
-<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
-
-<link rel="stylesheet" type="text/css" href="static/fusion/sample/css/slider.css">
-<link rel="stylesheet" type="text/css" href="static/fusion/sample/css/scribble.css" />
-<link rel="stylesheet" type="text/css" href="static/fusion/sample/css/spacegallery.css" />
-<link rel="stylesheet" href="static/fusion/css/att_angular_gridster/ui-gridster.css"/>
-<link rel="stylesheet" href="static/fusion/css/att_angular_gridster/sandbox-gridster.css"/>
-
-<script src= "static/ebz/angular_js/angular.js"></script>
-<script src= "static/ebz/angular_js/angular-sanitize.js"></script>
-
-<script src= "static/ebz/angular_js/app.js"></script>
-<script src= "static/ebz/angular_js/gestures.js"></script>
-
-<script src="static/js/jquery-1.10.2.js"></script>
-<!-- <script src="static/fusion/js/jquery.resize.js"></script> -->
-<script src="static/fusion/js/att_angular_gridster/ui-gridster-tpls.js"></script>
-<script src="static/fusion/js/att_angular_gridster/angular-gridster.js"></script>
-
-<script src= "static/ebz/angular_js/checklist-model.js"></script>
-<script src= "static/js/modalService.js"></script>
-<script src="static/js/jquery.mask.min.js" type="text/javascript"></script>
-<script src="static/js/jquery-ui.js" type="text/javascript"></script>
-<script src="static/ebz/sandbox/att-abs-tpls.js" type="text/javascript"></script>
-<script src="static/ebz/sandbox/att-abs-tpls.min.js" type="text/javascript"></script>
-<style>
-.button--small, [class*=bg-] .button--small {
- font-size: 14px;
- };
-</style>
-
-<style>
-.gridster-item-container .gridster-item-body{
-bottom:0px;
-}
-.gridster-item-container{
-min-height:50px;
-}
-.att-accordion {
- border-width: 0px;
-}
-</style>
-
-<style>
- #myGallery {
- width: 100%;
- height: 400px;
- }
-
- #myGallery img {
- border: 2px solid #52697E;
- }
-
- a.loading {
- background: #fff url(../images/ajax_small.gif) no-repeat center;
- }
-
- .center {
- margin-left: auto;
- margin-right: auto;
- }
-
-</style>
-
-<script type="text/javascript" src="static/fusion/sample/js/FusionCharts.js"></script> <!-- Charts -->
-<script type="text/javascript" src="static/fusion/sample/js/charts.js"></script> <!-- Charts -->
-
-<script type="text/javascript" src="static/fusion/sample/js/slides.min.jquery.js"></script> <!-- Image Slider -->
-<script type="text/javascript" src="static/fusion/sample/js/scribble.js"></script> <!-- Scribble -->
-<script type="text/javascript" src="static/fusion/sample/js/eye.js"></script> <!-- Space Gallery -->
-<script type="text/javascript" src="static/fusion/sample/js/utils.js"></script> <!-- Space Gallery -->
-<script type="text/javascript" src="static/fusion/sample/js/spacegallery.js"></script> <!-- Space Gallery -->
-
- <!-- Carousel rendering -->
- <script>
- (function($){
- var initLayout = function() {
- $('#myGallery').spacegallery({loadingClass: 'loading'});
- };
-
- EYE.register(initLayout, 'init');
- })(jQuery)
- </script>
-
- <!-- Slider rendering -->
- <script>
- $(function(){
- $('#slides').slides({
- preload: true,
- preloadImage: 'static/fusion/sample/images/loading.gif',
- play: 5000,
- pause: 10000,
- hoverPause: true,
- animationStart: function(current){
- $('.caption').animate({
- bottom:-35
- },100);
- if (window.console && console.log) {
- // example return of current slide number
- //console.log('animationStart on slide: ', current);
- };
- },
- animationComplete: function(current){
- $('.caption').animate({
- bottom:0
- },200);
- if (window.console && console.log) {
- // example return of current slide number
- //console.log('animationComplete on slide: ', current);
- };
- },
- slidesLoaded: function() {
- $('.caption').animate({
- bottom:0
- },200);
- }
- });
- });
-
-
- </script>
-
-<div ng-controller="welcomeController">
- <fmt:message key="general.home" var="title" />
- <div>
- <span style="font-weight:bold;font-size:11pt;">Welcome ${sessionScope.user.firstName} ${sessionScope.user.lastName}</span>&nbsp;
- (Last Login:&nbsp;<fmt:formatDate value="${sessionScope.user.lastLoginDate}" type="date" pattern="dd MMM yyyy hh:mma zzz" var="lastLogin" /> ${lastLogin})
- </div>
-
- <div style="float:left; width:320px; height:320px; margin:10px 27px 10px 27px;color:#222222;text-shadow: 1px 1px 2px #A0A0A0;" >
- <p style="font-weight:bold;font-size:16pt;color:#0046B8;">Network </p>
- <p style="font-weight:bold;font-size:16pt;color:#0046B8;">Visualization </p>
-
- </div>
-
- <!-- Spacer required to center the Image slider (can also be used for content) -->
- <div style="float:right; width:120px; height:320px; margin:10px 27px 10px 10px;color:#222222;text-shadow: 1px 1px 2px #A0A0A0;">
- <p style="font-weight:bold;font-size:9pt;">
- You can toggle between the Image Slider and Carousel controls by clicking on the respective radio button below:
- </p>
- <input type="radio" name="viewer" onClick="$('#example').show();$('#myGallery').hide();" value="Slider" />Slider<br/>
- <input type="radio" name="viewer" onClick="$('#example').hide();$('#myGallery').show();" value="Carousel" />Carousel
-
- <br/>
- </div>
-
- <div id="container">
-
- <div style="position:relative">
- <div id="myGallery" class="spacegallery" style="position:static">
- <img src="static/fusion/sample/images/carousel/slide_b_drive_test_map.png" alt="Drive test analytics" />
- <img src="static/fusion/sample/images/carousel/slide_b_ios_throughput.png" alt="MTSA - Nationwide DL throughput for iOS devices over cellular network" />
- <img src="static/fusion/sample/images/carousel/slide_b_eppt_county.png" alt="Location based services county level drive test" />
- <img src="static/fusion/sample/images/carousel/slide_b_lata_map.png" alt="Network demand data by LATA (2020 forecast)" />
- <img src="static/fusion/sample/images/carousel/slide_b_eppt_regression.png" alt="Linear regression prediction of LBS/E911 drive test accuracy" />
- <img src="static/fusion/sample/images/carousel/slide_b_nova_sdn_map.png" alt="SDN Simulator - SNRC Traffic" />
- <span style="float:right; color:#222222;">(Click on Image to Rotate)</span>
- </div>
- </div>
- <div id="example">
- <div id="slides">
- <div class="slides_container">
- <div class="slide">
- <a href="#" title="Drive test analytics"><img src="static/fusion/sample/images/carousel/slide_b_drive_test_map.png" width="570" height="270" alt="Drive test analytics"></a>
- <div class="caption">
- <p>Drive test analytics</p>
- </div>
- </div>
- <div class="slide">
- <a href="doclib.htm" title="MTSA - Nationwide DL throughput for iOS devices over cellular network"><img src="static/fusion/sample/images/carousel/slide_b_ios_throughput.png" width="570" height="270" alt="MTSA - Nationwide DL throughput for iOS devices over cellular network"></a>
- <div class="caption">
- <p>Nationwide DL throughput for iOS devices over cellular network</p>
- </div>
- </div>
- <div class="slide">
- <a href="#" title="Network demand data by LATA (2020 forecast)"><img src="static/fusion/sample/images/carousel/slide_b_lata_map.png" width="570" height="270" alt="Network demand data by LATA (2020 forecast)"></a>
- <div class="caption">
- <p>Network demand data by LATA (2020 forecast)</p>
- </div>
- </div>
- <div class="slide">
- <a href="#" title="Location based services county level drive test"><img src="static/fusion/sample/images/carousel/slide_b_eppt_county.png" width="570" height="270" alt="Location based services county level drive test"></a>
- <div class="caption">
- <p>Location based services county level drive test</p>
- </div>
- </div>
- <div class="slide">
- <a href="broadcast_list.htm" title="SDN Simulator - SNRC Traffic"><img src="static/fusion/sample/images/carousel/slide_b_nova_sdn_map.png" width="570" height="270" alt="SDN Simulator - SNRC Traffic"></a>
- <div class="caption">
- <p>SDN Simulator - SNRC Traffic</p>
- </div>
- </div>
- <div class="slide">
- <a href="#" title="Linear regression prediction of LBS/E911 drive test accuracy"><img src="static/fusion/sample/images/carousel/slide_b_eppt_regression.png" width="570" height="270" alt="Linear regression prediction of LBS/E911 drive test accuracy"></a>
- <div class="caption" style="bottom:0">
- <p>Linear regression prediction of LBS/E911 drive test accuracy</p>
- </div>
- </div>
- </div>
- <a href="#" class="prev"><img src="static/fusion/sample/images/arrow-prev.png" width="24" height="43" alt="Arrow Prev"></a>
- <a href="#" class="next"><img src="static/fusion/sample/images/arrow-next.png" width="24" height="43" alt="Arrow Next"></a>
- </div>
- <img src="static/fusion/sample/images/example-frame.png" width="739" height="341" alt="Example Frame" id="frame">
- </div>
- </div>
-
- <center>
- <div class="gridster-container">
- <div att-gridster att-gridster-options='gridsterOpts'>
- <div att-gridster-item='item' ng-repeat="item in standardItems">
- <div att-gridster-item-header
- header-text={{item.headerText}}
- sub-header-text={{item.subHeaderText}}>
- <!--ICON BUTTONS PLACEHOLDER START-->
- <div class="tileMinMaxBtn" ng-click="toggleMinMax($index,'')">
- <span class="tileMinMaxIcon">
- <i class="icon-chevron-up" style="color:gray" ng-show="item.max"></i>
- <i class="icon-chevron-down" style="color:gray" ng-hide="item.max"></i>
- </span>
- </div>
- <!--ICON BUTTONS PLACEHOLDER END-->
- </div>
- <div att-gridster-item-body >
- <!--ACTUAL BODY CONTENT START-->
- <div align="center" style="margin-top:10px;">
- <div align="left" ng-if="item.headerText=='Dashboard' && item.max">
- <label>&nbsp; Sample Charts</label><BR>
- <iframe scrolling="no" frameBorder="0" style="width: 430px; height: 360px;" src="static/fusion/sample/html/wordcloud.html"></iframe>
- </div>
- <div ng-if="item.headerText=='Donut Chart' && item.max">
- <iframe scrolling="no" frameBorder="0" style="width: 310px; height: 210px;" src="static/fusion/sample/html/donut_d3.html"></iframe>
- </div>
- <div ng-if="item.headerText=='Area Chart' && item.max">
- <iframe scrolling="no" frameBorder="0" style="width: 310px; height: 210px;" src="static/fusion/sample/html/area_chart.html"></iframe>
- </div>
- <div ng-if="item.headerText=='Pie Chart' && item.max">
- <iframe scrolling="no" frameBorder="0" style="width: 310px; height: 210px;" src="static/fusion/sample/html/pie_chart.html"></iframe>
- </div>
- <div ng-if="item.headerText=='Line Chart' && item.max">
- <iframe scrolling="no" frameBorder="0" style="width: 310px; height: 210px;" src="static/fusion/sample/html/line_chart.html"></iframe>
- </div>
- <div ng-if="item.headerText=='Gauges' && item.max">
- <iframe scrolling="no" frameBorder="0" style="width: 310pxx; height: 210px;" src="static/fusion/sample/html/d3_gauges_demo.html"></iframe>
- </div>
-
- <div align="left" ng-if="item.headerText=='Traffic distribution by day of week' && item.max">
- <att-tabs title="gTabs" class="tabs" >
- <floating-tabs ng-model='activeTabId' size="small"></floating-tabs>
- </att-Tabs>
- <div>
- <div id="Monday" align="left"><img src="static/fusion/sample/images/tunnels/1_mon.png" width=100% height=100% alt="Monday"></div>
- <div id="Tuesday" class="hidden" align="center"><img src="static/fusion/sample/images/tunnels/2_tue.png" width=100% height=100% alt="Tuesday"></div>
- <div id="Wednesday" class="hidden" align="center"><img src="static/fusion/sample/images/tunnels/3_wed.png" width=100% height=100% alt="Wednesday"></div>
- <div id="Thursday" class="hidden" align="center"><img src="static/fusion/sample/images/tunnels/4_thu.png" width=100% height=100% alt="Thursday"></div>
- <div id="Friday" class="hidden" align="center"><img src="static/fusion/sample/images/tunnels/5_fri.png" width=100% height=100% alt="Friday"></div>
- <div id="Saturday" class="hidden" align="center"><img src="static/fusion/sample/images/tunnels/6_sat.png" width=100% height=100% alt="Saturday"></div>
- <div id="Sunday" class="hidden" align="center"><img src="static/fusion/sample/images/tunnels/7_sun.png" width=100% height=100% alt="Sunday"></div>
- </div>
- </div>
- <div align="left" ng-if="item.headerText=='Busy hour traffic analysis by day of week' && item.max">
- <att-tabs title="gTabs2">
- <floating-tabs ng-model='activeTabId2' size="small"></floating-tabs>
- </att-Tabs>
- <div>
- <div id="Incoming" align="left"><img src="static/fusion/sample/images/tunnels/BH_DLSTX_IN.png" width=100% height=100% alt="Monday"></div>
- <div id="Outgoing" class="hidden" align="center"><img src="static/fusion/sample/images/tunnels/BH_DLSTX_OUT.png" width=100% height=100% alt="Tuesday"></div>
- <div id="Default" class="hidden" align="center"><img src="static/fusion/sample/images/tunnels/BH_Nat_Def.png" width=100% height=100% alt="Wednesday"></div>
- <div id="Priority" class="hidden" align="center"><img src="static/fusion/sample/images/tunnels/BH_Nat_Priority.png" width=100% height=100% alt="Thursday"></div>
- <div id="BHNational" class="hidden" align="center"><img src="static/fusion/sample/images/tunnels/BH_Nat.png" width=100% height=100% alt="Friday"></div>
- </div>
- </div>
-
- <div align="left" ng-if="item.headerText=='Additional Samples' && item.max">
- <label>&nbsp;Quick Links</label>
- <table att-table >
-
- <tr>
- <td att-table-body width="90%" ><a href="" target="_blank">Contacts</a></td>
- <td att-table-body width="10%">
- <a ng-click="removeRole();" ><img src="static/fusion/sample/images/deleteicon.gif"></a>
- </td>
- </tr>
- <tr>
- <td att-table-body width="90%" ><a href="" target="_blank">Developer Program</a></td>
- <td att-table-body width="10%">
- <a ng-click="removeRole();" ><img src="static/fusion/sample/images/deleteicon.gif"></a>
- </td>
- </tr>
- <tr>
- <td att-table-body width="90%" ><a href="http://www.zkoss.org" target="_blank">ZK Framework</a></td>
- <td att-table-body width="10%">
- <a ng-click="removeRole();" ><img src="static/fusion/sample/images/deleteicon.gif"></a>
- </td>
- </tr>
- <tr>
- <td att-table-body width="90%" ><a href="http://jquery.com" target="_blank">JQuery</a></td>
- <td att-table-body width="10%">
- <a ng-click="removeRole();" ><img src="static/fusion/sample/images/deleteicon.gif"></a>
- </td>
- </tr>
- <tr>
- <td att-table-body width="90%" ><a href="force_cluster.html" target="_blank">RNC Visualization</a></td>
- <td att-table-body width="10%">
- <a ng-click="removeRole();" ><img src="static/fusion/sample/images/deleteicon.gif"></a>
- </td>
- </tr>
- <tr>
- <td att-table-body width="90%" ><a href="sample_heat_map.htm" target="">Heat Map</a></td>
- <td att-table-body width="10%">
- <a ng-click="removeRole();" ><img src="static/fusion/sample/images/deleteicon.gif"></a>
- </td>
- </tr>
- <tr>
- <td att-table-body width="90%" ><a href="sample_animated_map.htm" target="">Animated Map</a></td>
- <td att-table-body width="10%">
- <a ng-click="removeRole();" ><img src="static/fusion/sample/images/deleteicon.gif"></a>
- </td>
- </tr>
- <tr>
- <td att-table-body width="90%" ><a href="jbpm_drools.htm" target="_blank">Process Management</a></td>
- <td att-table-body width="10%">
- <a ng-click="removeRole();" ><img src="static/fusion/sample/images/deleteicon.gif"></a>
- </td>
- </tr>
- <tr>
- <td att-table-body width="90%" ><a href="chatRoom.htm">Chat Session</a></td>
- <td att-table-body width="10%">
- <a ng-click="removeRole();" ><img src="static/fusion/sample/images/deleteicon.gif"></a>
- </td>
- </tr>
- </table>
- </div>
- <div ng-if="item.headerText=='Sticky Notes' && item.max">
- <div style="width:100%; height:400px" id="scribble-pad"><pre id="scribble" contenteditable="true" onkeyup="storeUserScribble(this.id);"></pre></div>
- </div>
- <div ng-if="item.headerText=='Service Configuration' && item.max">
- <accordion close-others="true" css="att-accordion">
- <accordion-group heading="Service Configuration" is-open="group11.open">
- <iframe scrolling="no" frameBorder="0" align="center" width="100%" height="400px" src="static/fusion/sample/org_chart/example.html" ></iframe>
- </accordion-group>
- <accordion-group heading="VSP Service Configuration" is-open="group12.open">
- <iframe scrolling="no" frameBorder="0" align="center" width="100%" height="400px" src="static/fusion/sample/org_chart/example_vsp.html" ></iframe>
- </accordion-group>
- </accordion>
- </div>
-
- </div>
-
- <!--ACTUAL BODY CONTENT END-->
- </div>
- <!-- <div att-gridster-item-footer
- att-gridster-item-footer-link={{item.footerLink}}>
- {{item.footerLinkText}}
- </div> -->
- </div>
- </div>
- </div>
- </center>
-
-</div>
-
-<script>
-$(document).ready(function(){
- $( "#rightIcon" ).hide();
- $( "#leftIcon" ).show();
-});
-var app=angular.module("abs", ["att.abs", "modalServices","att.gridster","checklist-model"]);
-app.controller('welcomeController', function ($scope, modalService, $modal) {
-
- $scope.gridsterOpts = {
- columns: 3, // the width of the grid, in columns
- pushing: true, // whether to push other items out of the way on move or resize
- floating: true, // whether to automatically float items up so they stack (you can temporarily disable if you are adding unsorted items with ng-repeat)
- width: 'auto', // can be an integer or 'auto'. 'auto' scales gridster to be the full width of its containing element
- colWidth: 'auto', // can be an integer or 'auto'. 'auto' uses the pixel width of the element divided by 'columns'
- rowHeight: 60, // can be an integer or 'match'. Match uses the colWidth, giving you square widgets.
- margins: [10, 10], // the pixel distance between each widget
- outerMargin: true, // whether margins apply to outer edges of the grid
- swapping: true,
- draggable: {
- enabled: true, // whether dragging items is supported
- stop: function(event, uiWidget, $element) {$scope.setCookie();} // optional callback fired when item is finished dragging
- }
-
- };
-
- /* $scope.gridsterOpts = {
- columns: 6,
- width: 'auto',
- colWidth: '230',
- rowHeight: '120',
- margins: [10, 10],
- outerMargin: true,
- pushing: true,
- floating: true,
- swapping: true
- }; */
-
-
- $scope.toggleMinMax = function(index, tileName){
- if(tileName==''){
- $scope.standardItems[index].max = !$scope.standardItems[index].max;
- if($scope.standardItems[index].max)
- $scope.standardItems[index].sizeY=$scope.standardItems[index].maxHeight;
- else
- $scope.standardItems[index].sizeY=0;
- }else{
- $scope.tileTemp = $scope.$eval(tileName);
- var tileMax = $parse(tileName+'.max');
- tileMax.assign($scope, !$scope.$eval(tileName).max);
- var tileSizeY = $parse(tileName+'.sizeY');
- if($scope.tileTemp.max)
- tileSizeY.assign($scope, $scope.tileTemp.maxHeight);
- else
- tileSizeY.assign($scope, 0);
- }
- };
- // These map directly to gridsterItem options
- // IMPORTANT: Items should be placed in the grid in the order in which
- // they should appear.
- // In most cases the sorting should be by row ASC, col ASC
- $scope.standardItems = [{
- sizeX: 1,
- sizeY: 8,
- maxHeight: 8,
- row: 0,
- col: 0,
- headerText:'Dashboard',
- max:false
-
-
- },
- {
- sizeX: 1,
- sizeY: 5,
- maxHeight: 5,
- row: 0,
- col: 1,
- headerText:'Donut Chart',
- max:false
-
- },
- {
- sizeX: 1,
- sizeY: 5,
- maxHeight: 5,
- row: 0,
- col: 2,
- headerText:'Area Chart',
- max:true
- },
- {
- sizeX: 1,
- sizeY: 5,
- maxHeight: 5,
- row: 8,
- col: 0,
- headerText:'Pie Chart',
- max:false
- },
- {
- sizeX: 1,
- sizeY: 5,
- maxHeight: 5,
- row: 8,
- col: 1,
- headerText:'Line Chart',
- max:true
- },
- {
- sizeX: 1,
- sizeY: 5,
- maxHeight: 5,
- row: 8,
- col: 2,
- headerText:'Gauges',
- max:false
- },
- {
- sizeX: 1,
- sizeY: 8,
- maxHeight: 8,
- row: 16,
- col: 0,
- headerText:'Traffic distribution by day of week',
- max:false
- },
- {
- sizeX: 1,
- sizeY: 8,
- maxHeight: 8,
- row: 16,
- col: 1,
- headerText:'Busy hour traffic analysis by day of week',
- max:false
- },
- {
- sizeX: 1,
- sizeY: 6,
- maxHeight: 6,
- row: 24,
- col: 0,
- headerText:'Additional Samples',
- max:false
- },
- {
- sizeX: 1,
- sizeY: 8,
- maxHeight: 8,
- row: 24,
- col: 1,
- headerText:'Sticky Notes',
- max:false
- },
- {
- sizeX: 3,
- sizeY: 10,
- maxHeight: 10,
- row: 32,
- col: 0,
- headerText:'Service Configuration',
- max:false
- }];
-
- $.each($scope.standardItems, function(i, a){
- $scope.toggleMinMax(i,'');
- });
- $scope.activeTabId = 'Monday';
- //for generic tabs
- $scope.gTabs = [{
- title: 'Monday',
- id: 'Monday',
- url: '#Monday',
- selected: true
- },{
- title: 'Tuesday',
- id: 'Tuesday',
- url: '#Tuesday'
- },{
- title: 'Wednesday',
- id: 'Wednesday',
- url: '#Wednesday'
- },{
- title: 'Thursday',
- id: 'Thursday',
- url: '#Thursday'
- },{
- title: 'Friday',
- id: 'Friday',
- url: '#Friday'
- },{
- title: 'Saturday',
- id: 'Saturday',
- url: '#Saturday'
- },{
- title: 'Sunday',
- id: 'Sunday',
- url: '#Sunday'
- }
- ];
-
- $scope.activeTabId2 = 'Incoming';
- //for generic tabs
- $scope.gTabs2 = [{
- title: 'BH SNRC DLSTX - Incoming',
- id: 'Incoming',
- url: '#Incoming',
- selected: true
- },{
- title: 'BH SNRC DLSTX - Outgoing',
- id: 'Outgoing',
- url: '#Outgoing'
- },{
- title: 'BH National - Default',
- id: 'Default',
- url: '#Default'
- },{
- title: 'BH National - Priority',
- id: 'Priority',
- url: '#Priority'
- },{
- title: 'BH National',
- id: 'BHNational',
- url: '#BHNational'
- }
- ];
-
- $scope.activeTabId3 = 'Incoming';
- //for generic tabs
- $scope.gTabs3 = [{
- title: 'BH SNRC DLSTX - Incoming',
- id: 'Incoming',
- url: '#Incoming',
- selected: true
- },{
- title: 'BH SNRC DLSTX - Outgoing',
- id: 'Outgoing',
- url: '#Outgoing'
- },{
- title: 'BH National - Default',
- id: 'Default',
- url: '#Default'
- },{
- title: 'BH National - Priority',
- id: 'Priority',
- url: '#Priority'
- },{
- title: 'BH National',
- id: 'BHNational',
- url: '#BHNational'
- }
- ];
-
- /* $scope.$watch('activeTabId', function(newVal) {
- alert(newval);
- $('#'+newval).show();
- }, true); */
-
- $scope.toggleEastToWest = function() {
- $( "#toggle" ).toggle( 'slide');
- if ($("#leftIcon").is(":visible")) {
- $( "#rightIcon" ).show();
- $( "#leftIcon" ).hide();
- }
- else if ($("#rightIcon").is(":visible")) {
- $( "#rightIcon" ).hide();
- $( "#leftIcon" ).show();
- }
- };
-
- $scope.group1 = {
- open: true
- };
- $scope.group2 = {
- open: true
- };
- $scope.group3 = {
- open: true
- };
- $scope.group4 = {
- open: true
- };
- $scope.group5 = {
- open: true
- };
- $scope.group6 = {
- open: true
- };
- $scope.group7 = {
- open: true
- };
- $scope.group71 = {
- open: true
- };
- $scope.group8 = {
- open: true
- };
- $scope.group9 = {
- open: true
- };
- $scope.group10 = {
- open: true
- };
- $scope.group11 = {
- open: true
- };
- $scope.group12 = {
- open: false
- };
-});
-</script>
-
- <!-- Select the Slider control by default -->
- <script>$('input[name=viewer]:eq(1)').click();</script>
diff --git a/ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/authentication/OpenIdConnectLoginStrategyTest.java b/ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/authentication/OpenIdConnectLoginStrategyTest.java
new file mode 100644
index 00000000..4386ccd7
--- /dev/null
+++ b/ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/authentication/OpenIdConnectLoginStrategyTest.java
@@ -0,0 +1,118 @@
+package org.openecomp.portalapp.portal.authentication;
+
+import static org.junit.Assert.*;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.openecomp.portalsdk.core.onboarding.exception.PortalAPIException;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mitre.openid.connect.model.DefaultUserInfo;
+import org.mitre.openid.connect.model.UserInfo;
+import org.mockito.InjectMocks;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.authentication.OpenIdConnectLoginStrategy;
+import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
+import org.openecomp.portalapp.portal.utils.EPSystemProperties;
+import org.openecomp.portalapp.util.EPUserUtils;
+import org.openecomp.portalapp.util.SessionCookieUtil;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+import org.springframework.util.StringUtils;
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest({StringUtils.class, EPUserUtils.class , SessionCookieUtil.class,SystemProperties.class})
+public class OpenIdConnectLoginStrategyTest {
+
+ @InjectMocks
+ OpenIdConnectLoginStrategy OpenIdConnectLoginStrategy = new OpenIdConnectLoginStrategy();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+
+ NullPointerException nullPointerException = new NullPointerException();
+
+ @Test
+ public void loginTest()
+ {
+ PowerMockito.mockStatic(StringUtils.class);
+ PowerMockito.mockStatic(EPUserUtils.class);
+ PowerMockito.mockStatic(SessionCookieUtil.class);
+
+ UserInfo userInfo = new DefaultUserInfo();
+ userInfo.setPreferredUsername("Test");
+ userInfo.setEmail("test@gmail.com");
+ userInfo.setName("first_name");
+ userInfo.setFamilyName("last_name");
+ Mockito.when(mockedRequest.getAttribute("userInfo")).thenReturn(userInfo);
+ assertTrue(OpenIdConnectLoginStrategy.login(mockedRequest, mockedResponse));
+ }
+
+ @Test
+ public void loginIfUserNullTest()
+ {
+ PowerMockito.mockStatic(SystemProperties.class);
+ UserInfo userInfo = null;
+ Mockito.when(mockedRequest.getAttribute("userInfo")).thenReturn(userInfo);
+// Mockito.when(SystemProperties.getProperty("authentication_mechanism")).thenReturn("auth");
+ assertFalse(OpenIdConnectLoginStrategy.login(mockedRequest, mockedResponse));
+ }
+
+ @Test
+ public void loginIfUserIfAuthIsOIDCTest()
+ {
+ PowerMockito.mockStatic(SystemProperties.class);
+ UserInfo userInfo = null;
+ Mockito.when(mockedRequest.getAttribute("userInfo")).thenReturn(userInfo);
+ Mockito.when(SystemProperties.getProperty("authentication_mechanism")).thenReturn("OIDC");
+ Mockito.when(SystemProperties.getProperty(EPSystemProperties.LOGIN_URL_NO_RET_VAL)).thenReturn("login_url");
+ assertFalse(OpenIdConnectLoginStrategy.login(mockedRequest, mockedResponse));
+ }
+
+ @Test
+ public void loginIfUserIfAuthNotNullTest()
+ {
+ PowerMockito.mockStatic(SystemProperties.class);
+ UserInfo userInfo = null;
+ Mockito.when(mockedRequest.getAttribute("userInfo")).thenReturn(userInfo);
+ Mockito.when(SystemProperties.getProperty("authentication_mechanism")).thenReturn("test");
+ Mockito.when(SystemProperties.getProperty(EPSystemProperties.LOGIN_URL_NO_RET_VAL)).thenReturn("login_url");
+ assertFalse(OpenIdConnectLoginStrategy.login(mockedRequest, mockedResponse));
+ }
+
+ @Test
+ public void loginIfUserExceptionest()
+ {
+ PowerMockito.mockStatic(SystemProperties.class);
+ UserInfo userInfo = null;
+ Mockito.when(mockedRequest.getAttribute("userInfo")).thenReturn(userInfo);
+ Mockito.when(SystemProperties.getProperty("authentication_mechanism")).thenThrow(nullPointerException);
+ Mockito.when(SystemProperties.getProperty(EPSystemProperties.LOGIN_URL_NO_RET_VAL)).thenReturn("login_url");
+ assertFalse(OpenIdConnectLoginStrategy.login(mockedRequest, mockedResponse));
+ }
+ @Test(expected = Exception.class)
+ public void doLoginTest() throws Exception
+ {
+ OpenIdConnectLoginStrategy.doLogin(mockedRequest, mockedResponse);
+ }
+
+ @Test(expected = PortalAPIException.class)
+ public void getUserIdTest() throws Exception
+ {
+ OpenIdConnectLoginStrategy.getUserId(mockedRequest);
+ }
+
+}
diff --git a/ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/authentication/SessionTimeoutInterceptorTest.java b/ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/authentication/SessionTimeoutInterceptorTest.java
new file mode 100644
index 00000000..fc827f78
--- /dev/null
+++ b/ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/authentication/SessionTimeoutInterceptorTest.java
@@ -0,0 +1,55 @@
+package org.openecomp.portalapp.portal.authentication;
+
+import static org.junit.Assert.assertFalse;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.authentication.LoginStrategy;
+import org.openecomp.portalapp.authentication.SimpleLoginStrategy;
+import org.openecomp.portalapp.controller.EPFusionBaseController;
+import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
+import org.openecomp.portalapp.portal.interceptor.SessionTimeoutInterceptor;
+import org.springframework.web.method.HandlerMethod;
+
+public class SessionTimeoutInterceptorTest {
+
+
+ @Mock
+ LoginStrategy loginStrategy = new SimpleLoginStrategy();
+
+ @Mock
+ EPFusionBaseController ePFusionBaseController = new EPFusionBaseController() {
+ };
+
+ @Mock
+ HandlerMethod handlerMethod;
+
+ @InjectMocks
+ SessionTimeoutInterceptor sessionTimeoutInterceptor = new SessionTimeoutInterceptor();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+
+ @Test
+ public void preHandleTest() throws Exception{
+ assertFalse(sessionTimeoutInterceptor.preHandle(mockedRequest, mockedResponse, ePFusionBaseController));
+ }
+
+ @Test
+ public void preHandleTestIfMethodIsinstanceOfHandlerMethod() throws Exception{
+ assertFalse(sessionTimeoutInterceptor.preHandle(mockedRequest, mockedResponse, handlerMethod));
+ }
+}
diff --git a/ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/authentication/SimpleLoginStrategyTest.java b/ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/authentication/SimpleLoginStrategyTest.java
new file mode 100644
index 00000000..5093fae0
--- /dev/null
+++ b/ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/authentication/SimpleLoginStrategyTest.java
@@ -0,0 +1,134 @@
+package org.openecomp.portalapp.portal.authentication;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.authentication.SimpleLoginStrategy;
+import org.openecomp.portalapp.command.EPLoginBean;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
+import org.openecomp.portalapp.portal.service.EPLoginService;
+import org.openecomp.portalapp.portal.service.EPRoleFunctionService;
+import org.openecomp.portalapp.portal.service.EPRoleService;
+import org.openecomp.portalapp.util.EPUserUtils;
+import org.openecomp.portalapp.util.SessionCookieUtil;
+import org.openecomp.portalsdk.core.menu.MenuProperties;
+import org.openecomp.portalsdk.core.onboarding.exception.PortalAPIException;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+import org.springframework.util.StringUtils;
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest({ StringUtils.class, EPUserUtils.class, SessionCookieUtil.class, SystemProperties.class,
+ SessionCookieUtil.class, MenuProperties.class })
+public class SimpleLoginStrategyTest {
+
+ @InjectMocks
+ SimpleLoginStrategy simpleLoginStrategy = new SimpleLoginStrategy();
+
+ @Mock
+ EPLoginService loginService;
+ @Mock
+ EPRoleService roleService;
+ @Mock
+ EPRoleFunctionService ePRoleFunctionService;
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+
+ NullPointerException nullPointerException = new NullPointerException();
+
+ @Test(expected = Exception.class)
+ public void loginTest() throws Exception {
+ PowerMockito.mockStatic(MenuProperties.class);
+ PowerMockito.mockStatic(SessionCookieUtil.class);
+ PowerMockito.mockStatic(StringUtils.class);
+ Mockito.when(SessionCookieUtil.getUserIdFromCookie(mockedRequest, mockedResponse)).thenReturn("guestT");
+ Mockito.when(StringUtils.isEmpty("guestT")).thenReturn(false);
+ EPLoginBean commandBean = new EPLoginBean();
+ EPUser user = new EPUser();
+ commandBean.setUser(user);
+ commandBean.setOrgUserId("guestT");
+ Mockito.when(mockedRequest.getAttribute(MenuProperties.MENU_PROPERTIES_FILENAME_KEY))
+ .thenReturn("menu_properties_filename");
+ Mockito.when(loginService.findUser(commandBean, "menu_properties_filename", null)).thenReturn(commandBean);
+ assertTrue(simpleLoginStrategy.login(mockedRequest, mockedResponse));
+ }
+
+ @Test
+ public void loginIfUserEmptyTest() throws Exception {
+ PowerMockito.mockStatic(MenuProperties.class);
+ PowerMockito.mockStatic(SessionCookieUtil.class);
+ PowerMockito.mockStatic(StringUtils.class);
+ Mockito.when(SessionCookieUtil.getUserIdFromCookie(mockedRequest, mockedResponse)).thenReturn("guestT");
+ Mockito.when(StringUtils.isEmpty("guestT")).thenReturn(true);
+ EPLoginBean commandBean = new EPLoginBean();
+ EPUser user = new EPUser();
+ commandBean.setUser(user);
+ commandBean.setOrgUserId("guestT");
+ assertFalse(simpleLoginStrategy.login(mockedRequest, mockedResponse));
+ }
+
+ @Test
+ public void loginIfAuthIsBothTest() throws Exception {
+ PowerMockito.mockStatic(SystemProperties.class);
+ PowerMockito.mockStatic(SessionCookieUtil.class);
+ PowerMockito.mockStatic(StringUtils.class);
+ Mockito.when(SessionCookieUtil.getUserIdFromCookie(mockedRequest, mockedResponse)).thenReturn("guestT");
+ Mockito.when(StringUtils.isEmpty("guestT")).thenReturn(true);
+ Mockito.when(SystemProperties.getProperty(SystemProperties.AUTHENTICATION_MECHANISM)).thenReturn("BOTH");
+ assertFalse(simpleLoginStrategy.login(mockedRequest, mockedResponse));
+ }
+
+ @Test
+ public void loginIfAuthIsNotNullTest() throws Exception {
+ PowerMockito.mockStatic(SystemProperties.class);
+ PowerMockito.mockStatic(SessionCookieUtil.class);
+ PowerMockito.mockStatic(StringUtils.class);
+ Mockito.when(SessionCookieUtil.getUserIdFromCookie(mockedRequest, mockedResponse)).thenReturn("guestT");
+ Mockito.when(StringUtils.isEmpty("guestT")).thenReturn(true);
+ Mockito.when(SystemProperties.getProperty(SystemProperties.AUTHENTICATION_MECHANISM)).thenReturn("Test");
+ assertFalse(simpleLoginStrategy.login(mockedRequest, mockedResponse));
+ }
+
+ @Test
+ public void loginExceptionTest() throws Exception {
+ PowerMockito.mockStatic(SystemProperties.class);
+ PowerMockito.mockStatic(SessionCookieUtil.class);
+ PowerMockito.mockStatic(StringUtils.class);
+ Mockito.when(SessionCookieUtil.getUserIdFromCookie(mockedRequest, mockedResponse)).thenReturn("guestT");
+ Mockito.when(StringUtils.isEmpty("guestT")).thenReturn(true);
+ Mockito.when(SystemProperties.getProperty(SystemProperties.AUTHENTICATION_MECHANISM))
+ .thenThrow(nullPointerException);
+ assertFalse(simpleLoginStrategy.login(mockedRequest, mockedResponse));
+ }
+
+ @Test(expected = Exception.class)
+ public void doLoginTest() throws Exception {
+ simpleLoginStrategy.doLogin(mockedRequest, mockedResponse);
+ }
+
+ @Test(expected = PortalAPIException.class)
+ public void getUserIdTest() throws Exception {
+ simpleLoginStrategy.getUserId(mockedRequest);
+ }
+}
diff --git a/ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/controller/AppsControllerExternalRequestOSTest.java b/ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/controller/AppsControllerExternalRequestOSTest.java
new file mode 100644
index 00000000..049f7239
--- /dev/null
+++ b/ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/controller/AppsControllerExternalRequestOSTest.java
@@ -0,0 +1,119 @@
+/*package org.openecomp.portalapp.portal.controller;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.openecomp.portalapp.portal.service.AdminRolesService;
+import org.openecomp.portalapp.portal.service.EPAppService;
+import org.openecomp.portalapp.portal.service.PortalAdminService;
+import org.openecomp.portalapp.portal.test.core.MockEPUser;
+import org.openecomp.portalapp.portal.transport.FieldsValidator;
+import org.openecomp.portalapp.portal.transport.OnboardingApp;
+import org.openecomp.portalapp.test.framework.MockitoTestSuite;
+import org.openecomp.portalapp.util.EPUserUtils;
+
+public class AppsControllerExternalRequestOSTest {
+
+ @Mock
+ AdminRolesService adminRolesService;
+
+ @Mock
+ EPAppService appService;
+
+ @Mock
+ PortalAdminService portalAdminService;
+
+
+ @InjectMocks
+ AppsControllerExternalRequest appsControllerExternalRequest = new AppsControllerExternalRequest();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+ NullPointerException nullPointerException = new NullPointerException();
+
+ MockEPUser mockUser = new MockEPUser();
+ @Mock
+ EPUserUtils ePUserUtils = new EPUserUtils();
+
+ @Test
+ public void postOnboardAppExternalFieldValidatorTestTest() {
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("FieldsValidator [httpStatusCode=500, errorCode=null, fields=null]");
+ expectedportalRestResponse.setResponse(null);
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ OnboardingApp expectedOnboardingApp = new OnboardingApp();
+ expectedOnboardingApp.id = null;
+ expectedOnboardingApp.name = "Test";
+ expectedOnboardingApp.url = "Test";
+ expectedOnboardingApp.restUrl = "Test";
+ expectedOnboardingApp.restrictedApp = false;
+ expectedOnboardingApp.isOpen = false;
+ expectedOnboardingApp.isEnabled = false;
+ List<EPUser> userList = new ArrayList<EPUser>();
+ EPUser user = mockUser.mockEPUser();
+ userList.add(user);
+ FieldsValidator expectedFieldValidator = new FieldsValidator();
+ expectedFieldValidator.setHttpStatusCode((long) 500);
+ expectedFieldValidator.setFields(null);
+ expectedFieldValidator.setErrorCode(null);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ Mockito.when(appService.addOnboardingApp(expectedOnboardingApp, user)).thenReturn(expectedFieldValidator);
+ PortalRestResponse<String> actualPortalRestResponse = appsControllerExternalRequest
+ .postOnboardAppExternal(mockedRequest, mockedResponse, expectedOnboardingApp);
+ assertEquals(actualPortalRestResponse, expectedportalRestResponse);
+
+ }
+
+ @Test
+ public void postOnboardAppExternalIfSuperAdminTest() {
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage(null);
+ expectedportalRestResponse.setResponse(null);
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
+ OnboardingApp expectedOnboardingApp = new OnboardingApp();
+ expectedOnboardingApp.id = null;
+ expectedOnboardingApp.name = "Test";
+ expectedOnboardingApp.url = "Test";
+ expectedOnboardingApp.restUrl = "Test";
+ expectedOnboardingApp.restrictedApp = false;
+ expectedOnboardingApp.isOpen = false;
+ expectedOnboardingApp.isEnabled = false;
+ List<EPUser> userList = new ArrayList<EPUser>();
+ EPUser user = mockUser.mockEPUser();
+ userList.add(user);
+ FieldsValidator expectedFieldValidator = new FieldsValidator();
+ expectedFieldValidator.setHttpStatusCode((long) 200);
+ expectedFieldValidator.setFields(null);
+ expectedFieldValidator.setErrorCode(null);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ Mockito.when(appService.addOnboardingApp(expectedOnboardingApp, user)).thenReturn(expectedFieldValidator);
+ PortalRestResponse<String> actualPortalRestResponse = appsControllerExternalRequest
+ .postOnboardAppExternal(mockedRequest, mockedResponse, expectedOnboardingApp);
+ assertEquals(actualPortalRestResponse, expectedportalRestResponse);
+
+ }
+}
+*/ \ No newline at end of file
diff --git a/ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/controller/AppsOSControllerTest.java b/ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/controller/AppsOSControllerTest.java
new file mode 100644
index 00000000..70e7a0ca
--- /dev/null
+++ b/ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/controller/AppsOSControllerTest.java
@@ -0,0 +1,150 @@
+package org.openecomp.portalapp.portal.controller;
+
+import static org.junit.Assert.*;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.drools.core.command.assertion.AssertEquals;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestResponse;
+import org.openecomp.portalapp.portal.ecomp.model.PortalRestStatusEnum;
+import org.openecomp.portalapp.portal.service.AdminRolesService;
+import org.openecomp.portalapp.portal.service.EPAppService;
+import org.openecomp.portalapp.portal.service.PersUserAppService;
+import org.openecomp.portalapp.portal.service.UserService;
+import org.openecomp.portalapp.portal.framework.MockEPUser;
+import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
+import org.openecomp.portalapp.util.EPUserUtils;
+
+public class AppsOSControllerTest {
+
+ @Mock
+ AdminRolesService adminRolesService;
+
+ @Mock
+ EPAppService appService;
+
+ @Mock
+ PersUserAppService persUserAppService;
+
+ @Mock
+ UserService userService;
+
+ @Mock
+ EPUserUtils ePUserUtils;
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ @InjectMocks
+ AppsOSController appsOSController = new AppsOSController();
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+ NullPointerException nullPointerException = new NullPointerException();
+ MockEPUser mockUser = new MockEPUser();
+
+ @Test
+ public void saveNewUserIfUserISNullTest() {
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("failure");
+ expectedportalRestResponse.setResponse("New User cannot be null or empty");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ PortalRestResponse<String> actualPortalRestResponse = appsOSController.saveNewUser(mockedRequest, null);
+ assertEquals(expectedportalRestResponse, actualPortalRestResponse);
+ }
+
+ @Test
+ public void saveNewUserIfUserNOtNullTest() {
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("failure");
+ expectedportalRestResponse.setResponse("UnAuthorized");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ EPUser user = mockUser.mockEPUser();
+ EPUser user1 = mockUser.mockEPUser();
+ user1.setLoginId("guest");
+ user.setLoginId("guestT");
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user1);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+ Mockito.when(adminRolesService.isAccountAdmin(user)).thenReturn(false);
+ PortalRestResponse<String> actualPortalRestResponse = appsOSController.saveNewUser(mockedRequest, user);
+ assertEquals(expectedportalRestResponse, actualPortalRestResponse);
+ }
+
+ @Test
+ public void saveNewUserAndLoggedInUserIdSameTest() throws Exception {
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("Success");
+ expectedportalRestResponse.setResponse("");
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.OK);
+ EPUser user = mockUser.mockEPUser();
+ user.setLoginId("guestT");
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+ Mockito.when(adminRolesService.isAccountAdmin(user)).thenReturn(false);
+ Mockito.when(mockedRequest.getParameter("isCheck")).thenReturn("test");
+ Mockito.when(userService.saveNewUser(user, "test")).thenReturn("Success");
+ PortalRestResponse<String> actualPortalRestResponse = appsOSController.saveNewUser(mockedRequest, user);
+ assertEquals(expectedportalRestResponse, actualPortalRestResponse);
+ }
+
+ @Test
+ public void saveNewUserexceptionest() throws Exception {
+ PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<String>();
+ expectedportalRestResponse.setMessage("failure");
+ expectedportalRestResponse.setResponse(null);
+ PortalRestStatusEnum portalRestStatusEnum = null;
+ expectedportalRestResponse.setStatus(portalRestStatusEnum.ERROR);
+ EPUser user = mockUser.mockEPUser();
+ user.setLoginId("guestT");
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+ Mockito.when(adminRolesService.isAccountAdmin(user)).thenReturn(false);
+ Mockito.when(mockedRequest.getParameter("isCheck")).thenReturn("test");
+ Mockito.when(userService.saveNewUser(user, "test")).thenThrow(nullPointerException);
+ PortalRestResponse<String> actualPortalRestResponse = appsOSController.saveNewUser(mockedRequest, user);
+ assertEquals(expectedportalRestResponse, actualPortalRestResponse);
+ }
+
+ @Test
+ public void getCurrentUserProfileTest() {
+ String loginId = "guestT";
+ EPUser user = mockUser.mockEPUser();
+ List<EPUser> expectedList = new ArrayList<EPUser>();
+ expectedList.add(user);
+ Mockito.when(userService.getUserByUserId(loginId)).thenReturn(expectedList);
+ String expectedString = appsOSController.getCurrentUserProfile(mockedRequest, loginId);
+ assertEquals("{\"firstName\":\"test\",\"lastName\":\"test\"}", expectedString);
+ }
+
+ @Test
+ public void getCurrentUserProfileExceptionTest() {
+ String loginId = "guestT";
+ EPUser user = mockUser.mockEPUser();
+ List<EPUser> expectedList = new ArrayList<EPUser>();
+ expectedList.add(user);
+ Mockito.when(userService.getUserByUserId(loginId)).thenThrow(nullPointerException);
+ String expectedString = appsOSController.getCurrentUserProfile(mockedRequest, loginId);
+ assertEquals("{}", expectedString);
+ }
+
+}
diff --git a/ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/controller/ECOMPLogoutControllerTest.java b/ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/controller/ECOMPLogoutControllerTest.java
new file mode 100644
index 00000000..729debaa
--- /dev/null
+++ b/ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/controller/ECOMPLogoutControllerTest.java
@@ -0,0 +1,77 @@
+package org.openecomp.portalapp.portal.controller;
+
+import static org.junit.Assert.*;
+
+import javax.servlet.ServletRequestWrapper;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.mockito.stubbing.OngoingStubbing;
+import org.openecomp.portalapp.controller.ECOMPLogoutController;
+import org.openecomp.portalapp.portal.service.DashboardSearchService;
+import org.openecomp.portalapp.portal.service.DashboardSearchServiceImpl;
+import org.openecomp.portalapp.portal.framework.MockEPUser;
+import org.openecomp.portalapp.portal.utils.EPCommonSystemProperties;
+import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
+import org.openecomp.portalapp.util.EPUserUtils;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+import org.springframework.core.NamedThreadLocal;
+import org.springframework.web.context.request.RequestAttributes;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+import org.springframework.web.servlet.ModelAndView;
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest({EPUserUtils.class, EPCommonSystemProperties.class,RequestContextHolder.class,RequestAttributes.class})
+public class ECOMPLogoutControllerTest {
+
+ @Mock
+ DashboardSearchService searchService = new DashboardSearchServiceImpl();
+
+ @InjectMocks
+ ECOMPLogoutController ecompLogoutController = new ECOMPLogoutController();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+
+ NullPointerException nullPointerException = new NullPointerException();
+
+ MockEPUser mockUser = new MockEPUser();
+
+ @Mock
+ RequestContextHolder requestContextHolder;
+
+ @Mock
+ RequestAttributes requestAttributes;
+
+ @Test
+ public void logOutTest() throws Exception{
+ ModelAndView actualData = new ModelAndView("redirect:login.htm");
+ ModelAndView expedtedData = null;
+ ThreadLocal<RequestAttributes> requestAttributesHolder =
+ new NamedThreadLocal<RequestAttributes>("Request attributes");
+ RequestAttributes requestAttributes = new ServletRequestAttributes(mockedRequest);
+ PowerMockito.mockStatic(RequestContextHolder.class);
+ PowerMockito.mockStatic(RequestAttributes.class);
+ Mockito.when((ServletRequestAttributes)RequestContextHolder.currentRequestAttributes()).thenReturn((ServletRequestAttributes) requestAttributes);
+ expedtedData = ecompLogoutController.logOut(mockedRequest, mockedResponse);
+ assertEquals(actualData.getViewName(),expedtedData.getViewName());
+ }
+
+}
diff --git a/ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/controller/LoginControllerTest.java b/ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/controller/LoginControllerTest.java
new file mode 100644
index 00000000..968f5811
--- /dev/null
+++ b/ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/controller/LoginControllerTest.java
@@ -0,0 +1,84 @@
+package org.openecomp.portalapp.portal.controller;
+
+import static org.junit.Assert.*;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.controller.LoginController;
+import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
+import org.openecomp.portalapp.portal.service.EPLoginService;
+import org.openecomp.portalapp.portal.service.EPRoleFunctionService;
+import org.openecomp.portalapp.portal.service.EPRoleService;
+import org.openecomp.portalapp.portal.service.SharedContextService;
+import org.openecomp.portalapp.service.EPProfileService;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+import org.springframework.web.servlet.ModelAndView;
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest(SystemProperties.class)
+public class LoginControllerTest {
+
+ @Mock
+ EPProfileService service;
+ @Mock
+ EPLoginService loginService;
+ @Mock
+ SharedContextService sharedContextService;
+ @Mock
+ EPRoleService roleService;
+ @Mock
+ EPRoleFunctionService ePRoleFunctionService;
+
+ @InjectMocks
+ LoginController loginController = new LoginController();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+
+ NullPointerException nullPointerException = new NullPointerException();
+
+ @Test
+ public void loginIfAuthNullTest()
+ {
+ PowerMockito.mockStatic(SystemProperties.class);
+ Mockito.when(SystemProperties.getProperty(SystemProperties.AUTHENTICATION_MECHANISM)).thenReturn(null);
+ ModelAndView result = loginController.login(mockedRequest);
+ assertEquals(result.getViewName(),"openIdLogin") ;
+ }
+
+ @Test
+ public void loginIfAuthOIDCTest()
+ {
+ PowerMockito.mockStatic(SystemProperties.class);
+ Mockito.when(SystemProperties.getProperty(SystemProperties.AUTHENTICATION_MECHANISM)).thenReturn("OIDC");
+ ModelAndView result = loginController.login(mockedRequest);
+ assertEquals(result.getViewName(),"openIdLogin") ;
+ }
+
+ @Test
+ public void loginTest()
+ {
+ PowerMockito.mockStatic(SystemProperties.class);
+ Mockito.when(SystemProperties.getProperty(SystemProperties.AUTHENTICATION_MECHANISM)).thenReturn("Test");
+ ModelAndView result = loginController.login(mockedRequest);
+ assertEquals(result.getViewName(),"login") ;
+ }
+}
diff --git a/ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/controller/ONAPLoginControllerTest.java b/ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/controller/ONAPLoginControllerTest.java
new file mode 100644
index 00000000..06dfc902
--- /dev/null
+++ b/ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/controller/ONAPLoginControllerTest.java
@@ -0,0 +1,89 @@
+package org.openecomp.portalapp.portal.controller;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.controller.ONAPLoginController;
+import org.openecomp.portalapp.portal.framework.MockEPUser;
+import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
+import org.openecomp.portalsdk.core.auth.LoginStrategy;
+import org.openecomp.portalsdk.core.service.LoginService;
+import org.openecomp.portalsdk.core.service.ProfileService;
+import org.openecomp.portalsdk.core.service.ProfileServiceImpl;
+import org.springframework.web.servlet.ModelAndView;
+
+public class ONAPLoginControllerTest {
+
+ @Mock
+ ProfileService ProfileService = new ProfileServiceImpl();
+
+ @Mock
+ LoginService mockLoginService;
+
+ @Mock
+ LoginStrategy loginStrategy ;
+
+ @InjectMocks
+ ONAPLoginController oNAPLoginController = new ONAPLoginController();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+
+ NullPointerException nullPointerException = new NullPointerException();
+
+ MockEPUser mockUser = new MockEPUser();
+
+
+ @Test
+ public void doLogin() throws Exception
+ {
+ ModelAndView expectedModelandView = null;
+ ModelAndView actualModelandView = null;
+ Mockito.when(loginStrategy.doLogin(mockedRequest, mockedResponse)).thenReturn(expectedModelandView);
+ actualModelandView= oNAPLoginController.doLogin(mockedRequest, mockedResponse);
+ assertEquals(actualModelandView,expectedModelandView);
+ }
+
+
+ @Test
+ public void ViewTest() throws Exception
+ {
+ ModelAndView expectedModelandView = new ModelAndView();
+ expectedModelandView.setViewName("testView");
+ ModelAndView actualModelandView = null;
+ Mockito.when(loginStrategy.doLogin(mockedRequest, mockedResponse)).thenReturn(expectedModelandView);
+ actualModelandView= oNAPLoginController.doLogin(mockedRequest, mockedResponse);
+ assertEquals(actualModelandView.getViewName(),expectedModelandView.getViewName());
+ }
+ @Test
+ public void getJessionIdTest() throws Exception
+ {
+ assertNull(oNAPLoginController.getJessionId(mockedRequest));
+ }
+
+ @Test
+ public void getLoginServiceTest() throws Exception
+ {
+ LoginService expectedLoginService = oNAPLoginController.getLoginService();
+ assertEquals(mockLoginService,expectedLoginService);
+ }
+
+
+
+}
diff --git a/ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/controller/ONAPWelcomeControllerTest.java b/ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/controller/ONAPWelcomeControllerTest.java
new file mode 100644
index 00000000..c15f366a
--- /dev/null
+++ b/ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/controller/ONAPWelcomeControllerTest.java
@@ -0,0 +1,47 @@
+package org.openecomp.portalapp.portal.controller;
+
+import static org.junit.Assert.*;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.controller.ONAPWelcomeController;
+import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
+
+public class ONAPWelcomeControllerTest {
+
+ @InjectMocks
+ ONAPWelcomeController oNAPWelcomeController = new ONAPWelcomeController();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+ NullPointerException nullPointerException = new NullPointerException();
+
+ @Test
+ public void getIndexPageTest()
+ {
+ assertEquals(oNAPWelcomeController.getIndexPage(mockedRequest), "/index");
+ }
+
+ @Test
+ public void getEcompSinglePageTest()
+ {
+ assertEquals(oNAPWelcomeController.getEcompSinglePage(mockedRequest, mockedResponse), "forward:/index.html");
+ }
+
+ @Test
+ public void userTest()
+ {
+ assertEquals(oNAPWelcomeController.user(null), "oid-user");
+ }
+
+}
diff --git a/ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/controller/PortalAdminControllerOSTest.java b/ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/controller/PortalAdminControllerOSTest.java
new file mode 100644
index 00000000..65925977
--- /dev/null
+++ b/ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/controller/PortalAdminControllerOSTest.java
@@ -0,0 +1,142 @@
+/*package org.openecomp.portalapp.portal.controller;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.domain.EPRole;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.service.AdminRolesService;
+import org.openecomp.portalapp.portal.service.AdminRolesServiceImpl;
+import org.openecomp.portalapp.portal.service.PortalAdminService;
+import org.openecomp.portalapp.portal.service.PortalAdminServiceImpl;
+import org.openecomp.portalapp.portal.test.core.MockEPUser;
+import org.openecomp.portalapp.portal.transport.FieldsValidator;
+import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
+import org.openecomp.portalapp.test.framework.MockitoTestSuite;
+import org.openecomp.portalapp.util.EPUserUtils;
+import org.openecomp.portalsdk.core.service.AuditService;
+import org.openecomp.portalsdk.core.service.AuditServiceImpl;
+
+public class PortalAdminControllerOSTest {
+
+ @InjectMocks
+ PortalAdminController portalAdminController = new PortalAdminController();
+
+ @Mock
+ AdminRolesService adminRolesService = new AdminRolesServiceImpl();
+
+ @Mock
+ PortalAdminService portalAdminService = new PortalAdminServiceImpl();
+
+ @Mock
+ AuditService auditService = new AuditServiceImpl();
+
+
+ @Mock
+ EcompPortalUtils ecompPortalUtils = new EcompPortalUtils();
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+ NullPointerException nullPointerException = new NullPointerException();
+
+ @Mock
+ EPUserUtils ePUserUtils = new EPUserUtils();
+
+ MockEPUser mockUser = new MockEPUser();
+
+ @Test
+ public void deletePortalAdminIfUserIsSuperAdminTest()
+ {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+ String userInfo = "1-test";
+ assertNull(portalAdminController.deletePortalAdmin(mockedRequest, userInfo, mockedResponse));
+
+ }
+
+ @Test
+ public void deletePortalAdminTest()
+ {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+
+ FieldsValidator expectedFieldValidator = new FieldsValidator();
+ expectedFieldValidator.setHttpStatusCode((long) 200);
+ expectedFieldValidator.setFields(null);
+ expectedFieldValidator.setErrorCode(null);
+ FieldsValidator actualFieldValidator = new FieldsValidator();
+ String userInfo = "1-test";
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(true);
+ Mockito.when(portalAdminService.deletePortalAdmin((long) 1)).thenReturn(expectedFieldValidator);
+ actualFieldValidator = portalAdminController.deletePortalAdmin(mockedRequest, userInfo, mockedResponse);
+ assertEquals(actualFieldValidator,expectedFieldValidator);
+
+ }
+
+ @Test
+ public void deletePortalAdminWithNoUserInfoTest()
+ {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Mockito.when(adminRolesService.isSuperAdmin(user)).thenReturn(false);
+ String userInfo = "";
+ assertNull(portalAdminController.deletePortalAdmin(mockedRequest, userInfo, mockedResponse));
+ }
+
+ @Test
+ public void getRolesByAppExceptionTest()
+ {
+ EPUser user = mockUser.mockEPUser();;
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ List<EPRole> expectedRoleList = new ArrayList<EPRole>();
+ EPRole ePRole = new EPRole();
+ expectedRoleList.add(ePRole);
+ Long appId = (long) 1;
+ Mockito.when(adminRolesService.getRolesByApp(user, appId)).thenThrow(nullPointerException);
+ assertNull(portalAdminController.getRolesByApp(mockedRequest, appId, mockedResponse));
+ }
+
+ @Test
+ public void getRolesByAppIfUserNullTest()
+ {
+ EPUser user = null;
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ Long appId = (long) 1;
+ assertNull(portalAdminController.getRolesByApp(mockedRequest, appId, mockedResponse));
+ }
+
+ @Test
+ public void getRolesByAppTest()
+ {
+ EPUser user = mockUser.mockEPUser();
+ Mockito.when(EPUserUtils.getUserSession(mockedRequest)).thenReturn(user);
+ List<EPRole> expectedRoleList = new ArrayList<EPRole>();
+ EPRole ePRole = new EPRole();
+ expectedRoleList.add(ePRole);
+ Long appId = (long) 1;
+ Mockito.when(adminRolesService.getRolesByApp(user, appId)).thenReturn(expectedRoleList);
+ List<EPRole> actualRoleList = portalAdminController.getRolesByApp(mockedRequest, appId, mockedResponse);
+ assertEquals(actualRoleList,expectedRoleList);
+ }
+}
+*/ \ No newline at end of file
diff --git a/ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/framework/MockEPUser.java b/ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/framework/MockEPUser.java
new file mode 100644
index 00000000..d132ccf3
--- /dev/null
+++ b/ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/framework/MockEPUser.java
@@ -0,0 +1,84 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.framework;
+
+import java.util.Date;
+
+import org.openecomp.portalapp.portal.domain.EPUser;
+
+public class MockEPUser {
+
+ public EPUser mockEPUser() {
+
+ EPUser ePUser = new EPUser();
+ ePUser.setOrgId(null);
+ ePUser.setManagerId(null);
+ ePUser.setFirstName("test");
+ ePUser.setLastName("test");
+ ePUser.setMiddleInitial(null);
+ ePUser.setPhone(null);
+ ePUser.setFax(null);
+ ePUser.setCellular(null);
+ ePUser.setEmail(null);
+ ePUser.setAddressId(null);
+ ePUser.setAlertMethodCd(null);
+ ePUser.setHrid(null);
+ ePUser.setOrgUserId("guestT");
+ ePUser.setOrgCode(null);
+ ePUser.setAddress1(null);
+ ePUser.setAddress2(null);
+ ePUser.setCity(null);
+ ePUser.setState(null);
+ ePUser.setZipCode(null);
+ ePUser.setCountry(null);
+ ePUser.setOrgManagerUserId(null);
+ ePUser.setLocationClli(null);
+ ePUser.setBusinessCountryCode(null);
+ ePUser.setBusinessCountryName(null);
+ ePUser.setBusinessUnit(null);
+ ePUser.setBusinessUnitName(null);
+ ePUser.setDepartment(null);
+ ePUser.setDepartmentName(null);
+ ePUser.setCompanyCode(null);
+ ePUser.setCompany(null);
+ ePUser.setZipCodeSuffix(null);
+ ePUser.setJobTitle(null);
+ ePUser.setCommandChain(null);
+ ePUser.setSiloStatus(null);
+ ePUser.setCostCenter(null);
+ ePUser.setFinancialLocCode(null);
+
+ ePUser.setLoginId(null);
+ ePUser.setLoginPwd(null);
+ Date date = new Date();
+ ePUser.setLastLoginDate(date);
+ ePUser.setActive(true);
+ ePUser.setInternal(false);
+ ePUser.setSelectedProfileId(null);
+ ePUser.setTimeZoneId(null);
+ ePUser.setOnline(true);
+ ePUser.setChatId(null);
+ ePUser.setUserApps(null);
+ ePUser.setPseudoRoles(null);
+
+ ePUser.setId((long) -1);
+ return ePUser;
+ }
+}
diff --git a/ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/framework/MockTestSuite.java b/ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/framework/MockTestSuite.java
deleted file mode 100644
index 492079f8..00000000
--- a/ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/framework/MockTestSuite.java
+++ /dev/null
@@ -1,68 +0,0 @@
-package org.openecomp.portalapp.portal.framework;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-import org.openecomp.portalapp.portal.test.controller.AppCatalogControllerTest;
-import org.openecomp.portalapp.portal.test.controller.AppContactUsControllerTest;
-import org.openecomp.portalapp.portal.test.controller.AppsControllerExternalRequestTest;
-import org.openecomp.portalapp.portal.test.controller.AppsControllerTest;
-import org.openecomp.portalapp.portal.test.controller.BEPropertyReaderControllerTest;
-import org.openecomp.portalapp.portal.test.controller.BasicAuthAccountControllerTest;
-import org.openecomp.portalapp.portal.test.controller.CommonWidgetControllerTest;
-import org.openecomp.portalapp.portal.test.controller.ConsulClientControllerTest;
-import org.openecomp.portalapp.portal.test.controller.DashboardSearchResultControllerTest;
-import org.openecomp.portalapp.portal.test.controller.ExternalAppsRestfulControllerTest;
-import org.openecomp.portalapp.portal.test.controller.FunctionalMenuControllerTest;
-import org.openecomp.portalapp.portal.test.controller.GetAccessControllerTest;
-import org.openecomp.portalapp.portal.test.controller.ManifestControllerTest;
-import org.openecomp.portalapp.portal.test.controller.MicroserviceControllerTest;
-import org.openecomp.portalapp.portal.test.controller.MicroserviceProxyControllerTest;
-import org.openecomp.portalapp.portal.test.controller.PortalAdminControllerTest;
-import org.openecomp.portalapp.portal.test.controller.RolesApprovalSystemControllerTest;
-import org.openecomp.portalapp.portal.test.controller.TicketEventControllerTest;
-import org.openecomp.portalapp.portal.test.controller.UserControllerTest;
-import org.openecomp.portalapp.portal.test.controller.UserNotificationControllerTest;
-import org.openecomp.portalapp.portal.test.controller.UserRolesControllerTest;
-import org.openecomp.portalapp.portal.test.controller.WebAnalyticsExtAppControllerTest;
-import org.openecomp.portalapp.portal.test.controller.WidgetsCatalogMarkupControllerTest;
-
-
-
-/**
- *
- *
- * Create the Test class in ecmop-portal-BE-common-test and extend from MockitoTestSuite
- * Add the class in Suite to test it
- *
- */
-
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
-UserRolesControllerTest.class,
-FunctionalMenuControllerTest.class,
-AppCatalogControllerTest.class,
-AppContactUsControllerTest.class,
-UserNotificationControllerTest.class,
-TicketEventControllerTest.class,
-CommonWidgetControllerTest.class,
-ConsulClientControllerTest.class,
-GetAccessControllerTest.class,
-AppsControllerTest.class,
-BasicAuthAccountControllerTest.class,
-DashboardSearchResultControllerTest.class,
-//PortalAdminControllerTest.class,
-ManifestControllerTest.class,
-BEPropertyReaderControllerTest.class,
-WebAnalyticsExtAppControllerTest.class,
-AppsControllerExternalRequestTest.class,
-WidgetsCatalogMarkupControllerTest.class,
-RolesApprovalSystemControllerTest.class,
-MicroserviceProxyControllerTest.class,
-MicroserviceControllerTest.class,
-ExternalAppsRestfulControllerTest.class,
-UserControllerTest.class
-})
-public class MockTestSuite {
-
-}
-
diff --git a/ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/framework/MockitoTestSuite.java b/ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/framework/MockitoTestSuite.java
new file mode 100644
index 00000000..3ff837dc
--- /dev/null
+++ b/ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/framework/MockitoTestSuite.java
@@ -0,0 +1,75 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.portal.framework;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletRequestWrapper;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mockito;
+import org.mockito.runners.MockitoJUnitRunner;
+
+@RunWith(MockitoJUnitRunner.class)
+public class MockitoTestSuite {
+
+
+ public MockHttpServletRequestWrapper mockedRequest = new MockHttpServletRequestWrapper(
+ Mockito.mock(HttpServletRequest.class));
+ public HttpServletResponse mockedResponse = Mockito.mock(HttpServletResponse.class);
+
+ public MockHttpServletRequestWrapper getMockedRequest() {
+ return mockedRequest;
+ }
+
+ public HttpServletResponse getMockedResponse() {
+ return mockedResponse;
+ }
+
+ public class MockHttpServletRequestWrapper extends HttpServletRequestWrapper {
+
+ HttpSession session = Mockito.mock(HttpSession.class);
+
+ public MockHttpServletRequestWrapper(HttpServletRequest request) {
+ super(request);
+
+ }
+
+ @Override
+ public HttpSession getSession() {
+
+ return session;
+ }
+
+ @Override
+ public HttpSession getSession(boolean create) {
+
+ return session;
+ }
+
+ }
+ @Test
+ public void test()
+ {
+ assert(true);
+ }
+}
diff --git a/ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/service/RemoteWebServiceCallServiceImplTest.java b/ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/service/RemoteWebServiceCallServiceImplTest.java
new file mode 100644
index 00000000..d38525b3
--- /dev/null
+++ b/ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/service/RemoteWebServiceCallServiceImplTest.java
@@ -0,0 +1,148 @@
+package org.openecomp.portalapp.portal.service;
+
+import static org.junit.Assert.*;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.domain.EPApp;
+import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
+import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
+import org.openecomp.portalapp.service.RemoteWebServiceCallServiceImpl;
+import org.openecomp.portalsdk.core.onboarding.util.CipherUtil;
+import org.openecomp.portalsdk.core.service.DataAccessService;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest({ CipherUtil.class , SystemProperties.class})
+public class RemoteWebServiceCallServiceImplTest {
+
+
+ @InjectMocks
+ RemoteWebServiceCallServiceImpl remoteWebServiceCallServiceImpl = new RemoteWebServiceCallServiceImpl();
+
+ @Mock
+ AppsCacheService appCacheService;
+
+ @Mock
+ DataAccessService dataAccessService;
+
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+
+ NullPointerException nullPointerException = new NullPointerException();
+
+ @Test
+ public void verifyRESTCredentialTest() throws Exception
+ {
+ PowerMockito.mockStatic(CipherUtil.class);
+ PowerMockito.mockStatic(SystemProperties.class);
+ String criteria= " where ueb_key = 'requestUebKey'";
+ List<EPApp> appList = new ArrayList<>();
+ EPApp app = new EPApp();
+ app.setAppPassword("password");
+ appList.add(app);
+ Mockito.when(dataAccessService.getList(EPApp.class, criteria.toString(), null, null)).thenReturn(appList);
+ String secretKey = null;
+ Mockito.when(SystemProperties.getProperty(SystemProperties.Decryption_Key)).thenReturn(secretKey);
+ Mockito.when(CipherUtil.decrypt("password",
+ secretKey == null ? null : secretKey)).thenReturn("pwd");
+ assertFalse(remoteWebServiceCallServiceImpl.verifyRESTCredential(secretKey,"requestUebKey","requestAppName","requestPassword"));
+ }
+
+ @Test
+ public void verifyRESTCredentialExceptionTest() throws Exception
+ {
+ PowerMockito.mockStatic(CipherUtil.class);
+ PowerMockito.mockStatic(SystemProperties.class);
+ String criteria= " where ueb_key = 'requestUebKey'";
+ List<EPApp> appList = new ArrayList<>();
+ EPApp app = new EPApp();
+ app.setAppPassword("password");
+ app.setUsername("requestAppName");
+ appList.add(app);
+ Mockito.when(dataAccessService.getList(EPApp.class, criteria.toString(), null, null)).thenReturn(appList);
+ String secretKey = null;
+ Mockito.when(SystemProperties.getProperty(SystemProperties.Decryption_Key)).thenReturn(secretKey);
+ Mockito.when(CipherUtil.decrypt("password",
+ secretKey == null ? null : secretKey)).thenReturn("pwd");
+ assertTrue(remoteWebServiceCallServiceImpl.verifyRESTCredential(secretKey,"requestUebKey","requestAppName","pwd"));
+ }
+
+ @Test
+ public void verifyRESTCredentialIfAppNullTest() throws Exception
+ {
+ PowerMockito.mockStatic(CipherUtil.class);
+ PowerMockito.mockStatic(SystemProperties.class);
+ String criteria= " where ueb_key = 'requestUebKey'";
+ List<EPApp> appList = new ArrayList<>();
+ EPApp app = new EPApp();
+ app.setAppPassword("password");
+ app.setUsername("requestAppName");
+ appList.add(app);
+ Mockito.when(dataAccessService.getList(EPApp.class, criteria.toString(), null, null)).thenReturn(null);
+ String secretKey = null;
+ Mockito.when(SystemProperties.getProperty(SystemProperties.Decryption_Key)).thenReturn(secretKey);
+ Mockito.when(CipherUtil.decrypt("password",
+ secretKey == null ? null : secretKey)).thenReturn("pwd");
+ assertFalse(remoteWebServiceCallServiceImpl.verifyRESTCredential(secretKey,"requestUebKey","requestAppName","pwd"));
+ }
+
+ @Test
+ public void verifyAppKeyCredentialIfKeyIsNullTest() throws Exception
+ {
+ assertFalse(remoteWebServiceCallServiceImpl.verifyAppKeyCredential(null));
+ }
+
+ @Test
+ public void verifyAppKeyCredentialTest() throws Exception
+ {
+ PowerMockito.mockStatic(CipherUtil.class);
+ PowerMockito.mockStatic(SystemProperties.class);
+ StringBuffer criteria = new StringBuffer("where ueb_key = 'requestUebKey'");
+// String criteria= " where ueb_key = 'requestUebKey'";
+ List<EPApp> appList = new ArrayList<>();
+ EPApp app = new EPApp();
+ app.setAppPassword("password");
+ app.setUsername("requestAppName");
+ appList.add(app);
+ Mockito.when(dataAccessService.getList(EPApp.class, criteria.toString(), null, null)).thenReturn(null);
+ assertFalse(remoteWebServiceCallServiceImpl.verifyAppKeyCredential("test"));
+ }
+
+ @Test
+ public void verifyAppKeyCredentialSuccessTest() throws Exception
+ {
+ PowerMockito.mockStatic(CipherUtil.class);
+ PowerMockito.mockStatic(SystemProperties.class);
+ String criteria= " where ueb_key = 'test'";
+ List<EPApp> appList = new ArrayList<>();
+ EPApp app = new EPApp();
+ app.setAppPassword("password");
+ app.setUsername("requestAppName");
+ appList.add(app);
+ Mockito.when(dataAccessService.getList(EPApp.class, criteria.toString(), null, null)).thenReturn(appList);
+ assertTrue(remoteWebServiceCallServiceImpl.verifyAppKeyCredential("test"));
+ }
+}
diff --git a/ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/service/SearchServiceImplTest.java b/ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/service/SearchServiceImplTest.java
new file mode 100644
index 00000000..fd6578f8
--- /dev/null
+++ b/ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/service/SearchServiceImplTest.java
@@ -0,0 +1,189 @@
+package org.openecomp.portalapp.portal.service;
+
+import static org.junit.Assert.*;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.openecomp.portalapp.portal.domain.EPUser;
+import org.openecomp.portalapp.portal.framework.MockEPUser;
+import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
+import org.openecomp.portalapp.portal.transport.UserWithNameSurnameTitle;
+import org.openecomp.portalapp.portal.utils.EcompPortalUtils;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+
+
+@RunWith(PowerMockRunner.class)
+@PrepareForTest({ EcompPortalUtils.class})
+public class SearchServiceImplTest {
+
+ @InjectMocks
+ SearchServiceImpl searchServiceImpl = new SearchServiceImpl();
+
+ @Mock
+ UserService userService;
+
+
+ @Before
+ public void setup() {
+ MockitoAnnotations.initMocks(this);
+ }
+
+ MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+
+ HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+ HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+
+ NullPointerException nullPointerException = new NullPointerException();
+ MockEPUser mockUser = new MockEPUser();
+
+ @Test
+ public void searchUsersInPhoneBookTest()
+ {
+ PowerMockito.mockStatic(EcompPortalUtils.class);
+ List<String> list = new ArrayList<>();
+ String str = "Test";
+ list.add(str);
+ Mockito.when(EcompPortalUtils.parsingByRegularExpression("Test", " ")).thenReturn(list);
+ assertEquals(searchServiceImpl.searchUsersInPhoneBook("Test"), "[]");
+ }
+
+ @Test
+ public void searchUsersInFnTableToFindUserIdTest()
+ {
+ PowerMockito.mockStatic(EcompPortalUtils.class);
+ List<String> list = new ArrayList<>();
+ String str = "Test";
+ String str2 = "Test new";
+ String str1 = "Test new1";
+ list.add(str);
+ list.add(str1);
+ list.add(str2);
+ Mockito.when(EcompPortalUtils.parsingByRegularExpression("Test", " ")).thenReturn(list);
+ List<EPUser> userList = new ArrayList();
+ EPUser user = mockUser.mockEPUser();
+ user.setLastName("Test new");
+ userList.add(user);
+ Mockito.when( this.userService.getUserByFirstLastName("Test","Test new")).thenReturn(userList);
+ String result = searchServiceImpl.searchUsersInPhoneBook("Test");
+ assertEquals("[{\"orgUserId\":\"guestT\",\"firstName\":\"test\",\"lastName\":\"Test new\",\"jobTitle\":null}]" , result);
+ }
+
+
+
+ @Test
+ public void searchUsersInFnTableFirstNameTest()
+ {
+ PowerMockito.mockStatic(EcompPortalUtils.class);
+ List<String> list = new ArrayList<>();
+ String str = "TestTT";
+ String str2 = "Test new1";
+ String str1 = "Test new";
+ String str3 = "Test new2";
+ list.add(str);
+ list.add(str1);
+ list.add(str2);
+ list.add(str3);
+ Mockito.when(EcompPortalUtils.parsingByRegularExpression("TestTT", " ")).thenReturn(list);
+ List<EPUser> userList = new ArrayList();
+ EPUser user = mockUser.mockEPUser();
+ user.setLastName("Test new");
+ user.setFirstName(null);
+ userList.add(user);
+ Mockito.when( this.userService.getUserByFirstLastName("TestTT","Test new")).thenReturn(userList);
+ assertEquals(searchServiceImpl.searchUsersInPhoneBook("TestTT"), "[]"); }
+
+
+ @Test
+ public void searchUsersInFnTableLastNameTest()
+ {
+ PowerMockito.mockStatic(EcompPortalUtils.class);
+ List<String> list = new ArrayList<>();
+ String str = "Test";
+ String str2 = "Test new";
+ String str1 = "Test new1";
+ list.add(str);
+ list.add(str1);
+ list.add(str2);
+ Mockito.when(EcompPortalUtils.parsingByRegularExpression("Test", " ")).thenReturn(list);
+ List<EPUser> userList = new ArrayList();
+ EPUser user = mockUser.mockEPUser();
+ user.setLastName(null);
+ userList.add(user);
+ Mockito.when( this.userService.getUserByFirstLastName("Test","Test new")).thenReturn(userList);
+ assertEquals(searchServiceImpl.searchUsersInPhoneBook("Test"), "[]"); }
+
+
+
+ @Test
+ public void searchUserByUserIdTest()
+ {
+ List<EPUser> userList = new ArrayList();
+ EPUser user = mockUser.mockEPUser();
+ user.setLastName("Test new");
+ userList.add(user);
+ List<EPUser> foundUsers = new ArrayList<EPUser>();
+ Mockito.when(this.userService.getUserByUserId("guestT")).thenReturn(userList);
+
+ EPUser expectedUser = searchServiceImpl.searchUserByUserId("guestT");
+ assertEquals(user, expectedUser);
+ }
+
+ @Test
+ public void searchUserByUserIdExceptionTest()
+ {
+ Mockito.when(this.userService.getUserByUserId("guestT")).thenThrow(nullPointerException);
+ assertNull(searchServiceImpl.searchUserByUserId("guestT"));
+
+ }
+
+ @Test
+ public void searchUsersByUserIdTest()
+ {
+
+ List<EPUser> userList = new ArrayList();
+ EPUser user = mockUser.mockEPUser();
+ user.setLastName("Test new");
+ userList.add(user);
+ Mockito.when(this.userService.getUserByUserId("guestT")).thenReturn(userList);
+ List<UserWithNameSurnameTitle> foundUsers = searchServiceImpl.searchUsersByUserId(user);
+ assertEquals(foundUsers.size(), 1);
+
+ }
+
+ @Test
+ public void searchUsersByUserIdExceptionTest()
+ {
+ EPUser user = mockUser.mockEPUser();
+ user.setLastName("Test new");
+ Mockito.when(this.userService.getUserByUserId("guestT")).thenThrow(nullPointerException);
+ List<UserWithNameSurnameTitle> foundUsers = searchServiceImpl.searchUsersByUserId(user);
+ assertEquals(foundUsers.size(), 0);
+
+ }
+
+ @Test
+ public void searchUsersByNameExceptionTest()
+ {
+ EPUser user = mockUser.mockEPUser();
+ user.setLastName("test");
+ user.setFirstName("test");
+
+ Mockito.when(this.userService.getUserByFirstLastName("test","test")).thenThrow(nullPointerException);
+ List<UserWithNameSurnameTitle> foundUsers = searchServiceImpl.searchUsersByName(user);
+ assertEquals(foundUsers.size(), 0);
+
+ }
+}
diff --git a/ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/service/UserServiceImplTest.java b/ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/service/UserServiceImplTest.java
new file mode 100644
index 00000000..63a710eb
--- /dev/null
+++ b/ecomp-portal-BE-os/src/test/java/org/openecomp/portalapp/portal/service/UserServiceImplTest.java
@@ -0,0 +1,63 @@
+//package org.openecomp.portalapp.portal.service;
+//
+//import javax.servlet.http.HttpServletRequest;
+//import javax.servlet.http.HttpServletResponse;
+//
+//import org.junit.Before;
+//import org.junit.Test;
+//import org.junit.runner.RunWith;
+//import org.mockito.InjectMocks;
+//import org.mockito.Mock;
+//import org.mockito.Mockito;
+//import org.mockito.MockitoAnnotations;
+//import org.openecomp.portalapp.portal.framework.MockitoTestSuite;
+//import org.openecomp.portalapp.portal.utils.EPSystemProperties;
+//import org.openecomp.portalsdk.core.service.DataAccessService;
+//import org.openecomp.portalsdk.core.util.SystemProperties;
+//import org.powermock.api.mockito.PowerMockito;
+//
+//import java.io.BufferedReader;
+//import java.io.IOException;
+//import java.io.InputStreamReader;
+//import java.io.UnsupportedEncodingException;
+//import java.net.HttpURLConnection;
+//import org.powermock.core.classloader.annotations.PrepareForTest;
+//import org.powermock.modules.junit4.PowerMockRunner;
+//
+//
+//@RunWith(PowerMockRunner.class)
+//@PrepareForTest({ SystemProperties.class , EPSystemProperties.class , SystemProperties.class})
+//public class UserServiceImplTest {
+//
+//
+// @InjectMocks
+// UserServiceImpl userServiceImpl = new UserServiceImpl();
+//
+// @Mock
+// DataAccessService dataAccessService;
+//
+// @Mock
+// HttpURLConnection con;
+//
+// @Before
+// public void setup() {
+// MockitoAnnotations.initMocks(this);
+// }
+//
+// MockitoTestSuite mockitoTestSuite = new MockitoTestSuite();
+//
+// HttpServletRequest mockedRequest = mockitoTestSuite.getMockedRequest();
+// HttpServletResponse mockedResponse = mockitoTestSuite.getMockedResponse();
+//
+// @Test
+// public void getUserByUserIdTest() throws UnsupportedEncodingException, IOException
+// {
+// BufferedReader reader = new BufferedReader(new InputStreamReader(con.getInputStream(), "UTF-8"));
+// PowerMockito.mockStatic(SystemProperties.class);
+// PowerMockito.mockStatic(EPSystemProperties.class);
+// Mockito.when(SystemProperties.getProperty(SystemProperties.AUTHENTICATION_MECHANISM)).thenReturn("OIDC");
+// Mockito.when(EPSystemProperties.getProperty(EPSystemProperties.AUTH_USER_SERVER)).thenReturn("http://www.google.com");
+// Mockito.when(new BufferedReader(new InputStreamReader(con.getInputStream(), "UTF-8"))).thenReturn(reader).thenReturn(reader);
+// userServiceImpl.getUserByUserId("guestT");
+// }
+//}
diff --git a/ecomp-portal-DB-common/EcompPortalDDLMySql_1710_Common.sql b/ecomp-portal-DB-common/EcompPortalDDLMySql_1710_Common.sql
index 99cbdfa1..1ff699f4 100644
--- a/ecomp-portal-DB-common/EcompPortalDDLMySql_1710_Common.sql
+++ b/ecomp-portal-DB-common/EcompPortalDDLMySql_1710_Common.sql
@@ -1284,7 +1284,7 @@ create table ep_endpoints_basic_auth_account (
CREATE TABLE ep_app_function (
app_id INT(11) NOT NULL,
-function_cd VARCHAR(50) NOT NULL,
+function_cd VARCHAR(250) NOT NULL,
function_name VARCHAR(50) NOT NULL,
PRIMARY KEY (function_cd, app_id),
INDEX fk_ep_app_function_app_id (app_id),
@@ -1299,7 +1299,7 @@ CREATE TABLE `ep_app_role_function` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`app_id` INT(11) NOT NULL,
`role_id` INT(11) NOT NULL,
-`function_cd` VARCHAR(50) NOT NULL,
+`function_cd` VARCHAR(250) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE INDEX `UNIQUE KEY` (`app_id`, `role_id`, `function_cd`),
CONSTRAINT `fk_ep_app_role_function_app_id` FOREIGN KEY (`app_id`) REFERENCES `fn_app` (`app_id`),
diff --git a/ecomp-portal-FE-common/client/app/directives/search-users/search-users.controller.spec.js b/ecomp-portal-FE-common/client/app/directives/search-users/search-users.controller.spec.js
index e3c9711c..5cdac0b3 100644
--- a/ecomp-portal-FE-common/client/app/directives/search-users/search-users.controller.spec.js
+++ b/ecomp-portal-FE-common/client/app/directives/search-users/search-users.controller.spec.js
@@ -75,7 +75,7 @@
// it('should populate retrieved users when search users service returns a list ', ()=> {
// //spyOn(usersServiceMock, 'searchUsers');
// let usersListRes = [{user: 1}, {user: 2}];
-// newCtrl.searchUserString = 'some att user name';
+// newCtrl.searchUserString = 'some org user name';
// deferredUsersList.resolve(usersListRes);
// newCtrl.searchUsers();
// $rootScope.$apply();
diff --git a/ecomp-portal-FE-common/client/app/services/notification/notification.service.js b/ecomp-portal-FE-common/client/app/services/notification/notification.service.js
index d7d46079..0eea70c4 100644
--- a/ecomp-portal-FE-common/client/app/services/notification/notification.service.js
+++ b/ecomp-portal-FE-common/client/app/services/notification/notification.service.js
@@ -17,9 +17,7 @@
* limitations under the License.
* ================================================================================
*/
-/**
- * Created by wl849v on 12/14/2016.
- */
+
'use strict';
(function () {
class NotificationService {
diff --git a/ecomp-portal-FE-common/client/app/views/dashboard/dashboard-widget.controller.js b/ecomp-portal-FE-common/client/app/views/dashboard/dashboard-widget.controller.js
index aff4e0c1..7767cdbb 100644
--- a/ecomp-portal-FE-common/client/app/views/dashboard/dashboard-widget.controller.js
+++ b/ecomp-portal-FE-common/client/app/views/dashboard/dashboard-widget.controller.js
@@ -132,8 +132,7 @@
dashboardService.saveCommonWidgetData($scope.newWidgetObject)
.then(function(res){
- if (res.status == 'OK') {
- $scope.widgetForm.$setPristine();
+ if (res.status == 'OK') {
confirmBoxService.showInformation('You have added a new item').then(isConfirmed => {
});
dashboardService.getCommonWidgetData(message.type)
diff --git a/ecomp-portal-FE-common/client/app/views/functionalMenu/functionalMenu-dialog/menu-details.controller.js b/ecomp-portal-FE-common/client/app/views/functionalMenu/functionalMenu-dialog/menu-details.controller.js
index a425297a..764399a8 100644
--- a/ecomp-portal-FE-common/client/app/views/functionalMenu/functionalMenu-dialog/menu-details.controller.js
+++ b/ecomp-portal-FE-common/client/app/views/functionalMenu/functionalMenu-dialog/menu-details.controller.js
@@ -290,9 +290,7 @@
functionalMenuService.saveEditedMenuItem(activeMenuItem)
.then(() => {
$log.debug('MenuDetailsModalCtrl::saveChanges: Menu Item saved');
- // $scope.closeThisDialog(true);
- $scope.$dismiss('cancel');
-
+ $scope.$close(true);
}).catch(err => {
if(err.status === 409){//Conflict
handleConflictErrors(err);
diff --git a/ecomp-portal-FE-common/client/app/views/header/header.less b/ecomp-portal-FE-common/client/app/views/header/header.less
index 5a6314f9..eb0f14a7 100644
--- a/ecomp-portal-FE-common/client/app/views/header/header.less
+++ b/ecomp-portal-FE-common/client/app/views/header/header.less
@@ -510,6 +510,13 @@ column-count: 4;
}
+#header-favorites{
+ height:200px;
+ overflow:auto;
+ overflow-x:hidden;
+ -ms-overflow-x:hidden;
+}
+
#header-favorites ul li{
width:100%;
}
diff --git a/ecomp-portal-FE-common/client/app/views/microservice-onboarding/microservice-add-details/microservice-add-details.js b/ecomp-portal-FE-common/client/app/views/microservice-onboarding/microservice-add-details/microservice-add-details.js
index c992b9a0..dff938a2 100644
--- a/ecomp-portal-FE-common/client/app/views/microservice-onboarding/microservice-add-details/microservice-add-details.js
+++ b/ecomp-portal-FE-common/client/app/views/microservice-onboarding/microservice-add-details/microservice-add-details.js
@@ -213,10 +213,10 @@
userProfileService.getUserProfile()
.then(profile=> {
$log.info('AppDetailsModalCtrl::emptyCookies profile: ', profile);
- $scope.attuid = profile.attuid;
- $log.info('user has the following attuid: ' + profile.attuid);
- if ($cookies.getObject($scope.attuid + '_widget') != undefined && $cookies.getObject($scope.attuid + '_widget') != null) {
- $cookies.remove($scope.attuid + '_widget');
+ $scope.orgUserId = profile.orgUserId;
+ $log.info('user has the following orgUserId: ' + profile.orgUserId);
+ if ($cookies.getObject($scope.orgUserId + '_widget') != undefined && $cookies.getObject($scope.orgUserId + '_widget') != null) {
+ $cookies.remove($scope.orgUserId + '_widget');
}
});
};
diff --git a/ecomp-portal-FE-common/client/app/views/user-notifications-admin/user.notifications.modal.controller.js b/ecomp-portal-FE-common/client/app/views/user-notifications-admin/user.notifications.modal.controller.js
index 366fb215..65395f16 100644
--- a/ecomp-portal-FE-common/client/app/views/user-notifications-admin/user.notifications.modal.controller.js
+++ b/ecomp-portal-FE-common/client/app/views/user-notifications-admin/user.notifications.modal.controller.js
@@ -793,55 +793,4 @@
userNotificationsModalCtrl.$inject = ['$scope', '$log', 'functionalMenuService', 'confirmBoxService', 'notificationService', '$modal', 'ngDialog', '$state', '$filter', 'items'];
angular.module('ecompApp').controller('userNotificationsModalCtrl', userNotificationsModalCtrl);
- angular.module('ecompApp').directive('attDatepickerCustom', ['$log', function($log) {
- return {
- restrict: 'A',
- require: 'ngModel',
- scope: {},
-
- controller: ['$scope', '$element', '$attrs', '$compile', 'datepickerConfig', 'datepickerService', function($scope, $element, $attrs, $compile, datepickerConfig, datepickerService) {
- var dateFormatString = angular.isDefined($attrs.dateFormat) ? $scope.$parent.$eval($attrs.dateFormat) : datepickerConfig.dateFormat;
- var selectedDateMessage = '<div class="sr-focus hidden-spoken" tabindex="-1">the date you selected is {{$parent.current | date : \'' + dateFormatString + '\'}}</div>';
- $element.removeAttr('att-datepicker-custom');
- $element.removeAttr('ng-model');
- $element.attr('ng-value', '$parent.current | date:"EEEE, MMMM d, y"');
- $element.attr('aria-describedby', 'datepicker');
-
- $element.attr('maxlength', 10);
-
- var wrapperElement = angular.element('<div></div>');
- wrapperElement.attr('datepicker-popup', '');
- wrapperElement.attr('current', 'current');
-
- datepickerService.setAttributes($attrs, wrapperElement);
- datepickerService.bindScope($attrs, $scope);
-
- wrapperElement.html('');
- wrapperElement.append($element.prop('outerHTML'));
- if (navigator.userAgent.match(/MSIE 8/) === null) {
- wrapperElement.append(selectedDateMessage);
- }
- var elm = wrapperElement.prop('outerHTML');
- elm = $compile(elm)($scope);
- $element.replaceWith(elm);
- }],
- link: function(scope, elem, attr, ctrl) {
- if (!ctrl) {
- // do nothing if no ng-model
- $log.error("ng-model is required.");
- return;
- }
-
- scope.$watch('current', function(value) {
- ctrl.$setViewValue(value);
- });
- ctrl.$render = function() {
- scope.current = ctrl.$viewValue;
- };
-
- }
- };
- }]);
-
-
})(); \ No newline at end of file
diff --git a/ecomp-portal-FE-common/client/app/views/user-notifications-admin/user.notifications.modal.page.html b/ecomp-portal-FE-common/client/app/views/user-notifications-admin/user.notifications.modal.page.html
index 5d1698e5..95da7812 100644
--- a/ecomp-portal-FE-common/client/app/views/user-notifications-admin/user.notifications.modal.page.html
+++ b/ecomp-portal-FE-common/client/app/views/user-notifications-admin/user.notifications.modal.page.html
@@ -6,7 +6,7 @@
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
+ You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@@ -136,7 +136,7 @@
<small class="mandatory-categories">Please enter valid date in MM/DD/YYYY format!</small>
</div>
<div id="user-startdate-required" ng-show="!isStartDateValidFromToday(newNotifModel.startTime)">
- <small class="date-validation">Date should be greater than or equal to current date!</small>
+ <small class="date-validation">Date should not be greater than 4 months from current date!</small>
</div>
</div>
</div>
@@ -158,7 +158,7 @@
<small class="mandatory-categories">Please enter valid date in MM/DD/YYYY format!</small>
</div>
<div id="user-startdate-required" ng-show="!isStartDateValidFromToday(newNotifModel.endTime)">
- <small class="endDate-validation">Date should be greater than or equal to current date!</small>
+ <small class="endDate-validation">Date should not be greater than 4 months from current date!</small>
</div>
<div id="user-enddate-error" ng-show="newNotifModel.endTime&&newNotifModel.startTime&&newNotifModel.startTime.getTime()>=newNotifModel.endTime.getTime()" class="user-enddate-error-txt">
<small class="mandatory-categories">End Date must be greater than start Date</small>
diff --git a/ecomp-portal-FE-common/client/app/views/users/new-user-dialogs/new-user.controller.js b/ecomp-portal-FE-common/client/app/views/users/new-user-dialogs/new-user.controller.js
index 5367ecf8..10d6c954 100644
--- a/ecomp-portal-FE-common/client/app/views/users/new-user-dialogs/new-user.controller.js
+++ b/ecomp-portal-FE-common/client/app/views/users/new-user-dialogs/new-user.controller.js
@@ -174,11 +174,17 @@
app.isDoneUpdating = true;
this.numberAppsSucceeded++;
}).catch(err => {
- $log.error(err);
- app.isErrorUpdating = true;
+ $log.error(err);
+ var errorMessage = 'Failed to update the user application roles: ' + err.status;
+ if(err.status == 504){
+ this.numberAppsSucceeded++;
+ errorMessage = 'Request is being processed, please check back later!';
+ } else{
+ app.isErrorUpdating = true;
+ }
confirmBoxService.showInformation(
- 'Failed to update the user application roles: ' + err.status)
- .then(isConfirmed => {});
+ errorMessage)
+ .then(isConfirmed => {});
}).finally(()=>{
this.numberAppsProcessed++;
if (this.numberAppsProcessed === this.adminApps.length) {
diff --git a/ecomp-portal-FE-common/client/app/views/widget-onboarding/widget-onboarding.controller.js b/ecomp-portal-FE-common/client/app/views/widget-onboarding/widget-onboarding.controller.js
index 8dc2201b..a5793629 100644
--- a/ecomp-portal-FE-common/client/app/views/widget-onboarding/widget-onboarding.controller.js
+++ b/ecomp-portal-FE-common/client/app/views/widget-onboarding/widget-onboarding.controller.js
@@ -122,7 +122,7 @@
};
this.filterByDropdownValue = item => {
- if(this.filterByApp.value === '')
+ if(this.filterByApp.value === '' || this.filterByApp.value === 'All Applications')
return true;
for(var i = 0; i < item.appName.length; i++){
diff --git a/ecomp-portal-FE-os/client/src/services/recommendation/recommendation.service.js b/ecomp-portal-FE-os/client/src/services/recommendation/recommendation.service.js
index 4df4e394..2fe1d80f 100644
--- a/ecomp-portal-FE-os/client/src/services/recommendation/recommendation.service.js
+++ b/ecomp-portal-FE-os/client/src/services/recommendation/recommendation.service.js
@@ -17,8 +17,5 @@
* limitations under the License.
* ================================================================================
*/
-/**
- * Created by wl849v on 12/14/2016.
- */
/*As Recommendation code belongs to internal use Just kept an empty file in order to avoid 404 errors in the browser console */ \ No newline at end of file
diff --git a/ecomp-portal-FE-os/client/src/views/applications/application-details-dialog/application-details.controller.js b/ecomp-portal-FE-os/client/src/views/applications/application-details-dialog/application-details.controller.js
index 550b9faf..689329f5 100644
--- a/ecomp-portal-FE-os/client/src/views/applications/application-details-dialog/application-details.controller.js
+++ b/ecomp-portal-FE-os/client/src/views/applications/application-details-dialog/application-details.controller.js
@@ -116,8 +116,8 @@
userProfileService.getUserProfile()
.then(profile=> {
// $log.info(profile);
- $scope.orgUserId = profile.attuid;
- $log.debug('AppDetailsModalCtrl:emptyCookies for the following attuid: ' + profile.attuid);
+ $scope.orgUserId = profile.orgUserId;
+ $log.debug('AppDetailsModalCtrl:emptyCookies for the following orgUserId: ' + profile.orgUserId);
if ($cookies.getObject($scope.orgUserId + '_apps') != undefined && $cookies.getObject($scope.orgUserId + '_apps') != null) {
$cookies.remove($scope.orgUserId + '_apps');
$log.debug('AppDetailsModalCtrl:emptyCookies removed: ' + $scope.orgUserId + '_apps');
diff --git a/ecomp-portal-FE-os/client/src/views/search/search.tpl.html b/ecomp-portal-FE-os/client/src/views/search/search.tpl.html
index a08d0aa6..d3f5a9e7 100644
--- a/ecomp-portal-FE-os/client/src/views/search/search.tpl.html
+++ b/ecomp-portal-FE-os/client/src/views/search/search.tpl.html
@@ -35,7 +35,7 @@
<div id="reg-header-snippet">
<div tabindex="0" class="reg-profileDetails" id="reg-searchPop-id">
- <div id="contentVertical" att-scrollbar="y"
+ <div id="contentVertical"
class="ng-scope vertical" style="position: relative;">
<ul class="searchUl">
<li><a class="icon-tiles"></a> <a id="search-app-title"
diff --git a/ecomp-portal-FE-os/pom.xml b/ecomp-portal-FE-os/pom.xml
index ae3921ad..894d39d1 100644
--- a/ecomp-portal-FE-os/pom.xml
+++ b/ecomp-portal-FE-os/pom.xml
@@ -36,7 +36,14 @@
</filesets>
</configuration>
</plugin>
-
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <version>0.7.6.201602180812</version>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
diff --git a/ecomp-portal-widget-ms/common-widgets/events-widget/js/controller.js b/ecomp-portal-widget-ms/common-widgets/events-widget/js/controller.js
index 8ccebeee..3298432b 100644
--- a/ecomp-portal-widget-ms/common-widgets/events-widget/js/controller.js
+++ b/ecomp-portal-widget-ms/common-widgets/events-widget/js/controller.js
@@ -15,27 +15,7 @@ function EventsCtrl($rootScope, applicationsService , $log,
$scope.editData = JSON.stringify(availableData);
$scope.availableDataTemp = $scope.availableData;
- ngDialog.open({
- templateUrl : 'app/views/dashboard/dashboard-widget-manage.html',
- controller : 'CommonWidgetController',
- resolve : {
- message : function message() {
- var message = {
- type : resourceType,
- availableData : $scope.editData
- };
- return message;
- }
- }
- }).closePromise.then(needUpdate => {
- if(resourceType=='NEWS'){
- $scope.updateNews();
- }else if(resourceType=='EVENTS'){
- $scope.updateEvents();
- }else if(resourceType=='IMPORTANTRESOURCES'){
- $scope.updateImportRes();
- }
- });
+
};
/*Setting News data*/
$scope.eventData = [];
diff --git a/ecomp-portal-widget-ms/common-widgets/news-widget/js/controller.js b/ecomp-portal-widget-ms/common-widgets/news-widget/js/controller.js
index 13133339..b5880c0e 100644
--- a/ecomp-portal-widget-ms/common-widgets/news-widget/js/controller.js
+++ b/ecomp-portal-widget-ms/common-widgets/news-widget/js/controller.js
@@ -16,27 +16,7 @@ function NewsCtrl($rootScope, applicationsService , $log,
$scope.editData = JSON.stringify(availableData);
$scope.availableDataTemp = $scope.availableData;
- ngDialog.open({
- templateUrl : 'app/views/dashboard/dashboard-widget-manage.html',
- controller : 'CommonWidgetController',
- resolve : {
- message : function message() {
- var message = {
- type : resourceType,
- availableData : $scope.editData
- };
- return message;
- }
- }
- }).closePromise.then(needUpdate => {
- if(resourceType=='NEWS'){
- $scope.updateNews();
- }else if(resourceType=='EVENTS'){
- $scope.updateEvents();
- }else if(resourceType=='IMPORTANTRESOURCES'){
- $scope.updateImportRes();
- }
- });
+
};
/*Setting News data*/
diff --git a/ecomp-portal-widget-ms/common-widgets/pom.xml b/ecomp-portal-widget-ms/common-widgets/pom.xml
index 6a6d54bd..a5b51bf6 100644
--- a/ecomp-portal-widget-ms/common-widgets/pom.xml
+++ b/ecomp-portal-widget-ms/common-widgets/pom.xml
@@ -72,8 +72,40 @@
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <version>0.7.6.201602180812</version>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ <inherited>True</inherited>
+ <executions>
+ <!-- Unit-Tests -->
+ <execution>
+ <id>prepare-agent</id>
+ <goals>
+ <goal>prepare-agent</goal>
+ </goals>
+ <phase>test</phase>
+ <configuration>
+ <destFile>${sonar.jacoco.reportPath}</destFile>
+ </configuration>
+ </execution>
+ <execution>
+ <id>report</id>
+ <goals>
+ <goal>report</goal>
+ </goals>
+ <phase>test</phase>
+ <configuration>
+ <dataFile>${sonar.jacoco.reportPath}</dataFile>
+ <outputDirectory>${project.basedir}/target/site/jacoco</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
-
</build>
</project>
diff --git a/ecomp-portal-widget-ms/common-widgets/resources-widget/js/controller.js b/ecomp-portal-widget-ms/common-widgets/resources-widget/js/controller.js
index 13133339..b5880c0e 100644
--- a/ecomp-portal-widget-ms/common-widgets/resources-widget/js/controller.js
+++ b/ecomp-portal-widget-ms/common-widgets/resources-widget/js/controller.js
@@ -16,27 +16,7 @@ function NewsCtrl($rootScope, applicationsService , $log,
$scope.editData = JSON.stringify(availableData);
$scope.availableDataTemp = $scope.availableData;
- ngDialog.open({
- templateUrl : 'app/views/dashboard/dashboard-widget-manage.html',
- controller : 'CommonWidgetController',
- resolve : {
- message : function message() {
- var message = {
- type : resourceType,
- availableData : $scope.editData
- };
- return message;
- }
- }
- }).closePromise.then(needUpdate => {
- if(resourceType=='NEWS'){
- $scope.updateNews();
- }else if(resourceType=='EVENTS'){
- $scope.updateEvents();
- }else if(resourceType=='IMPORTANTRESOURCES'){
- $scope.updateImportRes();
- }
- });
+
};
/*Setting News data*/
diff --git a/ecomp-portal-widget-ms/pom.xml b/ecomp-portal-widget-ms/pom.xml
index d2c72fb3..52d73821 100644
--- a/ecomp-portal-widget-ms/pom.xml
+++ b/ecomp-portal-widget-ms/pom.xml
@@ -26,6 +26,40 @@
<skip>true</skip>
</configuration>
</plugin>
+
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <version>0.7.6.201602180812</version>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ <inherited>True</inherited>
+ <executions>
+ <!-- Unit-Tests -->
+ <execution>
+ <id>prepare-agent</id>
+ <goals>
+ <goal>prepare-agent</goal>
+ </goals>
+ <phase>test</phase>
+ <configuration>
+ <destFile>${sonar.jacoco.reportPath}</destFile>
+ </configuration>
+ </execution>
+ <execution>
+ <id>report</id>
+ <goals>
+ <goal>report</goal>
+ </goals>
+ <phase>test</phase>
+ <configuration>
+ <dataFile>${sonar.jacoco.reportPath}</dataFile>
+ <outputDirectory>${project.basedir}/target/site/jacoco</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
diff --git a/ecomp-portal-widget-ms/widget-ms/pom.xml b/ecomp-portal-widget-ms/widget-ms/pom.xml
index b421ebd5..45da5d57 100644
--- a/ecomp-portal-widget-ms/widget-ms/pom.xml
+++ b/ecomp-portal-widget-ms/widget-ms/pom.xml
@@ -162,6 +162,40 @@
<skip>true</skip>
</configuration>
</plugin>
+
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <version>0.7.6.201602180812</version>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ <inherited>True</inherited>
+ <executions>
+ <!-- Unit-Tests -->
+ <execution>
+ <id>prepare-agent</id>
+ <goals>
+ <goal>prepare-agent</goal>
+ </goals>
+ <phase>test</phase>
+ <configuration>
+ <destFile>${sonar.jacoco.reportPath}</destFile>
+ </configuration>
+ </execution>
+ <execution>
+ <id>report</id>
+ <goals>
+ <goal>report</goal>
+ </goals>
+ <phase>test</phase>
+ <configuration>
+ <dataFile>${sonar.jacoco.reportPath}</dataFile>
+ <outputDirectory>${project.basedir}/target/site/jacoco</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
diff --git a/ecomp-portal-widget-ms/widget-ms/src/main/resources/framework-template.js b/ecomp-portal-widget-ms/widget-ms/src/main/resources/framework-template.js
index 45350d91..42e8c133 100644
--- a/ecomp-portal-widget-ms/widget-ms/src/main/resources/framework-template.js
+++ b/ecomp-portal-widget-ms/widget-ms/src/main/resources/framework-template.js
@@ -1,21 +1,24 @@
-var ARUGMENT1 = (function(window, undefined) {
+var ARGUMENT1 = (function(window, undefined) {
- var ARUGMENT1 = ARUGMENT1 || {};
+ var ARGUMENT1 = ARGUMENT1 || {};
function extractHostPortApp(src) {
- ARUGMENT1.microserviceId = MICROSERVICE_ID;
- ARUGMENT1.pathArray = src.split( '/' );
- ARUGMENT1.widgetName = ARUGMENT1.pathArray[ARUGMENT1.pathArray.length - 2];
- ARUGMENT1.serviceSeperator = ARUGMENT1.pathArray[ARUGMENT1.pathArray.length - 4];
- ARUGMENT1.commonUrl = src.substring(0, src.lastIndexOf("/" + ARUGMENT1.widgetName));
- ARUGMENT1.recipientDivDataAttrib = 'data-' + ARUGMENT1.widgetName;
- ARUGMENT1.controllerName = 'ARUGMENT2';
- ARUGMENT1.readyCssFlag = 'ARUGMENT3';
- ARUGMENT1.readyCssFlagExpectedValue = '#bada55';
- ARUGMENT1.serviceURL = src.substring(0, src.lastIndexOf("/" + ARUGMENT1.serviceSeperator)) + '/portalApi/microservice/proxy/parameter/' + WIDGET_ID;
- }
-
- extractHostPortApp(document.currentScript.src);
-
+
+ ARGUMENT1.microserviceId = MICROSERVICE_ID;
+ ARGUMENT1.pathArray = src.split( '/' );
+
+ ARGUMENT1.widgetName = WIDGET_ID;
+ ARGUMENT1.serviceSeperator = ARGUMENT1.pathArray[ARGUMENT1.pathArray.length - 4];
+ ARGUMENT1.commonUrl = src.substring(0, src.lastIndexOf("/" + ARGUMENT1.pathArray[ARGUMENT1.pathArray.length - 2]));
+
+ ARGUMENT1.recipientDivDataAttrib = 'data-' + ARGUMENT1.widgetName;
+ ARGUMENT1.controllerName = 'ARGUMENT2';
+ ARGUMENT1.readyCssFlag = 'ARGUMENT3';
+ ARGUMENT1.readyCssFlagExpectedValue = '#bada55';
+ ARGUMENT1.serviceURL = src.substring(0, src.lastIndexOf("/" + ARGUMENT1.serviceSeperator)) + '/portalApi/microservice/proxy/parameter/' + WIDGET_ID;
+ }
+
+ extractHostPortApp(document.getElementsByTagName('script')[0].src);
+
function loadStylesheet(url) {
var link = document.createElement('link');
link.rel = 'stylesheet';
@@ -27,7 +30,7 @@ var ARUGMENT1 = (function(window, undefined) {
function isCssReady(callback) {
var testElem = document.createElement('span');
- testElem.id = ARUGMENT1.readyCssFlag;
+ testElem.id = ARGUMENT1.readyCssFlag;
testElem.style = 'CSS_ARG1';
var entry = document.getElementsByTagName('script')[0];
entry.parentNode.insertBefore(testElem, entry);
@@ -42,7 +45,7 @@ var ARUGMENT1 = (function(window, undefined) {
else if (node.currentStyle) {
value = node.currentStyle.color;
}
- if (value && value === 'rgb(186, 218, 85)' || value.toLowerCase() === ARUGMENT1.readyCssFlagExpectedValue) {
+ if (value && value === 'rgb(186, 218, 85)' || value.toLowerCase() === ARGUMENT1.readyCssFlagExpectedValue) {
callback();
} else {
setTimeout(poll, 500);
@@ -67,9 +70,11 @@ var ARUGMENT1 = (function(window, undefined) {
function loadScript(url, callback) {
var script = document.createElement('script');
script.src = url;
+
var entry = document.getElementsByTagName('script')[0];
entry.parentNode.insertBefore(script, entry);
- script.onload = script.onreadystatechange = function() {
+
+ script.onload = script.onreadystatechange = function() {
var rdyState = script.readyState;
if (!rdyState || /complete|loaded/.test(script.readyState)) {
callback();
@@ -111,30 +116,41 @@ var ARUGMENT1 = (function(window, undefined) {
}
}
-
- function getMarkupContent(markupLocation, target){
+
+ function getMarkupContent(markupLocation, callback){
- jQuery.ajax({
- url: markupLocation,
- success: function (result) {
- if (result.isOk == false){
-
- }else{
- target.innerHTML = result;
- }
- },
- async: false
- });
+ try{
+ jQuery.ajax({
+ url: markupLocation,
+ method: "GET",
+ xhrFields: {
+ withCredentials: true
+ },
+ crossDomain: true,
+ success: function (result) {
+ if (result.isOk == false){
+
+ }else{
+ callback(result);
+ }
+ }
+ });
+ }
+ catch(e){
+
+ }
}
function renderWidget(data, location, $controllerProvider) {
var div = document.createElement('div');
- getMarkupContent(ARUGMENT1.commonUrl + "/markup/" + ARUGMENT1.widgetName, div);
- location.append(div);
- ARUGMENT1.widgetData = data;
- app.controllerProvider.register(ARUGMENT1.controllerName, ARUGMENT1.controller);
- var mController = angular.element(document.getElementById("widgets"));
- mController.scope().activateThis(location);
+ getMarkupContent(ARGUMENT1.commonUrl + "/markup/" + ARGUMENT1.widgetName, function(div){
+ location.append(div);
+ ARGUMENT1.widgetData = data;
+ app.controllerProvider.register(ARGUMENT1.controllerName, ARGUMENT1.controller);
+ var mController = angular.element(document.getElementById("widgets"));
+ mController.scope().activateThis(location);
+ });
+
}
function printAllArtifacts(moduleName, controllerName) {
@@ -151,14 +167,14 @@ var ARUGMENT1 = (function(window, undefined) {
}
loadSupportingFiles(function() {
- loadStylesheet(ARUGMENT1.commonUrl + '/' + ARUGMENT1.widgetName + '/style.css');
- loadScript(ARUGMENT1.commonUrl + '/' + ARUGMENT1.widgetName + '/controller.js',
+ loadStylesheet(ARGUMENT1.commonUrl + '/' + ARGUMENT1.widgetName + '/style.css');
+ loadScript(ARGUMENT1.commonUrl + '/' + ARGUMENT1.widgetName + '/controller.js',
function() {
- $('['+ ARUGMENT1.recipientDivDataAttrib + ']').each(function() {
+ $('['+ ARGUMENT1.recipientDivDataAttrib + ']').each(function() {
var location = jQuery(this);
- location.removeAttr(ARUGMENT1.recipientDivDataAttrib);
- var id = location.attr(ARUGMENT1.recipientDivDataAttrib);
- getWidgetData(ARUGMENT1.serviceURL, function(data) {
+ location.removeAttr(ARGUMENT1.recipientDivDataAttrib);
+ var id = location.attr(ARGUMENT1.recipientDivDataAttrib);
+ getWidgetData(ARGUMENT1.serviceURL, function(data) {
isCssReady(function(){
renderWidget(data, location);
});
@@ -168,6 +184,6 @@ var ARUGMENT1 = (function(window, undefined) {
);
});
- return ARUGMENT1;
+ return ARGUMENT1;
})(window);
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 06af5a43..02fcc8cb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,22 @@
<artifactId>ecompportal-parent-project</artifactId>
<version>0</version>
<packaging>pom</packaging>
- <name>portal</name>
+ <name>portal</name>
+ <properties>
+ <sonar.language>java</sonar.language>
+ <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
+ <sonar.skipDesign>true</sonar.skipDesign>
+ <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
+ <sonar.jacoco.reportPath>${project.basedir}/target/jacoco.exec</sonar.jacoco.reportPath>
+ <sonar.jacoco.itReportPath>${project.basedir}/target/it-jacoco.exec</sonar.jacoco.itReportPath>
+ <sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero>
+ <sonar.projectVersion>${project.version}</sonar.projectVersion>
+ <sonar.skipDesign>true</sonar.skipDesign>
+ <sonar.projectBaseDir>${project.basedir}</sonar.projectBaseDir>
+ <sonar.exclusions>**/scripts/**/*,**.js</sonar.exclusions>
+ <sonar.test.exclusions>**/test/**/*,**/tests/**/*</sonar.test.exclusions>
+ <sonar.java.binaries>.</sonar.java.binaries>
+ </properties>
<modules>
<!-- Child modules do NOT name this parent. -->
@@ -15,22 +30,103 @@
<!-- This POM names only ONAP projects -->
<module>ecomp-portal-BE-common</module>
<module>ecomp-portal-BE-os</module>
- <module>ecomp-portal-BE-common-test</module>
+<!-- <module>ecomp-portal-BE-common-test</module> -->
<module>ecomp-portal-FE-os</module>
<module>ecomp-portal-widget-ms</module>
</modules>
<build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.1</version>
+ <configuration>
+ <source>1.8</source>
+ <target>1.8</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.sonarsource.scanner.maven</groupId>
+ <artifactId>sonar-maven-plugin</artifactId>
+ <version>3.0.2</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
<plugins>
- <!-- No deployment step for this project -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-deploy-plugin</artifactId>
- <version>2.8</version>
- <configuration>
- <skip>true</skip>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
+ <!-- No deployment step for this project -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <version>2.8</version>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <version>0.7.6.201602180812</version>
+ <inherited>True</inherited>
+ <executions>
+ <!-- Unit-Tests -->
+ <execution>
+ <id>prepare-agent</id>
+ <goals>
+ <goal>prepare-agent</goal>
+ </goals>
+ <configuration>
+ <destFile>${sonar.jacoco.reportPath}</destFile>
+ </configuration>
+ </execution>
+ <execution>
+ <id>report</id>
+ <goals>
+ <goal>report</goal>
+ </goals>
+ <configuration>
+ <dataFile>${sonar.jacoco.reportPath}</dataFile>
+ <outputDirectory>${project.basedir}/target/site/jacoco</outputDirectory>
+ </configuration>
+ </execution>
+ <!-- Integration Tests (Only report goal) -->
+ <execution>
+ <id>report-integration</id>
+ <goals>
+ <goal>report-integration</goal>
+ </goals>
+ <configuration>
+ <dataFile>${sonar.jacoco.itReportPath}</dataFile>
+ <outputDirectory>${project.basedir}/target/site/it-jacoco</outputDirectory>
+ </configuration>
+ </execution>
+ <execution>
+ <id>default-instrument</id>
+ <goals>
+ <goal>instrument</goal>
+ </goals>
+ <configuration>
+ <skip>${skipTests}</skip>
+ </configuration>
+ </execution>
+ <execution>
+ <id>default-restore-instrumented-classes</id>
+ <goals>
+ <goal>restore-instrumented-classes</goal>
+ </goals>
+ <configuration>
+ <skip>${skipTests}</skip>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+</build>
+ <dependencies>
+ <dependency>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <version>0.7.6.201602180812</version>
+ </dependency>
+ </dependencies>
+</project> \ No newline at end of file