@Test
 public void testForUpdatedSecurityDataDir() {
   String homeDirName = getHomeDirName("conf-demo/conf/gateway-site.xml");
   System.setProperty(GatewayConfigImpl.GATEWAY_HOME_VAR, homeDirName);
   System.setProperty(GatewayConfigImpl.GATEWAY_DATA_HOME_VAR, homeDirName);
   GatewayConfig config = new GatewayConfigImpl();
   assertTrue(("target/test").equalsIgnoreCase(config.getGatewaySecurityDir()));
 }
 @Test
 public void testForDefaultSecurityDataDir() {
   String homeDirName = getHomeDirName("conf-site/conf/gateway-site.xml");
   System.setProperty(GatewayConfigImpl.GATEWAY_HOME_VAR, homeDirName);
   System.setProperty(GatewayConfigImpl.GATEWAY_DATA_HOME_VAR, homeDirName);
   GatewayConfig config = new GatewayConfigImpl();
   assertThat(config.getGatewaySecurityDir(), is(homeDirName + File.separator + "security"));
 }
  public void cleanup() throws Exception {
    gateway.stop();
    FileUtils.deleteQuietly(new File(config.getGatewayTopologyDir()));
    FileUtils.deleteQuietly(new File(config.getGatewayConfDir()));
    FileUtils.deleteQuietly(new File(config.getGatewaySecurityDir()));
    FileUtils.deleteQuietly(new File(config.getGatewayDeploymentDir()));
    FileUtils.deleteQuietly(new File(config.getGatewayDataDir()));
    FileUtils.deleteQuietly(new File(config.getGatewayServicesDir()));

    for (Service service : services.values()) {
      service.server.stop();
    }
    services.clear();

    ldap.stop(true);
  }