@Test
public void testImmutable() {

	IdmScheduledTaskDto d = getHelper().createSchedulableTask();
	IdmLongRunningTaskDto lrt = this.createLongRunningTask(d);
	IdmProcessedTaskItemDto item = getHelper().prepareProcessedItem(lrt);
	IdmProcessedTaskItemDto saved = service.get(service.saveInternal(item).getId());
	// set fields to new value
	saved.setReferencedDtoType(IdmIdentityContractDto.class.getCanonicalName());
	saved.setReferencedEntityId(UUID.randomUUID());
	saved.setLongRunningTask(this.createLongRunningTask(d).getId());
	//
	IdmProcessedTaskItemDto retrieved = service.get(service.saveInternal(saved).getId());
	// fields must not update
	assertEquals(item.getLongRunningTask(), retrieved.getLongRunningTask());
	assertEquals(item.getReferencedDtoType(), retrieved.getReferencedDtoType());
	assertEquals(item.getReferencedEntityId(), retrieved.getReferencedEntityId());
	//
	assertNotEquals(item.getLongRunningTask(), saved.getLongRunningTask());
	assertNotEquals(item.getReferencedDtoType(), saved.getReferencedDtoType());
	assertNotEquals(item.getReferencedEntityId(), saved.getReferencedEntityId());
}