NIFI-4538:

- Fixing broken unit test.
This commit is contained in:
Matt Gilman 2018-02-20 17:14:49 -05:00
parent ba9e72ed8b
commit 160bea8bf3
No known key found for this signature in database
GPG Key ID: DF61EC19432AEE37
1 changed files with 3 additions and 0 deletions

View File

@ -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();