@Test public void getAttributeHistoryDifferentNamedUser() { when(mockNamedUser.getId()).thenReturn("foo"); clock.currentTimeMillis = 100; AttributeMutation fooMutation = AttributeMutation.newSetAttributeMutation("foo attribute", JsonValue.wrapOpt("some value"), 100); namedUserAttributeListener.onAttributeMutationsUploaded("foo", Collections.singletonList(fooMutation)); AttributeMutation barMutation = AttributeMutation.newSetAttributeMutation("bar attribute", JsonValue.wrapOpt("some value"), 100); namedUserAttributeListener.onAttributeMutationsUploaded("bar", Collections.singletonList(barMutation)); assertEquals(Collections.singletonList(fooMutation), historian.getAttributeHistory(0)); }
@NonNull public List<AttributeMutation> getAttributeHistory(long sinceDate) { synchronized (attributeRecords) { return filterHistory(attributeRecords, sinceDate); } }
AudienceHistorian { @NonNull public List<AttributeMutation> getAttributeHistory(long sinceDate) { synchronized (attributeRecords) { return filterHistory(attributeRecords, sinceDate); } } }
AudienceHistorian { @NonNull public List<AttributeMutation> getAttributeHistory(long sinceDate) { synchronized (attributeRecords) { return filterHistory(attributeRecords, sinceDate); } } AudienceHistorian(@NonNull AirshipChannel channel, @NonNull NamedUser namedUser, @NonNull Clock clock); }
AudienceHistorian { @NonNull public List<AttributeMutation> getAttributeHistory(long sinceDate) { synchronized (attributeRecords) { return filterHistory(attributeRecords, sinceDate); } } AudienceHistorian(@NonNull AirshipChannel channel, @NonNull NamedUser namedUser, @NonNull Clock clock); @NonNull List<TagGroupsMutation> getTagGroupHistory(long sinceDate); @NonNull List<AttributeMutation> getAttributeHistory(long sinceDate); }
AudienceHistorian { @NonNull public List<AttributeMutation> getAttributeHistory(long sinceDate) { synchronized (attributeRecords) { return filterHistory(attributeRecords, sinceDate); } } AudienceHistorian(@NonNull AirshipChannel channel, @NonNull NamedUser namedUser, @NonNull Clock clock); @NonNull List<TagGroupsMutation> getTagGroupHistory(long sinceDate); @NonNull List<AttributeMutation> getAttributeHistory(long sinceDate);  }