@Test
public void testItemTypeReference() {

	IdmScheduledTaskDto d = getHelper().createSchedulableTask();
	IdmLongRunningTaskDto lrt = this.createLongRunningTask(d);
	IdmProcessedTaskItemDto item = getHelper().prepareProcessedItem(lrt);
	//
	try {
		item.setScheduledTaskQueueOwner(d.getId());
		service.get(service.saveInternal(item).getId());
		fail("Both log and queue association is forbidden.");
	} catch (CoreException e) {
		assertNotNull(e.getMessage());
	}
	//
	try {
		item.setScheduledTaskQueueOwner(null);
		item.setLongRunningTask(null);
		service.get(service.saveInternal(item).getId());
		fail("Empty log and queue association is forbidden.");
	} catch (CoreException e) {
		assertNotNull(e.getMessage());
	}
}