private void initNodes(final int maxNodeCount) {

        testNodes.stream()
                .limit(maxNodeCount)
                .forEach(node -> {

                    final String baseEndPointUrl = getBaseEndPointUrl(node);

                    RequestListener requestListener = new RequestListener(node);
                    nodeToListenerMap.put(node.getNodeName(), requestListener);

                    final JerseyTest jerseyTest = new JerseyTestBuilder<>(
                            () -> getRestResource(node, testNodes, getBaseEndPointUrls()),
                            node.getPort(),
                            requestListener)
                            .build();

                    nodeToJerseyTestMap.put(node.getNodeName(), jerseyTest);

                    try {
                        if (node.isEnabled) {
                            LOGGER.info("Starting node [{}] (enabled: {}) at {}",
                                    node.getNodeName(), node.isEnabled, baseEndPointUrl);
                            jerseyTest.setUp();
                        }
                    } catch (Exception e) {
                        throw new RuntimeException("Error starting jersey test on " + baseEndPointUrl, e);
                    }
                });
    }
Initialises the fist node in getTestNodes()
For use when your test does not require the calling out to other nodes.
Calls getRestResource() for the node being initialised.
stroom-test-common/src/main/java/stroom/test/common/util/test/AbstractMultiNodeResourceTest.java