@Test
public void testUpdatePermission() throws Exception {

  createThreeProjects();
  final Project project = this.loader.fetchProjectByName("mytestProject");
  this.loader.updatePermission(project, project.getLastModifiedUser(),
      new Permission(Permission.Type.ADMIN), false);
  final Project sameProject = this.loader.fetchProjectByName("mytestProject");
  Assert.assertEquals(sameProject.getUserPermissions().size(), 1);
  Assert.assertEquals(sameProject.getUserPermissions().get(0).getFirst(), "testUser1");
  Assert.assertEquals(sameProject.getUserPermissions().get(0).getSecond().toString(), "ADMIN");
}