+ }
+
+ @Test
+ void getUserParamById() {
+ //Given
+ EpWidgetCatalog widget = EpWidgetCatalog.builder()
+ .wdgName("Name")
+ .wdgFileLoc("loc")
+ .allUserFlag(true)
+ .build();
+ epWidgetCatalogService.save(widget);
+ EpMicroserviceParameter parameter = new EpMicroserviceParameter();
+ epMicroserviceParameterService.save(parameter);
+ FnLanguage language = FnLanguage.builder().languageAlias("TS").languageName("TEST").build();
+ fnLanguageService.save(principal, language);
+ FnUser user = buildFnUser();
+ language.setFnUsers(new HashSet<>(Collections.singleton(user)));
+ user.setLanguageId(language);
+ EpWidgetCatalogParameter data = EpWidgetCatalogParameter.builder()
+ .widgetId(widget).userId(user).paramId(parameter).userValue("TestData").build();
+ //When
+ assertEquals(0, widgetsCatalogController.getUserParameterById(parameter.getId()).size());
+ epWidgetCatalogParameterService.saveUserParameter(data);
+ Long id = data.getId();
+ assertEquals(1, epWidgetCatalogParameterService.getUserParameterById(parameter.getId()).size());
+ EpWidgetCatalogParameter actual = epWidgetCatalogParameterService.getUserParamById(widget.getWidgetId(), user.getUserId(), parameter.getId());
+ //Then
+ assertEquals(id, actual.getId());
+ assertEquals(data.getUserValue(), actual.getUserValue());
+ assertEquals(data.getWidgetId().getWidgetId(), actual.getWidgetId().getWidgetId());
+ assertEquals(data.getParamId().getId(), actual.getParamId().getId());