TaskExecutor implements Executor { @Override public void frameworkMessage(final ExecutorDriver executorDriver, final byte[] bytes) { if (null != bytes && "STOP".equals(new String(bytes))) { log.error("call frameworkMessage executor stopped."); executorDriver.stop(); } } TaskExecutor(final ElasticJob elasticJob);  TaskExecutor(final String elasticJobType); @Override void registered(final ExecutorDriver executorDriver, final Protos.ExecutorInfo executorInfo, final Protos.FrameworkInfo frameworkInfo, final Protos.SlaveInfo slaveInfo); @Override void reregistered(final ExecutorDriver executorDriver, final Protos.SlaveInfo slaveInfo); @Override void disconnected(final ExecutorDriver executorDriver); @Override void launchTask(final ExecutorDriver executorDriver, final Protos.TaskInfo taskInfo); @Override void killTask(final ExecutorDriver executorDriver, final Protos.TaskID taskID); @Override void frameworkMessage(final ExecutorDriver executorDriver, final byte[] bytes); @Override void shutdown(final ExecutorDriver executorDriver); @Override void error(final ExecutorDriver executorDriver, final String message);  }
@Test public void assertFrameworkMessage() { taskExecutor.frameworkMessage(executorDriver, null); }