@Test public void can_extract_editor_uuid_from_decrypted_group_change() { UUID uuid = UUID.randomUUID(); ByteString editor = UuidUtil.toByteString(uuid); DecryptedGroupChange groupChange = DecryptedGroupChange.newBuilder() .setEditor(editor) .build(); UUID parsed = DecryptedGroupUtil.editorUuid(groupChange).get(); assertEquals(uuid, parsed); }
public static Optional<UUID> editorUuid(DecryptedGroupChange change) { return Optional.fromNullable(change != null ? UuidUtil.fromByteStringOrNull(change.getEditor()) : null); }
DecryptedGroupUtil { public static Optional<UUID> editorUuid(DecryptedGroupChange change) { return Optional.fromNullable(change != null ? UuidUtil.fromByteStringOrNull(change.getEditor()) : null); } }
DecryptedGroupUtil { public static Optional<UUID> editorUuid(DecryptedGroupChange change) { return Optional.fromNullable(change != null ? UuidUtil.fromByteStringOrNull(change.getEditor()) : null); }  }
DecryptedGroupUtil { public static Optional<UUID> editorUuid(DecryptedGroupChange change) { return Optional.fromNullable(change != null ? UuidUtil.fromByteStringOrNull(change.getEditor()) : null); }  static ArrayList<UUID> toUuidList(Collection<DecryptedMember> membersList); static ArrayList<UUID> membersToUuidList(Collection<DecryptedMember> membersList); static Set<ByteString> membersToUuidByteStringSet(Collection<DecryptedMember> membersList); static ArrayList<UUID> pendingToUuidList(Collection<DecryptedPendingMember> membersList); static ArrayList<UUID> removedMembersUuidList(DecryptedGroupChange groupChange); static ArrayList<UUID> removedPendingMembersUuidList(DecryptedGroupChange groupChange); static ArrayList<UUID> removedRequestingMembersUuidList(DecryptedGroupChange groupChange); static UUID toUuid(DecryptedMember member); static UUID toUuid(DecryptedPendingMember member); static Optional<UUID> editorUuid(DecryptedGroupChange change); static Optional<DecryptedMember> findMemberByUuid(Collection<DecryptedMember> members, UUID uuid); static Optional<DecryptedPendingMember> findPendingByUuid(Collection<DecryptedPendingMember> members, UUID uuid); static Optional<DecryptedRequestingMember> findRequestingByUuid(Collection<DecryptedRequestingMember> members, UUID uuid); static boolean isPendingOrRequesting(DecryptedGroup group, UUID uuid); static DecryptedGroup removeMember(DecryptedGroup group, UUID uuid, int revision); static DecryptedGroup apply(DecryptedGroup group, DecryptedGroupChange change); static DecryptedGroup applyWithoutRevisionCheck(DecryptedGroup group, DecryptedGroupChange change); static Optional<UUID> findInviter(List<DecryptedPendingMember> pendingMembersList, UUID uuid); static boolean changeIsEmpty(DecryptedGroupChange change); static boolean changeIsEmptyExceptForProfileKeyChanges(DecryptedGroupChange change); }
DecryptedGroupUtil { public static Optional<UUID> editorUuid(DecryptedGroupChange change) { return Optional.fromNullable(change != null ? UuidUtil.fromByteStringOrNull(change.getEditor()) : null); }  static ArrayList<UUID> toUuidList(Collection<DecryptedMember> membersList); static ArrayList<UUID> membersToUuidList(Collection<DecryptedMember> membersList); static Set<ByteString> membersToUuidByteStringSet(Collection<DecryptedMember> membersList); static ArrayList<UUID> pendingToUuidList(Collection<DecryptedPendingMember> membersList); static ArrayList<UUID> removedMembersUuidList(DecryptedGroupChange groupChange); static ArrayList<UUID> removedPendingMembersUuidList(DecryptedGroupChange groupChange); static ArrayList<UUID> removedRequestingMembersUuidList(DecryptedGroupChange groupChange); static UUID toUuid(DecryptedMember member); static UUID toUuid(DecryptedPendingMember member); static Optional<UUID> editorUuid(DecryptedGroupChange change); static Optional<DecryptedMember> findMemberByUuid(Collection<DecryptedMember> members, UUID uuid); static Optional<DecryptedPendingMember> findPendingByUuid(Collection<DecryptedPendingMember> members, UUID uuid); static Optional<DecryptedRequestingMember> findRequestingByUuid(Collection<DecryptedRequestingMember> members, UUID uuid); static boolean isPendingOrRequesting(DecryptedGroup group, UUID uuid); static DecryptedGroup removeMember(DecryptedGroup group, UUID uuid, int revision); static DecryptedGroup apply(DecryptedGroup group, DecryptedGroupChange change); static DecryptedGroup applyWithoutRevisionCheck(DecryptedGroup group, DecryptedGroupChange change); static Optional<UUID> findInviter(List<DecryptedPendingMember> pendingMembersList, UUID uuid); static boolean changeIsEmpty(DecryptedGroupChange change); static boolean changeIsEmptyExceptForProfileKeyChanges(DecryptedGroupChange change);  }