@Test
public void testClusterSubmitter() throws  Exception {

  TonyClient client = spy(new TonyClient());
  doReturn(0).when(client).start(); // Don't really call start() method.
  ClusterSubmitter submitter = new ClusterSubmitter(client);
  int exitCode = submitter.submit(new String[] {"--src_dir", "src"});
  assertEquals(exitCode, 0);
  assertTrue(
      client.getTonyConf().get(TonyConfigurationKeys.getContainerResourcesKey()).contains(Constants.TONY_JAR_NAME));
}