### Question:
VideoUtil { @Nullable public static Address getActorFromPersonId(UUID placeId, @Nullable UUID personId) { if(personId == null) { return null; } if(IrisUUID.isTime(personId)) { return Address.platformService(personId, AlarmIncidentCapability.NAMESPACE); } else if(personId.getMostSignificantBits() == 0) { return Address.platformService(placeId, RuleCapability.NAMESPACE, (int) personId.getLeastSignificantBits()); } else if(personId.getMostSignificantBits() == 1) { return Address.platformService(placeId, SceneCapability.NAMESPACE, (int) personId.getLeastSignificantBits()); } else { return Address.platformService(personId, PersonCapability.NAMESPACE); } } private  VideoUtil(); @Nullable static Address getActorFromPersonId(UUID placeId, @Nullable UUID personId); static UUID timeUUIDForRecording(); static UUID timeUUIDForStream(); static boolean isStreamUUID(UUID uuid); static String getHlsUri(String videoStreamUrl, UUID recordingId, String exp, String sig); static String getJpgUri(String videoStreamUrl, UUID recordingId, String exp, String sig); static String getMp4Uri(String videoDownloadUrl, UUID recordingId, String exp, String sig); static long getQuotaForPlace(Place plc, long premiumQuota); static Date getPurgeTimestamp(long delay, TimeUnit unit); static Date getPurgeTimestamp(long startTime, long delay, TimeUnit unit); static String generateRecordUsername(SecretKeySpec secret, UUID cameraId, UUID accountId, UUID placeId); static String generateRecordPassword(SecretKeySpec secret, UUID cameraId, UUID accountId, UUID placeId, UUID personId, UUID recordingId); static String generateAccessExpiration(long expTime); static String generateAccessSignature(SecretKeySpec secret, UUID recordingId, long expTime); static boolean verifyAccessSignature(SecretKeySpec secret, UUID recordingId, String expirationTime, String sig); static Date getExpirationTs(QueryStringDecoder decoder); static boolean isFavorited(Map<String,Object> recording); static boolean isFavoritedTag(String prefix, String tag); static VideoRecording recMaterializeRecording(ResultSet results, UUID recId); static ByteBuffer toblob(String value); static ByteBuffer toblob(UUID value); static ByteBuffer toblob(int value); static ByteBuffer toblob(long value); static ByteBuffer toblob(Date value); static ByteBuffer toblob(double value); static String tostr(ByteBuffer value); static UUID touuid(ByteBuffer value); static int toint(ByteBuffer value); static long tolong(ByteBuffer value); static double todouble(ByteBuffer value); static Date toDate(ByteBuffer value); static ByteBuffer toblob(Enum<?> e); static T toenum(ByteBuffer value, Class<T> clazz); static void recUpdateRecording(ResultSet results, VideoRecording recording); @SuppressWarnings("unchecked") static Iterator<UUID> intersection(Iterator<UUID>... iterators); @SuppressWarnings("unchecked") static Iterator<UUID> union(Iterator<UUID>... iterators); static Iterator<Row> difference(Iterator<Row> delegate, Iterator<Row> subtract); static final String TAG_BACKFILLED; static final String TAG_V2; static final Address SERVICE_ADDRESS; }### Answer:
@Test public void testActor() { assertEquals(null, VideoUtil.getActorFromPersonId(placeId, null)); assertEquals(ruleAddress, VideoUtil.getActorFromPersonId(placeId, new UUID(0, ruleAddress.getContextQualifier()))); assertEquals(sceneAddress, VideoUtil.getActorFromPersonId(placeId, new UUID(1, sceneAddress.getContextQualifier()))); assertEquals(incidentAddress, VideoUtil.getActorFromPersonId(placeId, (UUID) incidentAddress.getId())); assertEquals(personAddress, VideoUtil.getActorFromPersonId(placeId, (UUID) personAddress.getId())); }