### Question:
PublicRestController { @GetMapping @ApiOperation(value="Retrieves all nodes in the cluster that the current node knows about.", notes = "For _admin nodes the result contains all nodes, for non _admin nodes the" + "result only contains nodes from contexts available on this node and the _admin nodes.") public List<JsonServerNode> getClusterNodes() { return StreamSupport.stream(axonServerProvider.spliterator(), false) .map(n -> new JsonServerNode(n)) .sorted(Comparator.comparing(JsonServerNode::getName)).collect(Collectors.toList()); } PublicRestController(Iterable<AxonServer> axonServerProvider,
                                Topology topology,
                                CommandDispatcher commandDispatcher,
                                QueryDispatcher queryDispatcher,
                                EventDispatcher eventDispatcher,
                                FeatureChecker features,
                                MessagingPlatformConfiguration messagingPlatformConfiguration,
                                VersionInfoProvider versionInfoSupplier,
                                Supplier<SubscriptionMetrics> subscriptionMetricsRegistry); @GetMapping @ApiOperation(value="Retrieves all nodes in the cluster that the current node knows about.", notes = "For _admin nodes the result contains all nodes, for non _admin nodes the" + "result only contains nodes from contexts available on this node and the _admin nodes.") List<JsonServerNode> getClusterNodes(); @GetMapping(path = "me") @ApiOperation(value="Retrieves general information on the configuration of the current node, including hostnames and ports for the gRPC and HTTP connections and contexts") NodeConfiguration getNodeConfiguration(); @GetMapping(path="mycontexts") @ApiOperation(value="Retrieves names for all storage (non admin) contexts for the current node") Iterable<String> getMyContextList(); @GetMapping(path = "license") @ApiOperation(value="Retrieves license information") LicenseInfo licenseInfo(); @GetMapping(path = "status") @ApiOperation(value="Retrieves status information, used by UI") StatusInfo status(@RequestParam(value = "context", defaultValue = Topology.DEFAULT_CONTEXT, required = false) String context); @GetMapping(path = "user") @ApiOperation(value="Retrieves information on the user logged in in the current Http Session") UserInfo userInfo(HttpServletRequest request); @GetMapping(path = "version") @ApiOperation(value = "Retrieves version information of the product") VersionInfo versionInfo();  }### Answer:
@Test public void getClusterNodes() { List<PublicRestController.JsonServerNode> nodes = testSubject.getClusterNodes(); assertEquals(1, nodes.size()); assertEquals("DEMO", nodes.get(0).getName()); }