MyriadOperations { public void shutdownFramework() { LOGGER.info("Received request to shutdown Myriad Framework.."); Status driverStatus = driverManager.getDriverStatus(); if (Status.DRIVER_RUNNING != driverStatus) { LOGGER.warn("Driver is not running. Status: " + driverStatus); } else { driverStatus = driverManager.stopDriver(false); LOGGER.info("Myriad driver was shutdown with status " + driverStatus); } try { myriadWebServer.stop(); LOGGER.info("Myriad webserver was shutdown successfully"); } catch (Exception e) { LOGGER.info("Failed to shutdown Myriad webserver: " + e.getMessage()); } if (myriadStateStore != null) { try { myriadStateStore.removeMyriadState(); LOGGER.info("Myriad State store was removed successfully."); } catch (Exception e) { LOGGER.info("Failed to remove Myriad state store: " + e.getMessage()); } } } @Inject  MyriadOperations(MyriadConfiguration cfg, SchedulerState schedulerState,
      NodeScaleDownPolicy nodeScaleDownPolicy, MyriadDriverManager driverManager,
      MyriadWebServer myriadWebServer, RMContext rmContext); void flexUpCluster(ServiceResourceProfile serviceResourceProfile, int instances, Constraint constraint); void flexDownCluster(ServiceResourceProfile serviceResourceProfile, Constraint constraint, int numInstancesToScaleDown); void flexUpAService(int instances, String serviceName); void flexDownAService(int numInstancesToScaleDown, String serviceName); Integer getFlexibleInstances(String taskPrefix); void shutdownFramework();  }
@Test public void testShutdownCluster() throws Exception { MyriadOperations ops = initialize(); ops.shutdownFramework(); }