@Test
public void testExecContainer() throws Exception {

  Container container = mock(Container.class);
  try {
    ContainerExecContext.Builder builder = new ContainerExecContext.Builder();
    builder.setUser("foo").setAppId("app1").setContainer(container);
    ContainerExecContext ctx = builder.build();
    containerExecutor.execContainer(ctx);
  } catch (Exception e) {
    // socket exception should be thrown immediately, without RPC retries.
    Assert.assertTrue(e instanceof ContainerExecutionException);
  }
}