@Test
void should_DetermineDifferences_When_ComparingEmptyWorkbasketWithNonEmptyWorkbasket() {

  Instant created = Instant.now();
  WorkbasketImpl oldWorkbasket = new WorkbasketImpl();
  WorkbasketImpl newWorkbasket = new WorkbasketImpl();
  newWorkbasket.setId("newWbId");
  newWorkbasket.setKey("newWbKey");
  newWorkbasket.setDomain("newWbDomain");
  newWorkbasket.setName("newWb");
  newWorkbasket.setCreated(created.minus(10, ChronoUnit.SECONDS));
  newWorkbasket.setModified(created.minus(2, ChronoUnit.SECONDS));
  newWorkbasket.setType(WorkbasketType.PERSONAL);
  newWorkbasket.setOrgLevel1("nworgLevel1");
  newWorkbasket.setCustom1("nwcustom1");
  newWorkbasket.setOrgLevel2("nworgLevel2");
  newWorkbasket.setCustom2("nwcustom2");
  newWorkbasket.setOrgLevel3("nworgLevel3");
  newWorkbasket.setCustom3("nwcustom3");
  newWorkbasket.setOrgLevel4("nworgLevel4");
  newWorkbasket.setCustom4("nwcustom4");
  JSONArray changedAttributes =
      new JSONObject(
              ObjectAttributeChangeDetector.determineChangesInAttributes(
                  oldWorkbasket, newWorkbasket))
          .getJSONArray("changes");
  assertThat(changedAttributes).hasSize(15);
  changedAttributes =
      new JSONObject(
              ObjectAttributeChangeDetector.determineChangesInAttributes(
                  newWorkbasket, oldWorkbasket))
          .getJSONArray("changes");
  assertThat(changedAttributes).hasSize(15);
}