@Test
public void shouldCopyDataSharingAttributesFromProvidedObject() {
Date currentUpdatedOn = new Date();
currentUpdatedOn.setTime(currentUpdatedOn.getTime() - 10000);
DataSharingSettings current = new DataSharingSettings(false, "default", currentUpdatedOn);
DataSharingSettings latest = new DataSharingSettings(true, "Bob", new Date());
assertThat(current.allowSharing(), is(not(latest.allowSharing())));
assertThat(current.updatedBy(), is(not(latest.updatedBy())));
assertThat(current.updatedOn().getTime(), is(not(latest.updatedOn().getTime())));
current.copyFrom(latest);
assertThat(current.allowSharing(), is(latest.allowSharing()));
assertThat(current.updatedBy(), is(latest.updatedBy()));
assertThat(current.updatedOn().getTime(), is(latest.updatedOn().getTime()));
}