@Test
void should_DetermineDifferences_When_ComparingLists() {

  List<WorkbasketAccessItemImpl> accessitems1 = new ArrayList<>();
  WorkbasketAccessItemImpl workbasketAccessItem = new WorkbasketAccessItemImpl();
  accessitems1.add(workbasketAccessItem);
  WorkbasketAccessItemImpl workbasketAccessItem2 = new WorkbasketAccessItemImpl();
  accessitems1.add(workbasketAccessItem2);
  WorkbasketAccessItemImpl workbasketAccessItem3 = new WorkbasketAccessItemImpl();
  accessitems1.add(workbasketAccessItem3);
  List<WorkbasketAccessItemImpl> accessitems2 = new ArrayList<>();
  WorkbasketAccessItemImpl workbasketAccessItem4 = new WorkbasketAccessItemImpl();
  workbasketAccessItem4.setId("WAI:1000000000000000000000000000000001");
  accessitems2.add(workbasketAccessItem4);
  WorkbasketAccessItemImpl workbasketAccessItem5 = new WorkbasketAccessItemImpl();
  workbasketAccessItem5.setId("WAI:1000000000000000000000000000000002");
  accessitems2.add(workbasketAccessItem5);
  JSONObject changedAttributes =
      new JSONObject(
              ObjectAttributeChangeDetector.determineChangesInAttributes(
                  accessitems1, accessitems2))
          .getJSONObject("changes");
  assertThat(changedAttributes.getJSONArray("newValue")).hasSize(2);
  assertThat(changedAttributes.getJSONArray("oldValue")).hasSize(3);
}