LinuxContainerExecutor extends ContainerExecutor { @Override public int relaunchContainer(ContainerStartContext ctx) throws IOException, ConfigurationException { return handleLaunchForLaunchType(ctx, ApplicationConstants.ContainerLaunchType.RELAUNCH); } LinuxContainerExecutor();  LinuxContainerExecutor(LinuxContainerRuntime linuxContainerRuntime); @Override void setConf(Configuration conf); @Override void init(Context context); @Override void startLocalizer(LocalizerStartContext ctx); @VisibleForTesting void buildMainArgs(List<String> command, String user, String appId,
      String locId, InetSocketAddress nmAddr, List<String> localDirs); @Override void prepareContainer(ContainerPrepareContext ctx); @Override int launchContainer(ContainerStartContext ctx); @Override int relaunchContainer(ContainerStartContext ctx); @Override String[] getIpAndHost(Container container); @Override int reacquireContainer(ContainerReacquisitionContext ctx); @Override boolean signalContainer(ContainerSignalContext ctx); @Override boolean reapContainer(ContainerReapContext ctx); @Override void deleteAsUser(DeletionAsUserContext ctx); @Override void symLink(String target, String symlink); @Override boolean isContainerAlive(ContainerLivenessContext ctx); void mountCgroups(List<String> cgroupKVs, String hierarchy); @VisibleForTesting ResourceHandler getResourceHandler(); void removeDockerContainer(String containerId);  }
@Test public void testRelaunchContainer() throws Exception { Container container = mock(Container.class); LinuxContainerExecutor lce = mock(LinuxContainerExecutor.class); ContainerStartContext.Builder builder = new ContainerStartContext.Builder(); builder.setContainer(container).setUser("foo"); ContainerStartContext ctx = builder.build(); lce.relaunchContainer(ctx); verify(lce, times(1)).relaunchContainer(ctx); }