test_class.declarator: ITEM_TYPE = "itemType"
test_class.modifier: private static final
test_class.original_string: private static final String ITEM_TYPE = "itemType";
test_class.type: String
test_class.var_name: ITEM_TYPE
test_class.declarator: THING_TYPE_UID = "thing:type:uid"
test_class.modifier: private static final
test_class.original_string: private static final String THING_TYPE_UID = "thing:type:uid";
test_class.type: String
test_class.var_name: THING_TYPE_UID
test_class.declarator: UID = "thing:uid:1"
test_class.modifier: private static final
test_class.original_string: private static final String UID = "thing:uid:1";
test_class.type: String
test_class.var_name: UID
test_class.declarator: THING_LABEL = "label"
test_class.modifier: private static final
test_class.original_string: private static final String THING_LABEL = "label";
test_class.type: String
test_class.var_name: THING_LABEL
test_class.declarator: LOCATION = "location"
test_class.modifier: private static final
test_class.original_string: private static final String LOCATION = "location";
test_class.type: String
test_class.var_name: LOCATION
test_class.declarator: thing
test_class.modifier: private @Mock
test_class.original_string: private @Mock Thing thing;
test_class.type: Thing
test_class.var_name: thing
test_class.declarator: thingStatusInfo
test_class.modifier: private @Mock
test_class.original_string: private @Mock ThingStatusInfo thingStatusInfo;
test_class.type: ThingStatusInfo
test_class.var_name: thingStatusInfo
test_class.declarator: firmwareStatus
test_class.modifier: private @Mock
test_class.original_string: private @Mock FirmwareStatusDTO firmwareStatus;
test_class.type: FirmwareStatusDTO
test_class.var_name: firmwareStatus
test_class.declarator: linkedItemsMap
test_class.modifier: private @Mock
test_class.original_string: private @Mock Map<String, Set<String>> linkedItemsMap;
test_class.type: Map<String, Set<String>>
test_class.var_name: linkedItemsMap
test_class.declarator: configuration
test_class.modifier: private @Mock
test_class.original_string: private @Mock Configuration configuration;
test_class.type: Configuration
test_class.var_name: configuration
test_class.declarator: properties
test_class.modifier: private @Mock
test_class.original_string: private @Mock Map<String, String> properties;
test_class.type: Map<String, String>
test_class.var_name: properties
test_class.file: bundles/org.openhab.core.io.rest.core/src/test/java/org/openhab/core/io/rest/core/thing/EnrichedThingDTOMapperTest.java
test_class.identifier: EnrichedThingDTOMapperTest
test_case.body: @Test
      public void shouldMapEnrichedThingDTO() {
          when(linkedItemsMap.get("1")).thenReturn(Stream.of("linkedItem1", "linkedItem2").collect(Collectors.toSet()));
  
          EnrichedThingDTO enrichedThingDTO = EnrichedThingDTOMapper.map(thing, thingStatusInfo, firmwareStatus,
                  linkedItemsMap, true);
  
          assertThat(enrichedThingDTO.editable, is(true));
          assertThat(enrichedThingDTO.firmwareStatus, is(equalTo(firmwareStatus)));
          assertThat(enrichedThingDTO.statusInfo, is(equalTo(thingStatusInfo)));
          assertThat(enrichedThingDTO.thingTypeUID, is(equalTo(thing.getThingTypeUID().getAsString())));
          assertThat(enrichedThingDTO.label, is(equalTo(THING_LABEL)));
          assertThat(enrichedThingDTO.bridgeUID, is(CoreMatchers.nullValue()));
  
          assertChannels(enrichedThingDTO);
  
          assertThat(enrichedThingDTO.configuration.values(), is(empty()));
          assertThat(enrichedThingDTO.properties, is(equalTo(properties)));
          assertThat(enrichedThingDTO.location, is(equalTo(LOCATION)));
      }
test_case.class_method_signature: EnrichedThingDTOMapperTest.shouldMapEnrichedThingDTO()
test_case.full_signature: @Test public void shouldMapEnrichedThingDTO()
test_case.identifier: shouldMapEnrichedThingDTO
test_case.invocations: thenReturn when get collect of toSet map assertThat is assertThat is equalTo assertThat is equalTo assertThat is equalTo getAsString getThingTypeUID assertThat is equalTo assertThat is nullValue assertChannels assertThat values is empty assertThat is equalTo assertThat is equalTo
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldMapEnrichedThingDTO()
focal_class.file: bundles/org.openhab.core.io.rest.core/src/main/java/org/openhab/core/io/rest/core/thing/EnrichedThingDTOMapper.java
focal_class.identifier: EnrichedThingDTOMapper
focal_class.class_method_signature: EnrichedThingDTOMapper.map(Thing thing, ThingStatusInfo thingStatusInfo, FirmwareStatusDTO firmwareStatus,
              Map<String, Set<String>> linkedItemsMap, boolean editable)
focal_class.full_signature: public static EnrichedThingDTO map(Thing thing, ThingStatusInfo thingStatusInfo, FirmwareStatusDTO firmwareStatus,
              Map<String, Set<String>> linkedItemsMap, boolean editable)
focal_class.identifier: map
focal_class.modifiers: public static
focal_class.parameters: (Thing thing, ThingStatusInfo thingStatusInfo, FirmwareStatusDTO firmwareStatus,
              Map<String, Set<String>> linkedItemsMap, boolean editable)
focal_class.return: EnrichedThingDTO
focal_class.signature: EnrichedThingDTO map(Thing thing, ThingStatusInfo thingStatusInfo, FirmwareStatusDTO firmwareStatus,
              Map<String, Set<String>> linkedItemsMap, boolean editable)
focal_class.superclass: extends ThingDTOMapper
focal_method.body: public static EnrichedThingDTO map(Thing thing, ThingStatusInfo thingStatusInfo, FirmwareStatusDTO firmwareStatus,
              Map<String, Set<String>> linkedItemsMap, boolean editable) {
          ThingDTO thingDTO = ThingDTOMapper.map(thing);
  
          List<ChannelDTO> channels = new ArrayList<>();
          for (ChannelDTO channel : thingDTO.channels) {
              Set<String> linkedItems = linkedItemsMap != null ? linkedItemsMap.get(channel.id) : Collections.emptySet();
              channels.add(new EnrichedChannelDTO(channel, linkedItems));
          }
  
          return new EnrichedThingDTO(thingDTO, channels, thingStatusInfo, firmwareStatus, editable);
      }
focal_method.class_method_signature: EnrichedThingDTOMapper.map(Thing thing, ThingStatusInfo thingStatusInfo, FirmwareStatusDTO firmwareStatus,
              Map<String, Set<String>> linkedItemsMap, boolean editable)
focal_method.full_signature: public static EnrichedThingDTO map(Thing thing, ThingStatusInfo thingStatusInfo, FirmwareStatusDTO firmwareStatus,
              Map<String, Set<String>> linkedItemsMap, boolean editable)
focal_method.identifier: map
focal_method.invocations: map get emptySet add
focal_method.modifiers: public static
focal_method.parameters: (Thing thing, ThingStatusInfo thingStatusInfo, FirmwareStatusDTO firmwareStatus,
              Map<String, Set<String>> linkedItemsMap, boolean editable)
focal_method.return: EnrichedThingDTO
focal_method.signature: EnrichedThingDTO map(Thing thing, ThingStatusInfo thingStatusInfo, FirmwareStatusDTO firmwareStatus,
              Map<String, Set<String>> linkedItemsMap, boolean editable)