@Test
public void queryPageList() throws Exception {

  ProjectFiles projectFiles = new ProjectFiles();
  projectFiles.setFileContent("ProjectServiceTest-FileContent");
  projectFiles.setFileName("ProjectServiceTest-FileName");
  projectFiles.setCreateBy("ProjectServiceTest-UserName");
  Project project = new Project();
  project.setDescription("ProjectServiceTest-Description");
  project.setName("ProjectServiceTest-ProjectName");
  project.setType("PROJECT_TYPE_NOTEBOOK");
  project.setUserName("ProjectServiceTest-UserName");
  project.setVisibility("PROJECT_VISIBILITY_PRIVATE");
  project.setCreateBy("ProjectServiceTest-UserName");
  List list = new ArrayList<ProjectFiles>();
  list.add(projectFiles);
  project.setProjectFilesList(list);
  Boolean ret = projectService.add(project);
  assertTrue(ret);
  List<Project> projectList = projectService.queryPageList("ProjectServiceTest-UserName",
      "create_time", "desc", 0, 100);
  assertEquals(projectList.size(), 1);
  Project projectDb = projectList.get(0);
  assertEquals(project.getDescription(), projectDb.getDescription());
  assertEquals(project.getName(), projectDb.getName());
  assertEquals(project.getType(), projectDb.getType());
  assertEquals(project.getUserName(), projectDb.getUserName());
  assertEquals(project.getVisibility(), projectDb.getVisibility());
  assertEquals(project.getCreateBy(), projectDb.getCreateBy());
  assertEquals(projectDb.getProjectFilesList().size(), 1);
  ProjectFiles projectFilesDb = projectDb.getProjectFilesList().get(0);
  assertEquals(project.getId(), projectFilesDb.getProjectId());
  assertEquals(projectFiles.getFileContent(), projectFilesDb.getFileContent());
  assertEquals(projectFiles.getFileName(), projectFilesDb.getFileName());
  assertEquals(projectFiles.getCreateBy(), projectFilesDb.getCreateBy());
}