ProjectService { public ValidatorChain validatePermision(LoginUser user, Project project, Errors errors) throws SQLException { return validatePermision(user.getId(), project.getDal_group_id(), errors); }  ValidatorChain validatePermision(LoginUser user, Project project, Errors errors); ServiceResult<String> insertProject(Project project); ServiceResult<String> updateProject(Project project); ServiceResult deleteCheck(Long projectId); ServiceResult<String> deleteProject(Project project); ListResult<ProjectView> findProjectPageList(Paging<ProjectModel> paging); boolean isExistByAppId(String appid); boolean isNotExistByAppId(Project project); boolean isNotExistByName(Project project); ServiceResult generateProjectXml(LoginUser user, Long projectId, String codeGenFilePath); ServiceResult<String> addDataCenter(LoginUser user, Project project); ServiceResult<String> updateDataCenter(LoginUser user, Project oldProject, ProjectView oldProjectView, Project newProject); ServiceResult<String> deleteDataCenter(LoginUser user, Project projec); ServiceResult<String> syncProject(LoginUser user, Project project); ConfigCkeckResult<List<ConfigDataResponse>> getCheckData(LoginUser user, Project project); ServiceResult getProjectButton(LoginUser user);  }
@Test public void validatePermision() throws SQLException { ValidatorChain chain = new ValidatorChain(); LoginUser user = LoginUser.builder().id(1L).build(); Project project = Project.builder().id(1L).name("name").build(); Errors errors = new BeanPropertyBindingResult(project, "project", true, 256); Assert.assertTrue(projectService.validatePermision(user, project, errors).validate().isValid()); }