ResultMessages { void append(@NotNull List<SyncResult> results) { for (SyncResult result : results) { append(result); } } ResultMessages();   }
@Test public void testAppendResultWithNullSyncedIdentity() { SyncResult result = new DefaultSyncResultImpl(null, SyncResult.Status.NOP); messages.append(Collections.singletonList(result)); assertResultMessages(messages, "", "nop"); }
@Test public void testSyncStatusReflectedInMessage() { for (SyncResult.Status status : SyncResult.Status.values()) { SyncResult result = new DefaultSyncResultImpl(null, status); ResultMessages msgs = new ResultMessages(); msgs.append(Collections.singletonList(result)); assertResultMessages(msgs, "", extractOp(status)); } }
@Test public void testUidReflectedInMessage() { SyncResult result = new DefaultSyncResultImpl(new DefaultSyncedIdentity("id", new ExternalIdentityRef("id", "name"), false, 0), SyncResult.Status.ENABLE); ResultMessages msgs = new ResultMessages(); msgs.append(Collections.singletonList(result)); assertResultMessages(msgs, "id", extractOp(SyncResult.Status.ENABLE)); }