@Test(timeout = 2000)
  public void testNotEnoughCapacity() throws ServiceException {
    Map<String, LlapMetrics> data = generateClusterMetrics();
    data.get("0").getMetrics().put(LlapDaemonExecutorInfo.ExecutorNumExecutorsAvailableAverage.name(), 5L);
    listener.newClusterMetrics(data);

    verify(mockClient, never()).setCapacity(any(RpcController.class), any(SetCapacityRequestProto.class));
  }
Test class to test BlacklistingLlapMetricsListener object.
llap-tez/src/test/org/apache/hadoop/hive/llap/tezplugins/metrics/TestBlacklistingLlapMetricsListener.java