@Test
public void testBuildContainerLaunchContext() throws Exception {

  AbstractProviderService providerService = new DockerProviderService();
  Component component = serviceContext.scheduler.getAllComponents().entrySet()
      .iterator().next().getValue();
  ContainerLaunchService.ComponentLaunchContext clc =
      createEntryPointCLCFor(testService, component, "sleep,9000");
  ComponentInstance instance = component.getAllComponentInstances().iterator()
      .next();
  Container container = mock(Container.class);
  ContainerId containerId = ContainerId.newContainerId(
      ApplicationAttemptId.newInstance(ApplicationId.newInstance(
          System.currentTimeMillis(), 1), 1), 1L);
  when(container.getId()).thenReturn(containerId);
  providerService.buildContainerLaunchContext(launcher, testService, instance,
      rule.getFs(), serviceContext.scheduler.getConfig(), container, clc);
  Assert.assertEquals("artifact", clc.getArtifact().getId(),
      launcher.getDockerImage());
}