### Description

From the nodes stats API, we should extract the `thread_pool` stats into their own endpoint. This endpoint can then be non-node-centric, and present a global view of the number of completed, rejected, and failed operations for each of the threadpools in the system.
server/src/test/java/org/elasticsearch/threadpool/ThreadPoolStatsTests.java
/*
 * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
 * or more contributor license agreements. Licensed under the Elastic License
 * 2.0 and the Server Side Public License, v 1; you may not use this file except
 * in compliance with, at your election, the Elastic License 2.0 or the Server
 * Side Public License, v 1.
 */
package org.elasticsearch.threadpool;
import org.elasticsearch.common.io.stream.BytesStreamOutput;
import org.elasticsearch.test.ESTestCase;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import static org.elasticsearch.threadpool.ThreadPool.THREAD_POOL_TYPES;
import static org.hamcrest.Matchers.contains;
public class ThreadPoolStatsTests extends ESTestCase {