* @author Danny Gräf
*/
public class OperationLogTaskServiceAndBeanTest extends PluggableProcessEngineTestCase {
public void testBeanPropertyChanges() {
TaskEntity entity = new TaskEntity();
// assign and validate changes
entity.setAssignee("icke");
Map<String, PropertyChange> changes = entity.getPropertyChanges();
assertEquals(1, changes.size());
assertNull(changes.get(ASSIGNEE).getOrgValue());
assertEquals("icke", changes.get(ASSIGNEE).getNewValue());
// assign it again
entity.setAssignee("er");
changes = entity.getPropertyChanges();
assertEquals(1, changes.size());
// original value is still null because the task was not saved
assertNull(changes.get(ASSIGNEE).getOrgValue());
assertEquals("er", changes.get(ASSIGNEE).getNewValue());
// set a due date
entity.setDueDate(new Date());
changes = entity.getPropertyChanges();
assertEquals(2, changes.size());
}