### Question:
AppService { @Transactional(rollbackFor = Exception.class) public App createApp(@Valid AppModel appModel) { App app = appFactory.createApp(appModel); return app; }  @Transactional(rollbackFor = Exception.class) App createApp(@Valid AppModel appModel); List<App> findAllWithAuthorize(); PageData<App> findAllWithAuthorize(Pageable pageable); PageData<App> searchByAppCodeOrAppName(String query, Pageable pageable); @Transactional App updateApp(App app); App getAppById(long appId); App getAppByCode(String appCode); EnvClusterInfo createEnvNavNode(String env, long appId); EnvClusterInfo createEnvNavNode(String env, String appCode);  }### Answer:
@Test public void createApp() { List<Department> departmentList = this.departmentRepository.findAll(); Assert.assertTrue(!ObjectUtils.isEmpty(departmentList)); List<User> allUser = userRepository.findAll(); Assert.assertTrue(!ObjectUtils.isEmpty(allUser)); App app = App.builder().name("测试项目").appCode("test-app").appOwner(allUser.get(0)).department(departmentList.get(0)).build(); }