From 6ad41e3ccd398a2721f41ad61c80b7bb03f7d127 Mon Sep 17 00:00:00 2001 From: Ittay Stern Date: Mon, 31 Dec 2018 17:21:27 +0200 Subject: Merge from ECOMP's repository Main Features -------------- - Async-Instantiation jobs mechanism major update; still WIP (package `org.onap.vid.job`) - New features in View/Edit: Activate fabric configuration; show related networks; soft delete - Support AAI service-tree traversal (`AAIServiceTree`) - In-memory cache for SDC models and certain A&AI queries (`CacheProviderWithLoadingCache`) - Upgrade TOSCA Parser and add parsing options; fix malformed TOSCA models - Resolve Cloud-Owner values for MSO - Pass X-ONAP headers to MSO Infrastructure -------------- - Remove codehaus' jackson mapper; use soley fasterxml 2.9.7 - Surefire invokes both TestNG and JUnit tests - Support Kotlin source files - AaiController2 which handles errors in a "Spring manner" - Inline generated-sources and remove jsonschema2pojo Quality -------- - Cumulative bug fixes (A&AI API, UI timeouts, and many more) - Many Sonar issues cleaned-up - Some unused classes removed - Minor changes in vid-automation project, allowing some API verification to run Hard Merges ------------ - HTTP Clients (MSO, A&AI, WebConfig, OutgoingRequestHeadersTest) - Moved `package org.onap.vid.controllers` to `controller`, without plural -- just to keep semantic sync with ECOMP. Reference commit in ECOMP: 3d1141625 Issue-ID: VID-378 Change-Id: I9c8d1e74caa41815891d441fc0760bb5f29c5788 Signed-off-by: Ittay Stern --- .../vid/services/PortDetailsTranslatorTest.java | 261 +++++++++------------ 1 file changed, 114 insertions(+), 147 deletions(-) (limited to 'vid-app-common/src/test/java/org/onap/vid/services/PortDetailsTranslatorTest.java') diff --git a/vid-app-common/src/test/java/org/onap/vid/services/PortDetailsTranslatorTest.java b/vid-app-common/src/test/java/org/onap/vid/services/PortDetailsTranslatorTest.java index cb9eb93d0..004977347 100644 --- a/vid-app-common/src/test/java/org/onap/vid/services/PortDetailsTranslatorTest.java +++ b/vid-app-common/src/test/java/org/onap/vid/services/PortDetailsTranslatorTest.java @@ -1,19 +1,12 @@ package org.onap.vid.services; +import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.collect.ImmutableList; -import org.codehaus.jackson.map.ObjectMapper; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.MockitoAnnotations; -import org.onap.vid.aai.model.AaiGetPortMirroringSourcePorts; +import org.onap.vid.aai.model.CustomQuerySimpleResult; import org.onap.vid.aai.model.PortDetailsTranslator; import org.onap.vid.aai.model.RelatedTo; import org.onap.vid.aai.model.SimpleResult; -import org.onap.vid.properties.Features; -import org.testng.annotations.BeforeMethod; -import org.testng.annotations.DataProvider; import org.testng.annotations.Test; -import org.togglz.core.manager.FeatureManager; import java.io.IOException; import java.util.List; @@ -25,49 +18,38 @@ import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.containsInAnyOrder; import static org.hamcrest.collection.IsEmptyCollection.empty; -import static org.mockito.Mockito.when; public class PortDetailsTranslatorTest { private static final ObjectMapper om = new ObjectMapper(); - @InjectMocks private PortDetailsTranslator portDetailsTranslator = new PortDetailsTranslator(); - @Mock - private FeatureManager featureManager; - - @BeforeMethod - public void initMocks() throws Exception { - MockitoAnnotations.initMocks(this); - when(featureManager.isActive(Features.FLAG_ADVANCED_PORTS_FILTER)).thenReturn(true); - } - @Test public void extractPortDetailsFromProperties_givenValidAaiResponse() throws IOException { - final String aaiResponse = "{\n" + - " \"results\": [\n" + - " {\n" + - " \"id\": \"4876980240\",\n" + - " \"node-type\": \"l-interface\",\n" + - " \"url\": \"/aai/v12/cloud-infrastructure/cloud-regions/cloud-region/att-aic/rdm5b/tenants/tenant/460f35aeb53542dc9f77105066483e83/vservers/vserver/15e46e2f-4b98-4e06-9644-f0e6e35cc79a/l-interfaces/l-interface/zrdm5bfprbVLBA005-vlbagent_aff_int_pktmirror_1_port-dr5jhyxva5ib\",\n" + - " \"properties\": {\n" + - " \"interface-name\": \"zrdm5bfprbVLBA005-vlbagent_aff_int_pktmirror_1_port-dr5jhyxva5ib\",\n" + - " \"selflink\": \"https://network-aic.rdm5b.cci.att.com:9696/v2.0/ports/6de7bf87-6faa-4984-9492-18d1188b3d4a\",\n" + - " \"interface-id\": \"6de7bf87-6faa-4984-9492-18d1188b3d4a\",\n" + - " \"macaddr\": \"02:6d:e7:bf:87:6f\",\n" + - " \"network-name\": \"APP-C-24595-D-T001-vprobe_int_pktmirror_net_1\",\n" + - " \"is-port-mirrored\": false,\n" + - " \"resource-version\": \"1519383879190\",\n" + - " \"in-maint\": false,\n" + - " \"is-ip-unnumbered\": false\n" + - " }\n" + - " }\n" + - " ]\n" + + final String aaiResponse = "{" + + " \"results\": [" + + " {" + + " \"id\": \"4876980240\"," + + " \"node-type\": \"l-interface\"," + + " \"url\": \"/aai/v12/cloud-infrastructure/cloud-regions/cloud-region/att-aic/rdm5b/tenants/tenant/460f35aeb53542dc9f77105066483e83/vservers/vserver/15e46e2f-4b98-4e06-9644-f0e6e35cc79a/l-interfaces/l-interface/zrdm5bfprbVLBA005-vlbagent_aff_int_pktmirror_1_port-dr5jhyxva5ib\"," + + " \"properties\": {" + + " \"interface-name\": \"zrdm5bfprbVLBA005-vlbagent_aff_int_pktmirror_1_port-dr5jhyxva5ib\"," + + " \"selflink\": \"https://network-aic.rdm5b.cci.att.com:9696/v2.0/ports/6de7bf87-6faa-4984-9492-18d1188b3d4a\"," + + " \"interface-id\": \"6de7bf87-6faa-4984-9492-18d1188b3d4a\"," + + " \"macaddr\": \"02:6d:e7:bf:87:6f\"," + + " \"network-name\": \"APP-C-24595-D-T001-vprobe_int_pktmirror_net_1\"," + + " \"is-port-mirrored\": false," + + " \"resource-version\": \"1519383879190\"," + + " \"in-maint\": false," + + " \"is-ip-unnumbered\": false" + + " }" + + " }" + + " ]" + "}"; - AaiGetPortMirroringSourcePorts aaiGetPortMirroringSourcePorts = om.readValue(aaiResponse, AaiGetPortMirroringSourcePorts.class); + CustomQuerySimpleResult aaiGetPortMirroringSourcePorts = om.readValue(aaiResponse, CustomQuerySimpleResult.class); PortDetailsTranslator.PortDetails portDetails = PortDetailsTranslator.extractPortDetailsFromProperties(aaiGetPortMirroringSourcePorts.getResults().get(0).getProperties(), aaiResponse); @@ -82,29 +64,29 @@ public class PortDetailsTranslatorTest { @Test public void extractPortDetailsFromProperties_givenAaiResponseWithInstanceNameNull_yieldException() throws IOException { - final String aaiResponse = "{\n" + - " \"results\": [\n" + - " {\n" + - " \"id\": \"4876980240\",\n" + - " \"node-type\": \"l-interface\",\n" + - " \"url\": \"/aai/v12/cloud-infrastructure/cloud-regions/cloud-region/att-aic/rdm5b/tenants/tenant/460f35aeb53542dc9f77105066483e83/vservers/vserver/15e46e2f-4b98-4e06-9644-f0e6e35cc79a/l-interfaces/l-interface/zrdm5bfprbVLBA005-vlbagent_aff_int_pktmirror_1_port-dr5jhyxva5ib\",\n" + - " \"properties\": {\n" + - " \"interface-name\": null,\n" + - " \"selflink\": \"https://network-aic.rdm5b.cci.att.com:9696/v2.0/ports/6de7bf87-6faa-4984-9492-18d1188b3d4a\",\n" + - " \"interface-id\": \"6de7bf87-6faa-4984-9492-18d1188b3d4a\",\n" + - " \"macaddr\": \"02:6d:e7:bf:87:6f\",\n" + - " \"network-name\": \"APP-C-24595-D-T001-vprobe_int_pktmirror_net_1\",\n" + - " \"is-port-mirrored\": false,\n" + - " \"resource-version\": \"1519383879190\",\n" + - " \"in-maint\": false,\n" + - " \"is-ip-unnumbered\": false\n" + - " }\n" + - " }\n" + - " ]\n" + + final String aaiResponse = "{" + + " \"results\": [" + + " {" + + " \"id\": \"4876980240\"," + + " \"node-type\": \"l-interface\"," + + " \"url\": \"/aai/v12/cloud-infrastructure/cloud-regions/cloud-region/att-aic/rdm5b/tenants/tenant/460f35aeb53542dc9f77105066483e83/vservers/vserver/15e46e2f-4b98-4e06-9644-f0e6e35cc79a/l-interfaces/l-interface/zrdm5bfprbVLBA005-vlbagent_aff_int_pktmirror_1_port-dr5jhyxva5ib\"," + + " \"properties\": {" + + " \"interface-name\": null," + + " \"selflink\": \"https://network-aic.rdm5b.cci.att.com:9696/v2.0/ports/6de7bf87-6faa-4984-9492-18d1188b3d4a\"," + + " \"interface-id\": \"6de7bf87-6faa-4984-9492-18d1188b3d4a\"," + + " \"macaddr\": \"02:6d:e7:bf:87:6f\"," + + " \"network-name\": \"APP-C-24595-D-T001-vprobe_int_pktmirror_net_1\"," + + " \"is-port-mirrored\": false," + + " \"resource-version\": \"1519383879190\"," + + " \"in-maint\": false," + + " \"is-ip-unnumbered\": false" + + " }" + + " }" + + " ]" + "}"; - AaiGetPortMirroringSourcePorts aaiGetPortMirroringSourcePorts = om.readValue(aaiResponse, AaiGetPortMirroringSourcePorts.class); - PortDetailsTranslator.PortDetails portDetails = PortDetailsTranslator.extractPortDetailsFromProperties(aaiGetPortMirroringSourcePorts.getResults().get(0).getProperties(),aaiResponse); + CustomQuerySimpleResult aaiGetPortMirroringSourcePorts = om.readValue(aaiResponse, CustomQuerySimpleResult.class); + PortDetailsTranslator.PortDetails portDetails = PortDetailsTranslator.extractPortDetailsFromProperties(aaiGetPortMirroringSourcePorts.getResults().get(0).getProperties(), aaiResponse); assertThat(portDetails, is(instanceOf(PortDetailsTranslator.PortDetailsError.class))); @@ -115,29 +97,29 @@ public class PortDetailsTranslatorTest { @Test public void extractPortDetailsFromProperties_givenAaiResponseWithInstanceIdNull_yieldException() throws IOException { - final String aaiResponse = "{\n" + - " \"results\": [\n" + - " {\n" + - " \"id\": \"4876980240\",\n" + - " \"node-type\": \"l-interface\",\n" + - " \"url\": \"/aai/v12/cloud-infrastructure/cloud-regions/cloud-region/att-aic/rdm5b/tenants/tenant/460f35aeb53542dc9f77105066483e83/vservers/vserver/15e46e2f-4b98-4e06-9644-f0e6e35cc79a/l-interfaces/l-interface/zrdm5bfprbVLBA005-vlbagent_aff_int_pktmirror_1_port-dr5jhyxva5ib\",\n" + - " \"properties\": {\n" + - " \"interface-name\": \"zrdm5bfprbVLBA005-vlbagent_aff_int_pktmirror_1_port-dr5jhyxva5ib\",\n" + - " \"selflink\": \"https://network-aic.rdm5b.cci.att.com:9696/v2.0/ports/6de7bf87-6faa-4984-9492-18d1188b3d4a\",\n" + - " \"interface-id\": null,\n" + - " \"macaddr\": \"02:6d:e7:bf:87:6f\",\n" + - " \"network-name\": \"APP-C-24595-D-T001-vprobe_int_pktmirror_net_1\",\n" + - " \"is-port-mirrored\": false,\n" + - " \"resource-version\": \"1519383879190\",\n" + - " \"in-maint\": false,\n" + - " \"is-ip-unnumbered\": false\n" + - " }\n" + - " }\n" + - " ]\n" + + final String aaiResponse = "{" + + " \"results\": [" + + " {" + + " \"id\": \"4876980240\"," + + " \"node-type\": \"l-interface\"," + + " \"url\": \"/aai/v12/cloud-infrastructure/cloud-regions/cloud-region/att-aic/rdm5b/tenants/tenant/460f35aeb53542dc9f77105066483e83/vservers/vserver/15e46e2f-4b98-4e06-9644-f0e6e35cc79a/l-interfaces/l-interface/zrdm5bfprbVLBA005-vlbagent_aff_int_pktmirror_1_port-dr5jhyxva5ib\"," + + " \"properties\": {" + + " \"interface-name\": \"zrdm5bfprbVLBA005-vlbagent_aff_int_pktmirror_1_port-dr5jhyxva5ib\"," + + " \"selflink\": \"https://network-aic.rdm5b.cci.att.com:9696/v2.0/ports/6de7bf87-6faa-4984-9492-18d1188b3d4a\"," + + " \"interface-id\": null," + + " \"macaddr\": \"02:6d:e7:bf:87:6f\"," + + " \"network-name\": \"APP-C-24595-D-T001-vprobe_int_pktmirror_net_1\"," + + " \"is-port-mirrored\": false," + + " \"resource-version\": \"1519383879190\"," + + " \"in-maint\": false," + + " \"is-ip-unnumbered\": false" + + " }" + + " }" + + " ]" + "}"; - AaiGetPortMirroringSourcePorts aaiGetPortMirroringSourcePorts = om.readValue(aaiResponse, AaiGetPortMirroringSourcePorts.class); - PortDetailsTranslator.PortDetails portDetails = PortDetailsTranslator.extractPortDetailsFromProperties(aaiGetPortMirroringSourcePorts.getResults().get(0).getProperties(),aaiResponse); + CustomQuerySimpleResult aaiGetPortMirroringSourcePorts = om.readValue(aaiResponse, CustomQuerySimpleResult.class); + PortDetailsTranslator.PortDetails portDetails = PortDetailsTranslator.extractPortDetailsFromProperties(aaiGetPortMirroringSourcePorts.getResults().get(0).getProperties(), aaiResponse); assertThat(portDetails, is(instanceOf(PortDetailsTranslator.PortDetailsError.class))); @@ -148,29 +130,29 @@ public class PortDetailsTranslatorTest { @Test public void extractPortDetailsFromProperties_givenAaiResponseWithEmptyInstanceId_yieldException() throws IOException { - final String aaiResponse = "{\n" + - " \"results\": [\n" + - " {\n" + - " \"id\": \"4876980240\",\n" + - " \"node-type\": \"l-interface\",\n" + - " \"url\": \"/aai/v12/cloud-infrastructure/cloud-regions/cloud-region/att-aic/rdm5b/tenants/tenant/460f35aeb53542dc9f77105066483e83/vservers/vserver/15e46e2f-4b98-4e06-9644-f0e6e35cc79a/l-interfaces/l-interface/zrdm5bfprbVLBA005-vlbagent_aff_int_pktmirror_1_port-dr5jhyxva5ib\",\n" + - " \"properties\": {\n" + - " \"interface-name\": \"\",\n" + - " \"selflink\": \"https://network-aic.rdm5b.cci.att.com:9696/v2.0/ports/6de7bf87-6faa-4984-9492-18d1188b3d4a\",\n" + - " \"interface-id\": \"6de7bf87-6faa-4984-9492-18d1188b3d4a\",\n" + - " \"macaddr\": \"02:6d:e7:bf:87:6f\",\n" + - " \"network-name\": \"APP-C-24595-D-T001-vprobe_int_pktmirror_net_1\",\n" + - " \"is-port-mirrored\": false,\n" + - " \"resource-version\": \"1519383879190\",\n" + - " \"in-maint\": false,\n" + - " \"is-ip-unnumbered\": false\n" + - " }\n" + - " }\n" + - " ]\n" + + final String aaiResponse = "{" + + " \"results\": [" + + " {" + + " \"id\": \"4876980240\"," + + " \"node-type\": \"l-interface\"," + + " \"url\": \"/aai/v12/cloud-infrastructure/cloud-regions/cloud-region/att-aic/rdm5b/tenants/tenant/460f35aeb53542dc9f77105066483e83/vservers/vserver/15e46e2f-4b98-4e06-9644-f0e6e35cc79a/l-interfaces/l-interface/zrdm5bfprbVLBA005-vlbagent_aff_int_pktmirror_1_port-dr5jhyxva5ib\"," + + " \"properties\": {" + + " \"interface-name\": \"\"," + + " \"selflink\": \"https://network-aic.rdm5b.cci.att.com:9696/v2.0/ports/6de7bf87-6faa-4984-9492-18d1188b3d4a\"," + + " \"interface-id\": \"6de7bf87-6faa-4984-9492-18d1188b3d4a\"," + + " \"macaddr\": \"02:6d:e7:bf:87:6f\"," + + " \"network-name\": \"APP-C-24595-D-T001-vprobe_int_pktmirror_net_1\"," + + " \"is-port-mirrored\": false," + + " \"resource-version\": \"1519383879190\"," + + " \"in-maint\": false," + + " \"is-ip-unnumbered\": false" + + " }" + + " }" + + " ]" + "}"; - AaiGetPortMirroringSourcePorts aaiGetPortMirroringSourcePorts = om.readValue(aaiResponse, AaiGetPortMirroringSourcePorts.class); - PortDetailsTranslator.PortDetails portDetails = PortDetailsTranslator.extractPortDetailsFromProperties(aaiGetPortMirroringSourcePorts.getResults().get(0).getProperties(),aaiResponse); + CustomQuerySimpleResult aaiGetPortMirroringSourcePorts = om.readValue(aaiResponse, CustomQuerySimpleResult.class); + PortDetailsTranslator.PortDetails portDetails = PortDetailsTranslator.extractPortDetailsFromProperties(aaiGetPortMirroringSourcePorts.getResults().get(0).getProperties(), aaiResponse); assertThat(portDetails, is(instanceOf(PortDetailsTranslator.PortDetailsError.class))); @@ -181,29 +163,29 @@ public class PortDetailsTranslatorTest { @Test public void extractPortDetailsFromProperties_givenAaiResponseWithIsPortMirroredNull_yieldException() throws IOException { - final String aaiResponse = "{\n" + - " \"results\": [\n" + - " {\n" + - " \"id\": \"4876980240\",\n" + - " \"node-type\": \"l-interface\",\n" + - " \"url\": \"/aai/v12/cloud-infrastructure/cloud-regions/cloud-region/att-aic/rdm5b/tenants/tenant/460f35aeb53542dc9f77105066483e83/vservers/vserver/15e46e2f-4b98-4e06-9644-f0e6e35cc79a/l-interfaces/l-interface/zrdm5bfprbVLBA005-vlbagent_aff_int_pktmirror_1_port-dr5jhyxva5ib\",\n" + - " \"properties\": {\n" + - " \"interface-name\": \"zrdm5bfprbVLBA005-vlbagent_aff_int_pktmirror_1_port-dr5jhyxva5ib\",\n" + - " \"selflink\": \"https://network-aic.rdm5b.cci.att.com:9696/v2.0/ports/6de7bf87-6faa-4984-9492-18d1188b3d4a\",\n" + - " \"interface-id\": \"6de7bf87-6faa-4984-9492-18d1188b3d4a\",\n" + - " \"macaddr\": \"02:6d:e7:bf:87:6f\",\n" + - " \"network-name\": \"APP-C-24595-D-T001-vprobe_int_pktmirror_net_1\",\n" + - " \"is-port-mirrored\": null,\n" + - " \"resource-version\": \"1519383879190\",\n" + - " \"in-maint\": false,\n" + - " \"is-ip-unnumbered\": false\n" + - " }\n" + - " }\n" + - " ]\n" + + final String aaiResponse = "{" + + " \"results\": [" + + " {" + + " \"id\": \"4876980240\"," + + " \"node-type\": \"l-interface\"," + + " \"url\": \"/aai/v12/cloud-infrastructure/cloud-regions/cloud-region/att-aic/rdm5b/tenants/tenant/460f35aeb53542dc9f77105066483e83/vservers/vserver/15e46e2f-4b98-4e06-9644-f0e6e35cc79a/l-interfaces/l-interface/zrdm5bfprbVLBA005-vlbagent_aff_int_pktmirror_1_port-dr5jhyxva5ib\"," + + " \"properties\": {" + + " \"interface-name\": \"zrdm5bfprbVLBA005-vlbagent_aff_int_pktmirror_1_port-dr5jhyxva5ib\"," + + " \"selflink\": \"https://network-aic.rdm5b.cci.att.com:9696/v2.0/ports/6de7bf87-6faa-4984-9492-18d1188b3d4a\"," + + " \"interface-id\": \"6de7bf87-6faa-4984-9492-18d1188b3d4a\"," + + " \"macaddr\": \"02:6d:e7:bf:87:6f\"," + + " \"network-name\": \"APP-C-24595-D-T001-vprobe_int_pktmirror_net_1\"," + + " \"is-port-mirrored\": null," + + " \"resource-version\": \"1519383879190\"," + + " \"in-maint\": false," + + " \"is-ip-unnumbered\": false" + + " }" + + " }" + + " ]" + "}"; - AaiGetPortMirroringSourcePorts aaiGetPortMirroringSourcePorts = om.readValue(aaiResponse, AaiGetPortMirroringSourcePorts.class); - PortDetailsTranslator.PortDetails portDetails = PortDetailsTranslator.extractPortDetailsFromProperties(aaiGetPortMirroringSourcePorts.getResults().get(0).getProperties(),aaiResponse); + CustomQuerySimpleResult aaiGetPortMirroringSourcePorts = om.readValue(aaiResponse, CustomQuerySimpleResult.class); + PortDetailsTranslator.PortDetails portDetails = PortDetailsTranslator.extractPortDetailsFromProperties(aaiGetPortMirroringSourcePorts.getResults().get(0).getProperties(), aaiResponse); assertThat(portDetails, is(instanceOf(PortDetailsTranslator.PortDetailsError.class))); @@ -221,17 +203,8 @@ public class PortDetailsTranslatorTest { assertThat("List size if different than expected", result, is(empty())); } - @DataProvider - public static Object[][] trueAndFalse() { - return new Object[][]{ - { Boolean.TRUE }, { Boolean.FALSE } - }; - } - - @Test(dataProvider = "trueAndFalse") - public void getFilteredPortList_givenFeatureFlagIsOff_returnAllLInterfaces(Boolean advancedPortsFilterFlag) throws IOException { - when(featureManager.isActive(Features.FLAG_ADVANCED_PORTS_FILTER)).thenReturn(advancedPortsFilterFlag); - + @Test + public void getFilteredPortList_givenFeatureFlagIsOff_returnAllLInterfaces() { final String relationshipLabelSource = "org.onap.relationships.inventory.Source"; final String nodeTypeLInterface = "l-interface"; @@ -258,22 +231,16 @@ public class PortDetailsTranslatorTest { List result = portDetailsTranslator.getFilteredPortList(input); - if (advancedPortsFilterFlag) { - assertThat("List should contain all l-interfaces with a related source", result, containsInAnyOrder( - lInterfaceWithSource, lInterfaceWithSourceAndMore, - lInterfaceWithTwoSources)); - } else { - assertThat("List should contain all l-interfaces", result, containsInAnyOrder( - lInterfaceWithSource, lInterfaceWithoutSource, - lInterfaceWithoutRelations, lInterfaceWithSourceAndMore, - lInterfaceWithTwoSources)); - } + assertThat("List should contain all l-interfaces with a related source", result, containsInAnyOrder( + lInterfaceWithSource, lInterfaceWithSourceAndMore, + lInterfaceWithTwoSources)); + } private SimpleResult buildSimpleResult(String nodeType, String... relationshipLabels) { SimpleResult simpleResult = new SimpleResult(); - simpleResult.setNodeType(nodeType); - simpleResult.setRelatedTo(Stream.of(relationshipLabels).map(label -> + simpleResult.setJsonNodeType(nodeType); + simpleResult.setJsonRelatedTo(Stream.of(relationshipLabels).map(label -> new RelatedTo("my foo id", label, "logical-link", "foo url")) .collect(Collectors.toList()) ); -- cgit 1.2.3-korg