From 160bea8bf3020d4a76b5519d553e35bb017dbf89 Mon Sep 17 00:00:00 2001 From: Matt Gilman Date: Tue, 20 Feb 2018 17:14:49 -0500 Subject: [PATCH] NIFI-4538: - Fixing broken unit test. --- .../nifi/web/controller/ControllerSearchServiceTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/java/org/apache/nifi/web/controller/ControllerSearchServiceTest.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/java/org/apache/nifi/web/controller/ControllerSearchServiceTest.java index 5b8666f85e..19af829cd7 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/java/org/apache/nifi/web/controller/ControllerSearchServiceTest.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/java/org/apache/nifi/web/controller/ControllerSearchServiceTest.java @@ -33,6 +33,7 @@ import org.junit.Test; import org.mockito.Mockito; import java.util.HashSet; +import java.util.Optional; import static org.junit.Assert.assertTrue; import static org.mockito.Matchers.any; @@ -354,6 +355,7 @@ public class ControllerSearchServiceTest { Mockito.doReturn(processor1).when(processorNode1).getProcessor(); // set processor node's attributes Mockito.doReturn(processorId).when(processorNode1).getIdentifier(); + Mockito.doReturn(Optional.ofNullable(null)).when(processorNode1).getVersionedComponentId(); // not actually searching based on versioned component id Mockito.doReturn(processorName).when(processorNode1).getName(); // assign processor node to its PG @@ -380,6 +382,7 @@ public class ControllerSearchServiceTest { final ProcessGroup processGroup = mock(ProcessGroup.class); Mockito.doReturn(processGroupId).when(processGroup).getIdentifier(); + Mockito.doReturn(Optional.ofNullable(null)).when(processGroup).getVersionedComponentId(); // not actually searching based on versioned component id Mockito.doReturn(processGroupName).when(processGroup).getName(); Mockito.doReturn(parent).when(processGroup).getParent(); Mockito.doReturn(versionControlInformation).when(processGroup).getVersionControlInformation();