Search in sources :

Example 1 with NodeViewNodeFactory

use of org.knime.testing.node.view.NodeViewNodeFactory in project knime-core by knime.

the class NodeViewEntTest method testNodeViewEntWithSelectionEventSource.

/**
 * Tests the {@link SelectionEventSource} in conjunction with {@link NodeViewEnt}.
 *
 * @throws IOException
 */
@Test
public void testNodeViewEntWithSelectionEventSource() throws IOException {
    var wfm = WorkflowManagerUtil.createEmptyWorkflow();
    Function<NodeViewNodeModel, NodeView> nodeViewCreator = m -> NodeViewTest.createNodeView(Page.builder(() -> "blub", "index.html").build());
    NativeNodeContainer nnc = WorkflowManagerUtil.createAndAddNode(wfm, new NodeViewNodeFactory(nodeViewCreator));
    wfm.executeAllAndWaitUntilDone();
    var hiLiteHandler = nnc.getNodeModel().getInHiLiteHandler(0);
    hiLiteHandler.fireHiLiteEvent(new RowKey("k1"), new RowKey("k2"));
    @SuppressWarnings("unchecked") final BiConsumer<String, SelectionEvent> consumerMock = mock(BiConsumer.class);
    var selectionEventSource = SelectionEventSourceTest.createSelectionEventSource(consumerMock);
    var initialSelection = selectionEventSource.addEventListenerAndGetInitialEventFor(nnc).map(SelectionEvent::getKeys).orElse(Collections.emptyList());
    var nodeViewEnt = new NodeViewEnt(nnc, () -> initialSelection);
    assertThat(nodeViewEnt.getInitialSelection(), is(List.of("k1", "k2")));
    hiLiteHandler.fireHiLiteEvent(new RowKey("k3"));
    await().pollDelay(ONE_HUNDRED_MILLISECONDS).timeout(FIVE_SECONDS).untilAsserted(() -> verify(consumerMock, times(1)).accept(eq("SelectionEvent"), argThat(se -> se.getKeys().equals(List.of("k3")) && se.getMode() == SelectionEventMode.ADD)));
    WorkflowManagerUtil.disposeWorkflow(wfm);
}
Also used : NativeNodeContainer(org.knime.core.node.workflow.NativeNodeContainer) NodeMessage(org.knime.core.node.workflow.NodeMessage) VirtualSubNodeInputNodeFactory(org.knime.core.node.workflow.virtual.subnode.VirtualSubNodeInputNodeFactory) NodeView(org.knime.core.webui.node.view.NodeView) SelectionEventMode(org.knime.gateway.impl.service.events.SelectionEventSource.SelectionEventMode) RowKey(org.knime.core.data.RowKey) ArgumentMatchers.argThat(org.mockito.ArgumentMatchers.argThat) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) Resource(org.knime.core.webui.page.Resource) SelectionEventSource(org.knime.gateway.impl.service.events.SelectionEventSource) Page(org.knime.core.webui.page.Page) Function(java.util.function.Function) PageUtil(org.knime.core.webui.page.PageUtil) SelectionEvent(org.knime.gateway.impl.service.events.SelectionEvent) WorkflowManagerUtil(org.knime.testing.util.WorkflowManagerUtil) Matchers.nullValue(org.hamcrest.Matchers.nullValue) BiConsumer(java.util.function.BiConsumer) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) ONE_HUNDRED_MILLISECONDS(org.awaitility.Duration.ONE_HUNDRED_MILLISECONDS) PortType(org.knime.core.node.port.PortType) NodeViewNodeFactory(org.knime.testing.node.view.NodeViewNodeFactory) Awaitility.await(org.awaitility.Awaitility.await) PageTest(org.knime.core.webui.page.PageTest) NodeViewTest(org.knime.core.webui.node.view.NodeViewTest) Mockito.times(org.mockito.Mockito.times) IOException(java.io.IOException) Test(org.junit.Test) NodeViewManagerTest.runOnExecutor(org.knime.core.webui.node.view.NodeViewManagerTest.runOnExecutor) Matchers.startsWith(org.hamcrest.Matchers.startsWith) Mockito.verify(org.mockito.Mockito.verify) List(java.util.List) NodeViewNodeModel(org.knime.testing.node.view.NodeViewNodeModel) TextInitialDataService(org.knime.core.webui.data.text.TextInitialDataService) Matchers.is(org.hamcrest.Matchers.is) Assert(org.junit.Assert) Matchers.endsWith(org.hamcrest.Matchers.endsWith) Collections(java.util.Collections) FIVE_SECONDS(org.awaitility.Duration.FIVE_SECONDS) Mockito.mock(org.mockito.Mockito.mock) SelectionEventSourceTest(org.knime.gateway.impl.service.events.SelectionEventSourceTest) NodeViewNodeFactory(org.knime.testing.node.view.NodeViewNodeFactory) RowKey(org.knime.core.data.RowKey) NodeViewNodeModel(org.knime.testing.node.view.NodeViewNodeModel) NodeView(org.knime.core.webui.node.view.NodeView) SelectionEvent(org.knime.gateway.impl.service.events.SelectionEvent) NativeNodeContainer(org.knime.core.node.workflow.NativeNodeContainer) PageTest(org.knime.core.webui.page.PageTest) NodeViewTest(org.knime.core.webui.node.view.NodeViewTest) Test(org.junit.Test) SelectionEventSourceTest(org.knime.gateway.impl.service.events.SelectionEventSourceTest)

Example 2 with NodeViewNodeFactory

use of org.knime.testing.node.view.NodeViewNodeFactory in project knime-core by knime.

the class NodeViewEntTest method testNodeViewEnt.

/**
 * Tests {@link NodeViewEnt#NodeViewEnt(NativeNodeContainer)}.
 *
 * @throws IOException
 */
@Test
public void testNodeViewEnt() throws IOException {
    var wfm = WorkflowManagerUtil.createEmptyWorkflow();
    NativeNodeContainer nncWithoutNodeView = WorkflowManagerUtil.createAndAddNode(wfm, new VirtualSubNodeInputNodeFactory(null, new PortType[0]));
    Assert.assertThrows(IllegalArgumentException.class, () -> new NodeViewEnt(nncWithoutNodeView));
    Function<NodeViewNodeModel, NodeView> nodeViewCreator = m -> {
        Page p = Page.builder(() -> "blub", "index.html").build();
        return NodeViewTest.createNodeView(p, new TextInitialDataService() {

            @Override
            public String getInitialData() {
                return "dummy initial data";
            }
        }, null, null);
    };
    NativeNodeContainer nnc = WorkflowManagerUtil.createAndAddNode(wfm, new NodeViewNodeFactory(nodeViewCreator));
    wfm.executeAllAndWaitUntilDone();
    nnc.setNodeMessage(NodeMessage.newWarning("node message"));
    nnc.getNodeAnnotation().getData().setText("node annotation");
    var ent = new NodeViewEnt(nnc, null);
    assertThat(ent.getProjectId(), startsWith("workflow"));
    assertThat(ent.getWorkflowId(), is("root"));
    assertThat(ent.getNodeId(), is("root:2"));
    assertThat(ent.getInitialData(), is("dummy initial data"));
    assertThat(ent.getInitialSelection(), is(nullValue()));
    var resourceInfo = ent.getResourceInfo();
    assertThat(resourceInfo.getUrl(), endsWith("index.html"));
    assertThat(resourceInfo.getPath(), is(nullValue()));
    assertThat(resourceInfo.getType(), is(Resource.Type.HTML.toString()));
    assertThat(resourceInfo.getId(), is(PageUtil.getPageId(nnc, false, false)));
    var nodeInfo = ent.getNodeInfo();
    assertThat(nodeInfo.getNodeName(), is("NodeView"));
    assertThat(nodeInfo.getNodeAnnotation(), is("node annotation"));
    assertThat(nodeInfo.getNodeState(), is("executed"));
    assertThat(nodeInfo.getNodeWarnMessage(), is("node message"));
    assertThat(nodeInfo.getNodeErrorMessage(), is(nullValue()));
    // a node view as a 'component' without initial data
    nodeViewCreator = m -> {
        Page p = Page.builder(PageTest.BUNDLE_ID, "files", "component.umd.min.js").build();
        return NodeViewTest.createNodeView(p);
    };
    nnc = WorkflowManagerUtil.createAndAddNode(wfm, new NodeViewNodeFactory(nodeViewCreator));
    wfm.executeAllAndWaitUntilDone();
    ent = new NodeViewEnt(nnc, null);
    resourceInfo = ent.getResourceInfo();
    assertThat(ent.getInitialData(), is(nullValue()));
    assertThat(resourceInfo.getType(), is(Resource.Type.VUE_COMPONENT_LIB.toString()));
    assertThat(resourceInfo.getUrl(), endsWith("component.umd.min.js"));
    assertThat(resourceInfo.getPath(), is(nullValue()));
    // test to create a node view entity while running headless (e.g. on the executor)
    NativeNodeContainer nnc2 = nnc;
    runOnExecutor(() -> {
        var ent2 = new NodeViewEnt(nnc2, null);
        assertThat(ent2.getResourceInfo().getPath(), endsWith("component.umd.min.js"));
        assertThat(ent2.getResourceInfo().getUrl(), is(nullValue()));
    });
    WorkflowManagerUtil.disposeWorkflow(wfm);
}
Also used : NativeNodeContainer(org.knime.core.node.workflow.NativeNodeContainer) NodeMessage(org.knime.core.node.workflow.NodeMessage) VirtualSubNodeInputNodeFactory(org.knime.core.node.workflow.virtual.subnode.VirtualSubNodeInputNodeFactory) NodeView(org.knime.core.webui.node.view.NodeView) SelectionEventMode(org.knime.gateway.impl.service.events.SelectionEventSource.SelectionEventMode) RowKey(org.knime.core.data.RowKey) ArgumentMatchers.argThat(org.mockito.ArgumentMatchers.argThat) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) Resource(org.knime.core.webui.page.Resource) SelectionEventSource(org.knime.gateway.impl.service.events.SelectionEventSource) Page(org.knime.core.webui.page.Page) Function(java.util.function.Function) PageUtil(org.knime.core.webui.page.PageUtil) SelectionEvent(org.knime.gateway.impl.service.events.SelectionEvent) WorkflowManagerUtil(org.knime.testing.util.WorkflowManagerUtil) Matchers.nullValue(org.hamcrest.Matchers.nullValue) BiConsumer(java.util.function.BiConsumer) MatcherAssert.assertThat(org.hamcrest.MatcherAssert.assertThat) ONE_HUNDRED_MILLISECONDS(org.awaitility.Duration.ONE_HUNDRED_MILLISECONDS) PortType(org.knime.core.node.port.PortType) NodeViewNodeFactory(org.knime.testing.node.view.NodeViewNodeFactory) Awaitility.await(org.awaitility.Awaitility.await) PageTest(org.knime.core.webui.page.PageTest) NodeViewTest(org.knime.core.webui.node.view.NodeViewTest) Mockito.times(org.mockito.Mockito.times) IOException(java.io.IOException) Test(org.junit.Test) NodeViewManagerTest.runOnExecutor(org.knime.core.webui.node.view.NodeViewManagerTest.runOnExecutor) Matchers.startsWith(org.hamcrest.Matchers.startsWith) Mockito.verify(org.mockito.Mockito.verify) List(java.util.List) NodeViewNodeModel(org.knime.testing.node.view.NodeViewNodeModel) TextInitialDataService(org.knime.core.webui.data.text.TextInitialDataService) Matchers.is(org.hamcrest.Matchers.is) Assert(org.junit.Assert) Matchers.endsWith(org.hamcrest.Matchers.endsWith) Collections(java.util.Collections) FIVE_SECONDS(org.awaitility.Duration.FIVE_SECONDS) Mockito.mock(org.mockito.Mockito.mock) SelectionEventSourceTest(org.knime.gateway.impl.service.events.SelectionEventSourceTest) TextInitialDataService(org.knime.core.webui.data.text.TextInitialDataService) NodeViewNodeFactory(org.knime.testing.node.view.NodeViewNodeFactory) VirtualSubNodeInputNodeFactory(org.knime.core.node.workflow.virtual.subnode.VirtualSubNodeInputNodeFactory) Page(org.knime.core.webui.page.Page) NodeViewNodeModel(org.knime.testing.node.view.NodeViewNodeModel) NodeView(org.knime.core.webui.node.view.NodeView) NativeNodeContainer(org.knime.core.node.workflow.NativeNodeContainer) PortType(org.knime.core.node.port.PortType) PageTest(org.knime.core.webui.page.PageTest) NodeViewTest(org.knime.core.webui.node.view.NodeViewTest) Test(org.junit.Test) SelectionEventSourceTest(org.knime.gateway.impl.service.events.SelectionEventSourceTest)

Example 3 with NodeViewNodeFactory

use of org.knime.testing.node.view.NodeViewNodeFactory in project knime-core by knime.

the class WizardPageUtilTest method testGetWizardPageNodes.

/**
 * Tests {@link WizardPageUtil#getWizardPageNodes(WorkflowManager)} etc.
 */
@Test
public void testGetWizardPageNodes() {
    NodeID componentWithNodeViewNode = m_wfm.collapseIntoMetaNode(new NodeID[] { WorkflowManagerUtil.createAndAddNode(m_wfm, new NodeViewNodeFactory(0, 0)).getID() }, new WorkflowAnnotation[0], "component").getCollapsedMetanodeID();
    m_wfm.convertMetaNodeToSubNode(componentWithNodeViewNode);
    WorkflowManager componentWfm = ((SubNodeContainer) m_wfm.getNodeContainer(componentWithNodeViewNode)).getWorkflowManager();
    List<NativeNodeContainer> wizardPageNodes = WizardPageUtil.getWizardPageNodes(componentWfm);
    assertThat(wizardPageNodes.size(), is(1));
    assertThat(wizardPageNodes.get(0).getName(), is("NodeView"));
    NodeID componentWithAComponentWithNodeView = m_wfm.collapseIntoMetaNode(new NodeID[] { componentWithNodeViewNode }, new WorkflowAnnotation[0], "component of a component").getCollapsedMetanodeID();
    m_wfm.convertMetaNodeToSubNode(componentWithAComponentWithNodeView);
    componentWfm = ((SubNodeContainer) m_wfm.getNodeContainer(componentWithAComponentWithNodeView)).getWorkflowManager();
    wizardPageNodes = WizardPageUtil.getWizardPageNodes(componentWfm);
    assertTrue(wizardPageNodes.isEmpty());
    wizardPageNodes = WizardPageUtil.getWizardPageNodes(componentWfm, false);
    assertTrue(wizardPageNodes.isEmpty());
    wizardPageNodes = WizardPageUtil.getWizardPageNodes(componentWfm, true);
    assertThat(wizardPageNodes.size(), is(1));
    assertThat(wizardPageNodes.get(0).getName(), is("NodeView"));
    NodeID componentWithNodeWizardNode = m_wfm.collapseIntoMetaNode(new NodeID[] { WorkflowManagerUtil.createAndAddNode(m_wfm, new WizardNodeFactory()).getID() }, new WorkflowAnnotation[0], "component").getCollapsedMetanodeID();
    m_wfm.convertMetaNodeToSubNode(componentWithNodeWizardNode);
    componentWfm = ((SubNodeContainer) m_wfm.getNodeContainer(componentWithNodeWizardNode)).getWorkflowManager();
    wizardPageNodes = WizardPageUtil.getWizardPageNodes(componentWfm);
    assertThat(wizardPageNodes.size(), is(1));
    assertThat(wizardPageNodes.get(0).getName(), is("Wizard"));
}
Also used : NodeViewNodeFactory(org.knime.testing.node.view.NodeViewNodeFactory) SubNodeContainer(org.knime.core.node.workflow.SubNodeContainer) WorkflowManager(org.knime.core.node.workflow.WorkflowManager) NodeID(org.knime.core.node.workflow.NodeID) NativeNodeContainer(org.knime.core.node.workflow.NativeNodeContainer) WorkflowAnnotation(org.knime.core.node.workflow.WorkflowAnnotation) Test(org.junit.Test)

Example 4 with NodeViewNodeFactory

use of org.knime.testing.node.view.NodeViewNodeFactory in project knime-core by knime.

the class NodeViewEntUtilTest method testCreateNodeViewEntAndSetUpEventSources.

/**
 * Tests
 * {@link NodeViewEntUtil#createNodeViewEntAndEventSources(org.knime.core.node.workflow.NativeNodeContainer, BiConsumer, boolean)}.
 *
 * @throws IOException
 */
@SuppressWarnings("unchecked")
@Test
public void testCreateNodeViewEntAndSetUpEventSources() throws IOException {
    var wfm = WorkflowManagerUtil.createEmptyWorkflow();
    var nnc = WorkflowManagerUtil.createAndAddNode(wfm, new NodeViewNodeFactory(0, 0));
    var hlh = nnc.getNodeModel().getInHiLiteHandler(0);
    wfm.executeAllAndWaitUntilDone();
    BiConsumer<String, Object> eventConsumer = Mockito.mock(BiConsumer.class);
    /* assert that the selection event source is properly set up */
    var eventSource = NodeViewEntUtil.createNodeViewEntAndEventSources(nnc, eventConsumer, false).getSecond()[0];
    fireHiLiteEvent(hlh, "test");
    verify(eventConsumer).accept(eq("SelectionEvent"), argThat(se -> verifySelectionEvent((SelectionEvent) se, "test")));
    /* assert that all the listeners are removed from the selection event source on node state change */
    wfm.resetAndConfigureAll();
    fireHiLiteEvent(hlh, "test2");
    verify(eventConsumer, never()).accept(eq("SelectionEvent"), argThat(se -> verifySelectionEvent((SelectionEvent) se, "test2")));
    eventSource.removeAllEventListeners();
    /* test the selection event source in combination with the node view state event source */
    // test selection events
    wfm.executeAllAndWaitUntilDone();
    NodeViewEntUtil.createNodeViewEntAndEventSources(nnc, eventConsumer, true);
    fireHiLiteEvent(hlh, "test3");
    verify(eventConsumer).accept(eq("SelectionEvent"), argThat(se -> verifySelectionEvent((SelectionEvent) se, "test3")));
    // test node view state event: configured
    wfm.resetAndConfigureAll();
    awaitUntilAsserted(() -> verify(eventConsumer).accept(eq("NodeViewStateEvent"), argThat(se -> verifyNodeViewStateEvent((NodeViewStateEvent) se, "configured", null))));
    // make sure no selection events are fired if node is not executed
    fireHiLiteEvent(hlh, "test4");
    verify(eventConsumer, never()).accept(eq("SelectionEvent"), argThat(se -> verifySelectionEvent((SelectionEvent) se, "test4")));
    // test node view state event: executed
    wfm.executeAllAndWaitUntilDone();
    awaitUntilAsserted(() -> verify(eventConsumer).accept(eq("NodeViewStateEvent"), argThat(se -> verifyNodeViewStateEvent((NodeViewStateEvent) se, "executed", "the initial data"))));
    // make sure that selection events are issued again
    fireHiLiteEvent(hlh, "test5");
    verify(eventConsumer).accept(eq("SelectionEvent"), argThat(se -> verifySelectionEvent((SelectionEvent) se, "test5")));
    WorkflowManagerUtil.disposeWorkflow(wfm);
}
Also used : NodeViewNodeFactory(org.knime.testing.node.view.NodeViewNodeFactory) KeyEvent(org.knime.core.node.property.hilite.KeyEvent) NodeViewStateEvent(org.knime.gateway.impl.service.events.NodeViewStateEvent) Awaitility.await(org.awaitility.Awaitility.await) SelectionEventMode(org.knime.gateway.impl.service.events.SelectionEventSource.SelectionEventMode) RowKey(org.knime.core.data.RowKey) ArgumentMatchers.argThat(org.mockito.ArgumentMatchers.argThat) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) IOException(java.io.IOException) Test(org.junit.Test) Mockito.verify(org.mockito.Mockito.verify) Objects(java.util.Objects) ThrowingRunnable(org.awaitility.core.ThrowingRunnable) Mockito(org.mockito.Mockito) Mockito.never(org.mockito.Mockito.never) List(java.util.List) SelectionEvent(org.knime.gateway.impl.service.events.SelectionEvent) WorkflowManagerUtil(org.knime.testing.util.WorkflowManagerUtil) HiLiteHandler(org.knime.core.node.property.hilite.HiLiteHandler) BiConsumer(java.util.function.BiConsumer) FIVE_SECONDS(org.awaitility.Duration.FIVE_SECONDS) ONE_HUNDRED_MILLISECONDS(org.awaitility.Duration.ONE_HUNDRED_MILLISECONDS) NodeViewNodeFactory(org.knime.testing.node.view.NodeViewNodeFactory) NodeViewStateEvent(org.knime.gateway.impl.service.events.NodeViewStateEvent) Test(org.junit.Test)

Example 5 with NodeViewNodeFactory

use of org.knime.testing.node.view.NodeViewNodeFactory in project knime-core by knime.

the class WizardPageUtilTest method testIsWizardPage.

/**
 * Tests {@link WizardPageUtil#isWizardPage(WorkflowManager, NodeID)}.
 */
@Test
public void testIsWizardPage() {
    NodeID nonExistentNode = new NodeID(4).createChild(5);
    assertFalse(WizardPageUtil.isWizardPage(m_wfm, nonExistentNode));
    NodeID metanode = m_wfm.createAndAddSubWorkflow(new PortType[0], new PortType[0], "metanode").getID();
    assertFalse(WizardPageUtil.isWizardPage(m_wfm, metanode));
    m_wfm.convertMetaNodeToSubNode(metanode);
    NodeID emptyComponent = metanode;
    assertFalse(WizardPageUtil.isWizardPage(m_wfm, emptyComponent));
    SubNodeContainer component = (SubNodeContainer) m_wfm.getNodeContainer(emptyComponent);
    WorkflowManagerUtil.createAndAddNode(component.getWorkflowManager(), new WizardNodeFactory());
    NodeID componentWithWizardNode = emptyComponent;
    assertTrue(WizardPageUtil.isWizardPage(m_wfm, componentWithWizardNode));
    NodeID componentWithNodeViewNode = m_wfm.collapseIntoMetaNode(new NodeID[] { WorkflowManagerUtil.createAndAddNode(m_wfm, new NodeViewNodeFactory(0, 0)).getID() }, new WorkflowAnnotation[0], "component").getCollapsedMetanodeID();
    m_wfm.convertMetaNodeToSubNode(componentWithNodeViewNode);
    assertTrue(WizardPageUtil.isWizardPage(m_wfm, componentWithNodeViewNode));
    NodeID componentWithAComponentWithNodeView = m_wfm.collapseIntoMetaNode(new NodeID[] { componentWithNodeViewNode }, new WorkflowAnnotation[0], "component of a component").getCollapsedMetanodeID();
    m_wfm.convertMetaNodeToSubNode(componentWithAComponentWithNodeView);
    assertTrue(WizardPageUtil.isWizardPage(m_wfm, componentWithAComponentWithNodeView));
}
Also used : SubNodeContainer(org.knime.core.node.workflow.SubNodeContainer) NodeViewNodeFactory(org.knime.testing.node.view.NodeViewNodeFactory) NodeID(org.knime.core.node.workflow.NodeID) PortType(org.knime.core.node.port.PortType) WorkflowAnnotation(org.knime.core.node.workflow.WorkflowAnnotation) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)7 NodeViewNodeFactory (org.knime.testing.node.view.NodeViewNodeFactory)7 NativeNodeContainer (org.knime.core.node.workflow.NativeNodeContainer)4 IOException (java.io.IOException)3 List (java.util.List)3 BiConsumer (java.util.function.BiConsumer)3 Awaitility.await (org.awaitility.Awaitility.await)3 FIVE_SECONDS (org.awaitility.Duration.FIVE_SECONDS)3 ONE_HUNDRED_MILLISECONDS (org.awaitility.Duration.ONE_HUNDRED_MILLISECONDS)3 RowKey (org.knime.core.data.RowKey)3 PortType (org.knime.core.node.port.PortType)3 NodeID (org.knime.core.node.workflow.NodeID)3 WorkflowAnnotation (org.knime.core.node.workflow.WorkflowAnnotation)3 SelectionEvent (org.knime.gateway.impl.service.events.SelectionEvent)3 SelectionEventMode (org.knime.gateway.impl.service.events.SelectionEventSource.SelectionEventMode)3 WorkflowManagerUtil (org.knime.testing.util.WorkflowManagerUtil)3 ArgumentMatchers.argThat (org.mockito.ArgumentMatchers.argThat)3 ArgumentMatchers.eq (org.mockito.ArgumentMatchers.eq)3 Mockito.verify (org.mockito.Mockito.verify)3 Collections (java.util.Collections)2