@Test
void should_DetermineDifferences_When_ComparingTasks() {

  TaskImpl oldTask = new TaskImpl();
  oldTask.setOwner("old Owner");
  oldTask.setCreator("old  Creator");
  oldTask.setId("old  ID");
  oldTask.setCreated(Instant.now().minusMillis(100));
  oldTask.setModified(Instant.now().minusMillis(100));
  oldTask.setClassificationKey("old  ClassificationKey");
  oldTask.setWorkbasketKey("old  WorkbasketKey");
  oldTask.setBusinessProcessId("old  BusinessProcessId");
  oldTask.setCallbackState(CallbackState.NONE);
  TaskImpl newTask = new TaskImpl();
  newTask.setOwner("new Owner");
  newTask.setCreator("new Creator");
  newTask.setId("old  ID");
  newTask.setCreated(Instant.now());
  newTask.setModified(Instant.now());
  newTask.setClassificationKey("new ClassificationKey");
  newTask.setWorkbasketKey("new WorkbasketKey");
  newTask.setBusinessProcessId("new BusinessProcessId");
  newTask.setCallbackState(CallbackState.CALLBACK_PROCESSING_REQUIRED);
  JSONArray changedAttributes =
      new JSONObject(ObjectAttributeChangeDetector.determineChangesInAttributes(oldTask, newTask))
          .getJSONArray("changes");
  assertThat(changedAttributes).hasSize(8);
}