NodeResourceImpl implements NodeResource { @Override public void setPriority(final String nodeName, final Integer priority) { modifyNode(nodeName, node -> node.setPriority(priority)); } @Inject  NodeResourceImpl(final NodeServiceImpl nodeService,
                     final NodeInfo nodeInfo,
                     final ClusterNodeManager clusterNodeManager,
                     final WebTargetFactory webTargetFactory,
                     final DocumentEventLog documentEventLog); @Override List<String> listAllNodes(); @Override List<String> listEnabledNodes(); @Override FetchNodeStatusResponse find(); @Override ClusterNodeInfo info(final String nodeName); @Override Long ping(final String nodeName); @Override void setPriority(final String nodeName, final Integer priority); @Override void setEnabled(final String nodeName, final Boolean enabled);  }
@Test void setPriority() { initNodes(); final String subPath = ResourcePaths.buildPath(NodeResource.PRIORITY_PATH_PART, "node2"); doPutTest( subPath, 10L); Node newNode = new Node(); newNode.setName("node2"); newNode.setPriority(10); verify(nodeServiceMap.get("node1"), Mockito.times(1)) .update(Mockito.eq(newNode)); }