@Test
public void testDeniedWhitelistGroup() throws ContainerExecutionException {

  String[] inputCommand = {
      "$JAVA_HOME/bin/java jar MyJob.jar"
  };
  List<String> commands = Arrays.asList(inputCommand);
  conf.set(YarnConfiguration.YARN_CONTAINER_SANDBOX_WHITELIST_GROUP,
      WHITELIST_GROUP);
  runtimeContextBuilder.setExecutionAttribute(USER, NORMAL_USER);
  runtimeContextBuilder.setExecutionAttribute(CONTAINER_RUN_CMDS, commands);
  runtime.prepareContainer(runtimeContextBuilder.build());
  Assert.assertTrue("Java security manager must be enabled for "
          + "unauthorized users",
      commands.get(0).contains(SECURITY_FLAG));
}