@Test void testToEditorAttributeIdentifiers() { String id = "id"; String label = "label"; String entityTypeId = "id"; String entityTypeLabel = "label"; Attribute attribute = mock(Attribute.class); EntityType entityType = mock(EntityType.class); when(attribute.getIdentifier()).thenReturn(id); when(attribute.getLabel()).thenReturn(label); when(attribute.getEntity()).thenReturn(entityType); when(entityType.getId()).thenReturn(entityTypeId); when(entityType.getLabel()).thenReturn(entityTypeLabel); ImmutableList<EditorAttributeIdentifier> editorAttributeIdentifier = attributeReferenceMapper.toEditorAttributeIdentifiers(of(attribute)); EditorEntityTypeIdentifier editorEntityTypeIdentifier = EditorEntityTypeIdentifier.create(entityTypeId, entityTypeLabel); assertEquals(of(create(id, label, editorEntityTypeIdentifier)), editorAttributeIdentifier); }
ImmutableList<EditorAttributeIdentifier> toEditorAttributeIdentifiers( Iterable<Attribute> attributes) { return ImmutableList.copyOf( stream(attributes).map(this::toEditorAttributeIdentifier).iterator()); }
AttributeReferenceMapper { ImmutableList<EditorAttributeIdentifier> toEditorAttributeIdentifiers( Iterable<Attribute> attributes) { return ImmutableList.copyOf( stream(attributes).map(this::toEditorAttributeIdentifier).iterator()); } }
AttributeReferenceMapper { ImmutableList<EditorAttributeIdentifier> toEditorAttributeIdentifiers( Iterable<Attribute> attributes) { return ImmutableList.copyOf( stream(attributes).map(this::toEditorAttributeIdentifier).iterator()); } AttributeReferenceMapper(AttributeMetadata attributeMetadata, DataService dataService); }
AttributeReferenceMapper { ImmutableList<EditorAttributeIdentifier> toEditorAttributeIdentifiers( Iterable<Attribute> attributes) { return ImmutableList.copyOf( stream(attributes).map(this::toEditorAttributeIdentifier).iterator()); } AttributeReferenceMapper(AttributeMetadata attributeMetadata, DataService dataService);  }
AttributeReferenceMapper { ImmutableList<EditorAttributeIdentifier> toEditorAttributeIdentifiers( Iterable<Attribute> attributes) { return ImmutableList.copyOf( stream(attributes).map(this::toEditorAttributeIdentifier).iterator()); } AttributeReferenceMapper(AttributeMetadata attributeMetadata, DataService dataService);   }