JGitFSHooks { public static void executeFSHooks(Object fsHook, FileSystemHooks hookType, FileSystemHookExecutionContext ctx) { if(fsHook == null){ return; } if (fsHook instanceof List) { List hooks = (List) fsHook; hooks.forEach(h -> executeHook(h, hookType, ctx)); } else { executeHook(fsHook, hookType, ctx); } }  static void executeFSHooks(Object fsHook, FileSystemHooks hookType, FileSystemHookExecutionContext ctx);  }
@Test public void executeFSHooksTest() { FileSystemHookExecutionContext ctx = new FileSystemHookExecutionContext(FS_NAME); testExecuteFSHooks(ctx, FileSystemHooks.ExternalUpdate); ctx.addParam(FileSystemHooksConstants.POST_COMMIT_EXIT_CODE, EXIT_CODE); testExecuteFSHooks(ctx, FileSystemHooks.PostCommit); }