### Question:
RepositoryResourceServiceImpl implements RepositoryResourceService { @Override public PageModel getPageModel(RepositoryResource page) { Integer pageId = page.getId(); PageModel model = new PageModel(); model.setPageId(pageId); Optional<RepositoryResource> projectInfoOption = this.findProjectInfo(page); if(projectInfoOption.isEmpty()) { return model; } List<AttachedWidget> widgets = getPageWidgets(projectInfoOption.get(), pageId); model.setWidgets(widgets); List<PageDataItem> pageData = getPageData(pageId); model.setData(pageData); List<PageEventHandler> functions; if(widgets.isEmpty()) { functions = Collections.emptyList(); }else { List<AttachedWidgetProperty> events = widgets.stream().flatMap(widget -> { return widget.getProperties().stream().filter(prop -> prop.getValueType().equals(WidgetPropertyValueType.FUNCTION.getKey())); }).collect(Collectors.toList()); functions = getPageFunctions(pageId, events, pageData); } model.setFunctions(functions); return model; }  @Override RepositoryResource insert(Repository repository, RepositoryResource resource); @Override List<RepositoryResource> findChildren(Repository project, Integer parentResourceId); @Override List<String> findParentPathes(Integer resourceId); @Override Optional<RepositoryResource> findByKey(
			Integer projectId, 
			Integer parentId, 
			RepositoryResourceType resourceType,
			AppType appType,
			String key); @Override Optional<RepositoryResource> findByName(
			Integer projectId, 
			Integer parentId, 
			RepositoryResourceType resourceType,
			AppType appType, 
			String name); @Override List<RepositoryResource> findAllPages(Integer projectId, AppType appType); @Override Optional<RepositoryResource> findById(Integer resourceId); @Override List<RepositoryResource> findParentGroupsByParentPath(Integer repositoryId, String parentPath); @Override List<UncommittedFile> findChanges(Repository project); @Override void stageChanges(Repository project, String[] filePathes); @Override void unstageChanges(Repository project, String[] filePathes); @Override String commit(UserInfo user, Repository project, String commitMessage); @Override void updatePageModel(Repository repository, RepositoryResource projectResource, PageModel pageModel); @Override PageModel getPageModel(RepositoryResource page); @Override PageModel createPageModelWithStdPage(Integer pageId); @Override RepositoryResource createWebProject(Repository repository, RepositoryResource project); @Override RepositoryResource createMiniProgram(
			Repository repository, 
			RepositoryResource project,
			ApiRepo apiRepo, 
			ApiWidget appWidget, 
			ApiWidget pageWidget); @Override Optional<RepositoryResource> findProject(Integer repositoryId, String projectKey);  }### Answer:
@Test public void getPageModelEmptyPage() { RepositoryResource page = new RepositoryResource(); page.setId(1); PageModel savedModel = repositoryResourceService.getPageModel(page); assertThat(savedModel.getWidgets()).isEmpty(); assertThat(savedModel.getData()).isEmpty(); assertThat(savedModel.getFunctions()).isEmpty(); }