PostfixTemplate (@NotNull PostfixTemplate template) { PostfixTemplateStorage saveStorage = new PostfixTemplateStorage(); saveStorage.setTemplates(PROVIDER, Collections.singletonList(template)); PostfixTemplateStorage loadStorage = PostfixTemplateStorage.getInstance(); loadStorage.loadState(saveStorage.getState()); return ContainerUtil.getFirstItem(loadStorage.getTemplates(PROVIDER)); }