private ExitStatus run() {
    try {
      init();
      return new Processor().processNamespace().getExitStatus();
    } catch (IllegalArgumentException e) {
      System.out.println(e + ".  Exiting ...");
      return ExitStatus.ILLEGAL_ARGUMENTS;
    } catch (IOException e) {
      System.out.println(e + ".  Exiting ...");
      LOG.error(e + ".  Exiting ...");
      return ExitStatus.IO_EXCEPTION;
    } finally {
      dispatcher.shutdownNow();
    }
  }
@Test(timeout = 300000)
  public void testWithFederatedHACluster() throws Exception{

    final Configuration conf = new HdfsConfiguration();
    initConf(conf);
    final MiniDFSCluster cluster = new MiniDFSCluster
        .Builder(conf)
        .storageTypes(new StorageType[]{StorageType.DISK,
            StorageType.ARCHIVE})
        .nnTopology(MiniDFSNNTopology.simpleHAFederatedTopology(2))
        .numDataNodes(4).build();
    DFSTestUtil.setFederatedHAConfiguration(cluster, conf);


    try {

      Collection<URI> namenodes = DFSUtil.getInternalNsRpcUris(conf);

      Iterator<URI> iter = namenodes.iterator();
      URI nn1 = iter.next();
      URI nn2 = iter.next();

      cluster.transitionToActive(0);
      cluster.transitionToActive(2);

      final String file = "/test/file";
      Path dir = new Path ("/test");

      final DistributedFileSystem dfs1  = (DistributedFileSystem) FileSystem
          .get(nn1, conf);

      final DistributedFileSystem dfs2  = (DistributedFileSystem) FileSystem
          .get(nn2, conf);

     setupStoragePoliciesAndPaths(dfs1, dfs2, dir, file);

      //Changing Storage Policies
      dfs1.setStoragePolicy(dir, "COLD");
      dfs2.setStoragePolicy(dir, "HOT");

      int rc = ToolRunner.run(conf, new Mover.Cli(),
          new String[] {"-p", nn1 + dir.toString(), nn2 + dir.toString()});

      Assert.assertEquals("Movement to DISK should be successful", 0, rc);

      waitForLocatedBlockWithArchiveStorageType(dfs1, file, 3);
      waitForLocatedBlockWithDiskStorageType(dfs2, file, 3);
    } finally {
      cluster.shutdown();
    }

  }