public static void tryEnrichClusterEntryPointError(@Nullable Throwable root) {
        tryEnrichOutOfMemoryError(
                root,
                JM_METASPACE_OOM_ERROR_MESSAGE,
                JM_DIRECT_OOM_ERROR_MESSAGE,
                JM_HEAP_SPACE_OOM_ERROR_MESSAGE);
    }
@Test
    public void testDirectMemoryOOMHandling() {
        OutOfMemoryError error = new OutOfMemoryError("Direct buffer memory");
        ClusterEntryPointExceptionUtils.tryEnrichClusterEntryPointError(error);

        assertThat(
                error.getMessage(),
                is(ClusterEntryPointExceptionUtils.JM_DIRECT_OOM_ERROR_MESSAGE));
    }