@Autowired
private ProjectHistoryService projectHistoryService;
@Test
public void testCreateProjectHistroy() {
Project project = projectService.getProject("admin");
Assert.assertNotNull(project);
//
ProjectUser user = projectUserService.getProjectUser("admin");
Assert.assertNotNull(user);
//
ProjectHistory history = new ProjectHistory();
history.setContent("This is project history!");
history.setCreatedAt(new Date());
history.setCreatedById(user.getId());
history.setTargetType("project");
history.setTargetId(1);
history.setParentId(1);
history.setProjectId(project.getId());
//
projectHistoryService.createProjectHistory(history);
}