@AfterClass
  public static void tearDown() throws ProActiveException {
    server.terminate();

    router.stop();

    VFSMountManagerHelper.terminate();

    if (spacesDir != null && spacesDir.exists()) {
      assertTrue(AbstractIOOperationsBase.deleteRecursively(spacesDir));
      spacesDir = null;
    }
  }
  /**
   * Start a PAMR router and a file system server
   *
   * @throws Exception
   */
  @BeforeClass
  public static void setUp() throws Exception {

    RouterConfig config = new RouterConfig();
    config.setPort(PAMRConfig.PA_NET_ROUTER_PORT.getValue());
    router = Router.createAndStart(config);

    protocolsToTest.remove(CentralPAPropertyRepository.PA_COMMUNICATION_PROTOCOL.getValue());

    StringBuilder apstring = new StringBuilder();
    for (String p : protocolsToTest) {
      apstring.append(p + ",");
    }
    apstring.deleteCharAt(apstring.length() - 1);

    CentralPAPropertyRepository.PA_COMMUNICATION_ADDITIONAL_PROTOCOLS.setValue(apstring.toString());

    spacesDir = new File(System.getProperty("java.io.tmpdir"), "ProActive SpaceMountManagerTest");

    if (server == null) {
      server = new FileSystemServerDeployer("inputserver", spacesDir.toString(), true, true);
      System.out.println("Started File Server at " + Arrays.toString(server.getVFSRootURLs()));
    }
  }