public Map<String, Object> getNodeMetrics(String node) {
        Map<String, Object> metrics = new HashMap<>();

        Request nodeStatRequest = new Request("GET", "_nodes/" + node + "/stats");
        final DocumentContext nodeContext = getNodeContextFromRequest(node, nodeStatRequest);

        if (Objects.nonNull(nodeContext)) {
            Arrays.stream(NodeStatMetrics.values())
                    .filter(m -> Objects.nonNull(m.getNodeStat()))
                    .forEach(metric -> {
                        try {
                            metrics.put(metric.getFieldName(), metric.mapValue(nodeContext.read(metric.getNodeStat())));
                        } catch (Exception e) {
                            log.error("Could not retrieve metric {} for node {}", metric.getFieldName(), node);
                        }
                    });
        }

        return metrics;
    }
@Test
    public void getNodeMetrics() {
        Map<String, Object> nodeMetrics = collector.getNodeMetrics(NODENAME);
        assertThat(nodeMetrics.get("cpu_load")).isEqualTo(26.4873046875);
        assertThat(nodeMetrics.get("disk_free")).isEqualTo(572.1824f);
        String[] allMetrics = Arrays.stream(NodeStatMetrics.values()).map(NodeStatMetrics::getFieldName).toArray(String[]::new);
        assertThat(nodeMetrics).containsKeys(allMetrics);
    }