/*
 * Copyright 2017 Crown Copyright
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

package stroom.node.impl;


import stroom.node.api.FindNodeCriteria;
import stroom.node.api.NodeService;
import stroom.test.AbstractCoreIntegrationTest;

import org.junit.jupiter.api.Test;

import javax.inject.Inject;

import static org.assertj.core.api.Assertions.assertThat;

class TestNodeService extends AbstractCoreIntegrationTest {

    @Inject
    private NodeService nodeService;

    @Test
    void testBasic() {
        assertThat(nodeService.findNodeNames(new FindNodeCriteria()).size() > 0).isTrue();
    }
}

@@ -665,16 +665,49 @@
 iteria;%0A
+import stroom.node.api.NodeInfo;%0A
 import s
@@ -734,16 +734,16 @@
 ervice;%0A
-
 import s
@@ -968,16 +968,59 @@
 Test %7B%0A%0A
+    @Inject%0A    private NodeInfo nodeInfo;%0A
     @Inj
@@ -1071,16 +1071,16 @@
   @Test%0A
-
     void
@@ -1094,16 +1094,213 @@
 sic() %7B%0A
+        assertThat(nodeInfo.getThisNodeName()).isNotNull();%0A        assertThat(nodeInfo.getThisNodeName()).isEqualTo(%22node1a%22);%0A        assertThat(nodeService).isInstanceOf(NodeServiceImpl.class);%0A
         

Fix test