@Test
public void updateByPrimaryKeySelective() 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);
  project.setName("update_projectName");
  project.setDescription("update_description");
  project.setVisibility("PROJECT_VISIBILITY_PUBLIC");
  project.setUpdateBy("project_updateBy");
  ProjectFiles projectFilesUpdate = new ProjectFiles();
  projectFilesUpdate.setFileContent("ProjectServiceTest-FileContent2");
  projectFilesUpdate.setFileName("ProjectServiceTest-FileName2");
  projectFilesUpdate.setCreateBy("ProjectServiceTest-UserName2");
  list.add(projectFilesUpdate);
  projectFiles.setFileName("update_fileName");
  projectFiles.setFileContent("update_fileContent");
  projectFiles.setUpdateBy("projectFiles_updateby");
  boolean editRet = projectService.updateByPrimaryKeySelective(project);
  assertTrue(editRet);
  List<Project> projectList = projectService.queryPageList("ProjectServiceTest-UserName",
      "create_time", "desc", 0, 100);
  assertEquals(projectList.size(), 1);
  Project projectDb = projectList.get(0);
  assertEquals(project.getName(), projectDb.getName());
  assertEquals(project.getDescription(), projectDb.getDescription());
  assertEquals(project.getVisibility(), projectDb.getVisibility());
  assertEquals(project.getUpdateBy(), projectDb.getUpdateBy());
  LOG.info("update_time:{}", projectDb.getUpdateTime());
  List<ProjectFiles> projectFilesList = projectDb.getProjectFilesList();
  for (ProjectFiles files : projectFilesList) {
    if (!files.getFileContent().equals("ProjectServiceTest-FileContent2")) {
      assertEquals(files.getFileName(), projectFiles.getFileName());
      assertEquals(files.getFileContent(), projectFiles.getFileContent());
      assertEquals(files.getUpdateBy(), projectFiles.getUpdateBy());
    }
  }
  assertEquals(projectFilesList.size(), 2);
}