@Test public void testRunCallsFinished() { underTest.setContext(new ClusterIdEvaluatorContext(AUTOSCALE_CLUSTER_ID)); when(clusterService.findById(anyLong())).thenThrow(new RuntimeException("exception from the test")); underTest.run(); verify(executorServiceWithRegistry).finished(underTest, AUTOSCALE_CLUSTER_ID); verify(eventPublisher).publishEvent(any(UpdateFailedEvent.class)); }
@Override public void setContext(EvaluatorContext context) { clusterId = (long) context.getData(); }
YarnLoadEvaluator extends EvaluatorExecutor { @Override public void setContext(EvaluatorContext context) { clusterId = (long) context.getData(); } }
YarnLoadEvaluator extends EvaluatorExecutor { @Override public void setContext(EvaluatorContext context) { clusterId = (long) context.getData(); }  }
YarnLoadEvaluator extends EvaluatorExecutor { @Override public void setContext(EvaluatorContext context) { clusterId = (long) context.getData(); }  @Nonnull @Override EvaluatorContext getContext(); @Override void setContext(EvaluatorContext context); @Override String getName(); void sendScaleUpEvent(Integer existingHostGroupSize, Integer targetScaleUpCount); void sendScaleDownEvent(Integer existingHostGroupSize, List<String> yarnRecommendedDecommissionHosts); }
YarnLoadEvaluator extends EvaluatorExecutor { @Override public void setContext(EvaluatorContext context) { clusterId = (long) context.getData(); }  @Nonnull @Override EvaluatorContext getContext(); @Override void setContext(EvaluatorContext context); @Override String getName(); void sendScaleUpEvent(Integer existingHostGroupSize, Integer targetScaleUpCount); void sendScaleDownEvent(Integer existingHostGroupSize, List<String> yarnRecommendedDecommissionHosts);  }