@VisibleForTesting
    static void instantiateNonHeapMemoryMetrics(final MetricGroup metricGroup) {
        instantiateMemoryUsageMetrics(
                metricGroup, () -> ManagementFactory.getMemoryMXBean().getNonHeapMemoryUsage());
    }
@Test
    void testNonHeapMetricsCompleteness() {
        final InterceptingOperatorMetricGroup nonHeapMetrics =
                new InterceptingOperatorMetricGroup();

        MetricUtils.instantiateNonHeapMemoryMetrics(nonHeapMetrics);

        assertThat(nonHeapMetrics.get(MetricNames.MEMORY_USED)).isNotNull();
        assertThat(nonHeapMetrics.get(MetricNames.MEMORY_COMMITTED)).isNotNull();
        assertThat(nonHeapMetrics.get(MetricNames.MEMORY_MAX)).isNotNull();
    }