changed.setId(resource.getId());
changed.setName("otherName");
changed.setTypeId(resource.getTypeId());
changed.setSchedule(resource.getSchedule());
changed.addProperty(TaskScheduleUtil.newProperty("repositoryId", getTestRepositoryId()));
changed.addProperty(TaskScheduleUtil.newProperty("time", String.valueOf(10)));
Status status = TaskScheduleUtil.update(changed);
assertThat("Should not have been able to update task with state " + resource.getStatus() + ", "
+ status.getDescription(), status, isClientError());