ApocConfig extends LifecycleAdapter { protected String determineNeo4jConfFolder() { String command = System.getProperty(SUN_JAVA_COMMAND); if (command == null) { log.warn("system property %s is not set, assuming '.' as conf dir. This might cause `apoc.conf` not getting loaded.", SUN_JAVA_COMMAND); return DEFAULT_PATH; } else { final String neo4jConfFolder = Stream.of(command.split("--")) .map(String::trim) .filter(s -> s.startsWith(CONFIG_DIR)) .map(s -> s.substring(CONFIG_DIR.length())) .findFirst() .orElse(DEFAULT_PATH); if (DEFAULT_PATH.equals(neo4jConfFolder)) { log.info("cannot determine conf folder from sys property %s, assuming '.' ", command); } else { log.info("from system properties: NEO4J_CONF=%s", neo4jConfFolder); } return neo4jConfFolder; } } ApocConfig(Config neo4jConfig, LogService log, GlobalProcedures globalProceduresRegistry, DatabaseManagementService databaseManagementService);  ApocConfig(); Configuration getConfig(); @Override void init(); LoggingType getLoggingType(); SimpleRateLimiter getRateLimiter(); void setLoggingType(LoggingType loggingType); void setRateLimiter(SimpleRateLimiter rateLimiter); GraphDatabaseService getSystemDb(); void checkReadAllowed(String url); void checkWriteAllowed(ExportConfig exportConfig); static ApocConfig apocConfig(); Iterator<String> getKeys(String prefix); boolean containsKey(String key); String getString(String key); String getString(String key, String defaultValue); void setProperty(String key, Object value); boolean getBoolean(String key); boolean isImportFolderConfigured(); int getInt(String key, int defaultValue); static final String SUN_JAVA_COMMAND; static final String APOC_IMPORT_FILE_ENABLED; static final String APOC_EXPORT_FILE_ENABLED; static final String APOC_IMPORT_FILE_USE_NEO4J_CONFIG; static final String APOC_TTL_SCHEDULE; static final String APOC_TTL_ENABLED; static final String APOC_TTL_LIMIT; static final String APOC_TRIGGER_ENABLED; static final String APOC_UUID_ENABLED; static final String APOC_JSON_ZIP_URL; static final String APOC_JSON_SIMPLE_JSON_URL; static final String APOC_IMPORT_FILE_ALLOW__READ__FROM__FILESYSTEM; static final String APOC_CONFIG_JOBS_SCHEDULED_NUM_THREADS; static final String APOC_CONFIG_JOBS_POOL_NUM_THREADS; static final String APOC_CONFIG_JOBS_QUEUE_SIZE; static final String APOC_CONFIG_INITIALIZER; @Deprecated
    static final String APOC_CONFIG_INITIALIZER_CYPHER; }
@Test public void testDetermineNeo4jConfFolder() { System.setProperty(SUN_JAVA_COMMAND, "com.neo4j.server.enterprise.CommercialEntryPoint --home-dir=/home/stefan/neo4j-enterprise-4.0.0-alpha09mr02 --config-dir=/home/stefan/neo4j-enterprise-4.0.0-alpha09mr02/conf"); assertEquals("/home/stefan/neo4j-enterprise-4.0.0-alpha09mr02/conf", cut.determineNeo4jConfFolder()); }