Static { @Procedure("apoc.static.set") @Description("apoc.static.set(name, value) - stores value under key for server lifetime storage, returns previously stored or configured value") public Stream<ObjectResult> set(@Name("key") String key, @Name("value") Object value) { Object previous = value == null ? storage.remove(key) : storage.put(key, value); return Stream.of(new ObjectResult(previous==null ? fromConfig(key) : previous)); }  @Procedure("apoc.static.get") @Deprecated @Description("apoc.static.get(name) - returns statically stored value from config (apoc.static.<key>) or server lifetime storage") Stream<ObjectResult> getProcedure(@Name("key") String key); @UserFunction("apoc.static.get") @Description("apoc.static.get(name) - returns statically stored value from config (apoc.static.<key>) or server lifetime storage") Object get(@Name("key") String key); @UserFunction("apoc.static.getAll") @Description("apoc.static.getAll(prefix) - returns statically stored values from config (apoc.static.<prefix>.*) or server lifetime storage") Map<String,Object> getAll(@Name("prefix") String prefix); @Procedure("apoc.static.list") @Description("apoc.static.list(prefix) - returns statically stored values from config (apoc.static.<prefix>.*) or server lifetime storage") Stream<KeyValueResult> list(@Name("prefix") String prefix); @Procedure("apoc.static.set") @Description("apoc.static.set(name, value) - stores value under key for server lifetime storage, returns previously stored or configured value") Stream<ObjectResult> set(@Name("key") String key, @Name("value") Object value); static void clear(); @Context
    public GraphDatabaseAPI db; @Context
    public ApocConfig apocConfig; }
@Test public void testSet() throws Exception { TestUtil.testCall(db, "call apoc.static.get('test2')", r -> assertNull(r.get("value"))); TestUtil.testCall(db, "call apoc.static.set('test2',42)", r -> assertNull(r.get("value"))); TestUtil.testCall(db, "call apoc.static.get('test2')", r -> assertEquals(42L,r.get("value"))); TestUtil.testCall(db, "call apoc.static.set('test2',null)", r -> assertEquals(42L,r.get("value"))); TestUtil.testCall(db, "call apoc.static.get('test2')", r -> assertNull(r.get("value"))); }