Search in sources :

Example 1 with Notification

use of com.yahoo.athenz.common.server.notification.Notification in project athenz by yahoo.

the class RoleMemberNotificationCommonTest method testReviewGetNotificationDetailsFilterTag.

@Test
public void testReviewGetNotificationDetailsFilterTag() {
    DBService dbsvc = Mockito.mock(DBService.class);
    Role adminRole = new Role().setName("athenz1:role.admin").setRoleMembers(Arrays.asList(new RoleMember().setMemberName("user.testadmin")));
    Mockito.when(dbsvc.getRolesByDomain(eq("athenz1"))).thenReturn(Arrays.asList(adminRole));
    RoleMemberNotificationCommon roleMemberNotificationCommon = new RoleMemberNotificationCommon(dbsvc, USER_DOMAIN_PREFIX);
    NotificationToEmailConverterCommon notificationToEmailConverterCommon = new NotificationToEmailConverterCommon(null);
    DomainRoleMember roleMember = new DomainRoleMember();
    roleMember.setMemberName("user.joe");
    Map<String, DomainRoleMember> members = new HashMap<>();
    members.put("user.joe", roleMember);
    final Timestamp expirationTs = Timestamp.fromMillis(100);
    final Timestamp reviewTs = Timestamp.fromMillis(50);
    List<MemberRole> memberRoles = new ArrayList<>();
    memberRoles.add(new MemberRole().setRoleName("role1").setDomainName("athenz1").setMemberName("user.joe").setExpiration(expirationTs).setReviewReminder(reviewTs));
    roleMember.setMemberRoles(memberRoles);
    // Verify disable notification for users
    List<Notification> notification = roleMemberNotificationCommon.getNotificationDetails(members, new RoleMemberReviewNotificationTask.RoleReviewPrincipalNotificationToEmailConverter(notificationToEmailConverterCommon), new RoleMemberReviewNotificationTask.RoleReviewDomainNotificationToEmailConverter(notificationToEmailConverterCommon), new RoleMemberReviewNotificationTask.ReviewRoleMemberDetailStringer(), new RoleMemberReviewNotificationTask.RoleReviewPrincipalNotificationToMetricConverter(), new RoleMemberReviewNotificationTask.RoleReviewDomainNotificationToMetricConverter(), memberRole -> DisableNotificationEnum.getEnumSet(1));
    assertEquals(1, notification.size());
    assertEquals(2, notification.get(0).getDetails().size());
    assertEquals(notification.get(0).getDetails().get(NOTIFICATION_DETAILS_MEMBERS_LIST), "user.joe;role1;" + reviewTs);
    assertEquals(notification.get(0).getDetails().get(NOTIFICATION_DETAILS_DOMAIN), "athenz1");
    // Verify disable notification for admins
    notification = roleMemberNotificationCommon.getNotificationDetails(members, new RoleMemberReviewNotificationTask.RoleReviewPrincipalNotificationToEmailConverter(notificationToEmailConverterCommon), new RoleMemberReviewNotificationTask.RoleReviewDomainNotificationToEmailConverter(notificationToEmailConverterCommon), new RoleMemberReviewNotificationTask.ReviewRoleMemberDetailStringer(), new RoleMemberReviewNotificationTask.RoleReviewPrincipalNotificationToMetricConverter(), new RoleMemberReviewNotificationTask.RoleReviewDomainNotificationToMetricConverter(), memberRole -> DisableNotificationEnum.getEnumSet(2));
    assertEquals(1, notification.size());
    assertEquals(2, notification.get(0).getDetails().size());
    assertEquals(notification.get(0).getDetails().get(NOTIFICATION_DETAILS_ROLES_LIST), "athenz1;role1;" + reviewTs);
    assertEquals(notification.get(0).getDetails().get(NOTIFICATION_DETAILS_MEMBER), "user.joe");
    // Verify disable all notifications
    notification = roleMemberNotificationCommon.getNotificationDetails(members, new RoleMemberReviewNotificationTask.RoleReviewPrincipalNotificationToEmailConverter(notificationToEmailConverterCommon), new RoleMemberReviewNotificationTask.RoleReviewDomainNotificationToEmailConverter(notificationToEmailConverterCommon), new RoleMemberReviewNotificationTask.ReviewRoleMemberDetailStringer(), new RoleMemberReviewNotificationTask.RoleReviewPrincipalNotificationToMetricConverter(), new RoleMemberReviewNotificationTask.RoleReviewDomainNotificationToMetricConverter(), memberRole -> DisableNotificationEnum.getEnumSet(3));
    assertEquals(0, notification.size());
}
Also used : Notification(com.yahoo.athenz.common.server.notification.Notification) Mockito(org.mockito.Mockito) java.util(java.util) Timestamp(com.yahoo.rdl.Timestamp) NotificationServiceConstants(com.yahoo.athenz.common.server.notification.NotificationServiceConstants) com.yahoo.athenz.zms(com.yahoo.athenz.zms) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) Test(org.testng.annotations.Test) NotificationToEmailConverterCommon(com.yahoo.athenz.common.server.notification.NotificationToEmailConverterCommon) AssertJUnit.assertEquals(org.testng.AssertJUnit.assertEquals) AssertJUnit.assertTrue(org.testng.AssertJUnit.assertTrue) USER_DOMAIN_PREFIX(com.yahoo.athenz.common.ServerCommonConsts.USER_DOMAIN_PREFIX) Timestamp(com.yahoo.rdl.Timestamp) Notification(com.yahoo.athenz.common.server.notification.Notification) NotificationToEmailConverterCommon(com.yahoo.athenz.common.server.notification.NotificationToEmailConverterCommon) Test(org.testng.annotations.Test)

Example 2 with Notification

use of com.yahoo.athenz.common.server.notification.Notification in project athenz by yahoo.

the class RoleMemberNotificationCommonTest method testReviewPrincipalGetNotificationDetails.

@Test
public void testReviewPrincipalGetNotificationDetails() {
    DBService dbsvc = Mockito.mock(DBService.class);
    Role adminRole = new Role().setName("athenz1:role.admin").setRoleMembers(Arrays.asList(new RoleMember().setMemberName("user.testadmin")));
    Mockito.when(dbsvc.getRolesByDomain(eq("athenz1"))).thenReturn(Arrays.asList(adminRole));
    RoleMemberNotificationCommon roleMemberNotificationCommon = new RoleMemberNotificationCommon(dbsvc, USER_DOMAIN_PREFIX);
    NotificationToEmailConverterCommon notificationToEmailConverterCommon = new NotificationToEmailConverterCommon(null);
    // Verify no notification for member without member roles
    DomainRoleMember roleMember = new DomainRoleMember();
    roleMember.setMemberName("user.joe");
    Map<String, DomainRoleMember> members = new HashMap<>();
    members.put("user.joe", roleMember);
    List<Notification> notification = roleMemberNotificationCommon.getNotificationDetails(members, new RoleMemberReviewNotificationTask.RoleReviewPrincipalNotificationToEmailConverter(notificationToEmailConverterCommon), new RoleMemberReviewNotificationTask.RoleReviewDomainNotificationToEmailConverter(notificationToEmailConverterCommon), new RoleMemberReviewNotificationTask.ReviewRoleMemberDetailStringer(), new RoleMemberReviewNotificationTask.RoleReviewPrincipalNotificationToMetricConverter(), new RoleMemberReviewNotificationTask.RoleReviewDomainNotificationToMetricConverter(), memberRole -> DisableNotificationEnum.getEnumSet(0));
    assertEquals(0, notification.size());
    // Verify the same result when setting the memberRoles to an empty collection
    roleMember.setMemberRoles(Collections.emptyList());
    notification = roleMemberNotificationCommon.getNotificationDetails(members, new RoleMemberReviewNotificationTask.RoleReviewPrincipalNotificationToEmailConverter(notificationToEmailConverterCommon), new RoleMemberReviewNotificationTask.RoleReviewDomainNotificationToEmailConverter(notificationToEmailConverterCommon), new RoleMemberReviewNotificationTask.ReviewRoleMemberDetailStringer(), new RoleMemberReviewNotificationTask.RoleReviewPrincipalNotificationToMetricConverter(), new RoleMemberReviewNotificationTask.RoleReviewDomainNotificationToMetricConverter(), memberRole -> DisableNotificationEnum.getEnumSet(0));
    assertEquals(0, notification.size());
    final Timestamp expirationTs = Timestamp.fromMillis(100);
    final Timestamp reviewTs = Timestamp.fromMillis(50);
    List<MemberRole> memberRoles = new ArrayList<>();
    memberRoles.add(new MemberRole().setRoleName("role1").setDomainName("athenz1").setMemberName("user.joe").setExpiration(expirationTs).setReviewReminder(reviewTs));
    roleMember.setMemberRoles(memberRoles);
    notification = roleMemberNotificationCommon.getNotificationDetails(members, new RoleMemberReviewNotificationTask.RoleReviewPrincipalNotificationToEmailConverter(notificationToEmailConverterCommon), new RoleMemberReviewNotificationTask.RoleReviewDomainNotificationToEmailConverter(notificationToEmailConverterCommon), new RoleMemberReviewNotificationTask.ReviewRoleMemberDetailStringer(), new RoleMemberReviewNotificationTask.RoleReviewPrincipalNotificationToMetricConverter(), new RoleMemberReviewNotificationTask.RoleReviewDomainNotificationToMetricConverter(), memberRole -> DisableNotificationEnum.getEnumSet(0));
    assertEquals(2, notification.size());
    assertEquals(2, notification.get(0).getDetails().size());
    assertEquals(2, notification.get(1).getDetails().size());
    assertEquals(notification.get(0).getDetails().get(NOTIFICATION_DETAILS_ROLES_LIST), "athenz1;role1;" + reviewTs);
    assertEquals(notification.get(0).getDetails().get(NOTIFICATION_DETAILS_MEMBER), "user.joe");
    assertEquals(notification.get(1).getDetails().get(NOTIFICATION_DETAILS_MEMBERS_LIST), "user.joe;role1;" + reviewTs);
    assertEquals(notification.get(1).getDetails().get(NOTIFICATION_DETAILS_DOMAIN), "athenz1");
    memberRoles.add(new MemberRole().setRoleName("role1").setDomainName("athenz2").setMemberName("user.joe").setExpiration(expirationTs).setReviewReminder(reviewTs));
    memberRoles.add(new MemberRole().setRoleName("role2").setDomainName("athenz2").setMemberName("user.joe").setExpiration(expirationTs).setReviewReminder(reviewTs));
    notification = roleMemberNotificationCommon.getNotificationDetails(members, new RoleMemberReviewNotificationTask.RoleReviewPrincipalNotificationToEmailConverter(notificationToEmailConverterCommon), new RoleMemberReviewNotificationTask.RoleReviewDomainNotificationToEmailConverter(notificationToEmailConverterCommon), new RoleMemberReviewNotificationTask.ReviewRoleMemberDetailStringer(), new RoleMemberReviewNotificationTask.RoleReviewPrincipalNotificationToMetricConverter(), new RoleMemberReviewNotificationTask.RoleReviewDomainNotificationToMetricConverter(), memberRole -> DisableNotificationEnum.getEnumSet(0));
    assertEquals(2, notification.size());
    assertEquals(2, notification.get(0).getDetails().size());
    String expectedRolesList = "athenz1;role1;" + reviewTs + "|athenz2;role1;" + reviewTs + "|athenz2;role2;" + reviewTs;
    assertEquals(expectedRolesList, notification.get(0).getDetails().get(NOTIFICATION_DETAILS_ROLES_LIST));
    assertEquals(notification.get(0).getDetails().get(NOTIFICATION_DETAILS_MEMBER), "user.joe");
    assertEquals(expectedRolesList, notification.get(0).getDetails().get(NOTIFICATION_DETAILS_ROLES_LIST));
    assertEquals(notification.get(1).getDetails().get(NOTIFICATION_DETAILS_MEMBERS_LIST), "user.joe;role1;" + reviewTs);
    assertEquals(notification.get(1).getDetails().get(NOTIFICATION_DETAILS_DOMAIN), "athenz1");
}
Also used : Notification(com.yahoo.athenz.common.server.notification.Notification) Mockito(org.mockito.Mockito) java.util(java.util) Timestamp(com.yahoo.rdl.Timestamp) NotificationServiceConstants(com.yahoo.athenz.common.server.notification.NotificationServiceConstants) com.yahoo.athenz.zms(com.yahoo.athenz.zms) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) Test(org.testng.annotations.Test) NotificationToEmailConverterCommon(com.yahoo.athenz.common.server.notification.NotificationToEmailConverterCommon) AssertJUnit.assertEquals(org.testng.AssertJUnit.assertEquals) AssertJUnit.assertTrue(org.testng.AssertJUnit.assertTrue) USER_DOMAIN_PREFIX(com.yahoo.athenz.common.ServerCommonConsts.USER_DOMAIN_PREFIX) Timestamp(com.yahoo.rdl.Timestamp) Notification(com.yahoo.athenz.common.server.notification.Notification) NotificationToEmailConverterCommon(com.yahoo.athenz.common.server.notification.NotificationToEmailConverterCommon) Test(org.testng.annotations.Test)

Example 3 with Notification

use of com.yahoo.athenz.common.server.notification.Notification in project athenz by yahoo.

the class ZMSNotificationsTest method testDisableAllGroupExpiryNotification.

@Test
public void testDisableAllGroupExpiryNotification() {
    TopLevelDomain dom1 = zmsTestInitializer.createTopLevelDomainObject("test-domain1", "Test Domain1", "testOrg", zmsTestInitializer.getAdminUser());
    zmsTestInitializer.getZms().postTopLevelDomain(zmsTestInitializer.getMockDomRsrcCtx(), zmsTestInitializer.getAuditRef(), dom1);
    try {
        long currentTimeMillis = System.currentTimeMillis();
        List<GroupMember> groupMembers = generateGroupMembers(currentTimeMillis);
        Group group1 = zmsTestInitializer.createGroupObject("test-domain1", "Group1", groupMembers);
        // Now disable all notifications
        Map<String, TagValueList> disableUserTags = new HashMap<>();
        disableUserTags.put("zms.DisableReminderNotifications", new TagValueList().setList(Arrays.asList("3")));
        group1.setTags(disableUserTags);
        zmsTestInitializer.getZms().putGroup(zmsTestInitializer.getMockDomRsrcCtx(), "test-domain1", "Group1", zmsTestInitializer.getAuditRef(), group1);
        GroupMemberExpiryNotificationTask groupMemberExpiryNotificationTask = new GroupMemberExpiryNotificationTask(zmsTestInitializer.getZms().dbService, zmsTestInitializer.getZms().userDomainPrefix, zmsTestInitializer.getZms().notificationToEmailConverterCommon);
        List<Notification> notifications = groupMemberExpiryNotificationTask.getNotifications();
        assertEquals(notifications.size(), 0, "notificationRecipients: " + notificationsToRecipientString(notifications));
    } finally {
        zmsTestInitializer.getZms().deleteTopLevelDomain(zmsTestInitializer.getMockDomRsrcCtx(), "test-domain1", zmsTestInitializer.getAuditRef());
    }
}
Also used : GroupMemberExpiryNotificationTask(com.yahoo.athenz.zms.notification.GroupMemberExpiryNotificationTask) Notification(com.yahoo.athenz.common.server.notification.Notification)

Example 4 with Notification

use of com.yahoo.athenz.common.server.notification.Notification in project athenz by yahoo.

the class ZMSNotificationsTest method testRoleExpiryNotification.

@Test
public void testRoleExpiryNotification() {
    TopLevelDomain dom1 = zmsTestInitializer.createTopLevelDomainObject("test-domain1", "Test Domain1", "testOrg", zmsTestInitializer.getAdminUser());
    zmsTestInitializer.getZms().postTopLevelDomain(zmsTestInitializer.getMockDomRsrcCtx(), zmsTestInitializer.getAuditRef(), dom1);
    try {
        long currentTimeMillis = System.currentTimeMillis();
        Timestamp currentTimestamp = Timestamp.fromMillis(currentTimeMillis);
        List<RoleMember> roleMembers = generateRoleMembers(currentTimeMillis);
        Role role1 = zmsTestInitializer.createRoleObject("test-domain1", "Role1", null, roleMembers);
        zmsTestInitializer.getZms().putRole(zmsTestInitializer.getMockDomRsrcCtx(), "test-domain1", "Role1", zmsTestInitializer.getAuditRef(), role1);
        RoleMemberExpiryNotificationTask roleMemberExpiryNotificationTask = new RoleMemberExpiryNotificationTask(zmsTestInitializer.getZms().dbService, zmsTestInitializer.getZms().userDomainPrefix, zmsTestInitializer.getZms().notificationToEmailConverterCommon);
        List<Notification> notifications = roleMemberExpiryNotificationTask.getNotifications();
        // Email notifications should be sent every 7 days while metrics should be recorded every day
        Set<String> emailNotificationMembers = new HashSet<>(Arrays.asList(new String[] { "user.expireddays0", "user.expireddays1", "user.expireddays7", "user.expireddays14", "user.expireddays21", "user.expireddays28" }));
        for (Notification notification : notifications) {
            String recipient = notification.getRecipients().stream().findFirst().get();
            if (recipient.equals("user.testadminuser")) {
                verifyAdminNotifications(emailNotificationMembers, notification);
            } else {
                if (emailNotificationMembers.contains(recipient)) {
                    assertNotNull(notification.getNotificationAsEmail());
                } else {
                    assertNull(notification.getNotificationAsEmail());
                }
                assertNotNull(notification.getNotificationAsMetrics(currentTimestamp));
            }
        }
    } finally {
        zmsTestInitializer.getZms().deleteTopLevelDomain(zmsTestInitializer.getMockDomRsrcCtx(), "test-domain1", zmsTestInitializer.getAuditRef());
    }
}
Also used : RoleMemberExpiryNotificationTask(com.yahoo.athenz.zms.notification.RoleMemberExpiryNotificationTask) Timestamp(com.yahoo.rdl.Timestamp) Notification(com.yahoo.athenz.common.server.notification.Notification)

Example 5 with Notification

use of com.yahoo.athenz.common.server.notification.Notification in project athenz by yahoo.

the class CertFailedRefreshNotificationTaskTest method testSeveralProviders.

@Test
public void testSeveralProviders() {
    Date currentDate = new Date();
    List<X509CertRecord> records = new ArrayList<>();
    Mockito.when(hostnameResolver.isValidHostname(anyString())).thenReturn(true);
    // Configure 3 providers in property
    System.setProperty(ZTS_PROP_NOTIFICATION_CERT_FAIL_PROVIDER_LIST, "provider1, provider2, provider3");
    // Create 7 records, each in it's own domain (domain0, domain1... domain6)
    for (int i = 0; i < 7; ++i) {
        X509CertRecord record = getMockX509CertRecord(currentDate, i);
        records.add(record);
        NotificationTestsCommon.mockDomainData(i, dataStore);
    }
    // Set one record in provider1, two records in provider2 and three records in provider3
    records.get(0).setProvider("provider1");
    records.get(1).setProvider("provider2");
    records.get(2).setProvider("provider2");
    records.get(3).setProvider("provider3");
    records.get(4).setProvider("provider3");
    records.get(5).setProvider("provider3");
    // Set one record in a provider not configured in properties (shouldn't be retrieved)
    records.get(6).setProvider("providerNotInProperty");
    Mockito.when(instanceCertManager.getUnrefreshedCertsNotifications(eq(serverName), eq("provider1"))).thenReturn(records.subList(0, 1));
    Mockito.when(instanceCertManager.getUnrefreshedCertsNotifications(eq(serverName), eq("provider2"))).thenReturn(records.subList(1, 3));
    Mockito.when(instanceCertManager.getUnrefreshedCertsNotifications(eq(serverName), eq("provider3"))).thenReturn(records.subList(3, 6));
    Mockito.when(instanceCertManager.getUnrefreshedCertsNotifications(eq(serverName), eq("providerNotInProperty"))).thenReturn(records.subList(6, 7));
    CertFailedRefreshNotificationTask certFailedRefreshNotificationTask = new CertFailedRefreshNotificationTask(instanceCertManager, dataStore, hostnameResolver, userDomainPrefix, serverName, httpsPort, notificationToEmailConverterCommon);
    List<Notification> notifications = certFailedRefreshNotificationTask.getNotifications();
    assertEquals(6, notifications.size());
    notifications.sort(Comparator.comparing(notif -> notif.getDetails().get(NOTIFICATION_DETAILS_UNREFRESHED_CERTS)));
    // Assert one records for provider1:
    String expectedDetail = "service0;provider1;instanceID0;" + Timestamp.fromMillis(currentDate.getTime()) + ";;hostName0";
    assertEquals(expectedDetail, notifications.get(0).getDetails().get(NOTIFICATION_DETAILS_UNREFRESHED_CERTS));
    // Assert two records for provider2:
    expectedDetail = "service1;provider2;instanceID1;" + Timestamp.fromMillis(currentDate.getTime()) + ";;hostName1";
    assertEquals(expectedDetail, notifications.get(1).getDetails().get(NOTIFICATION_DETAILS_UNREFRESHED_CERTS));
    expectedDetail = "service2;provider2;instanceID2;" + Timestamp.fromMillis(currentDate.getTime()) + ";;hostName2";
    assertEquals(expectedDetail, notifications.get(2).getDetails().get(NOTIFICATION_DETAILS_UNREFRESHED_CERTS));
    // Assert three records for provider3:
    expectedDetail = "service3;provider3;instanceID3;" + Timestamp.fromMillis(currentDate.getTime()) + ";;hostName3";
    assertEquals(expectedDetail, notifications.get(3).getDetails().get(NOTIFICATION_DETAILS_UNREFRESHED_CERTS));
    expectedDetail = "service4;provider3;instanceID4;" + Timestamp.fromMillis(currentDate.getTime()) + ";;hostName4";
    assertEquals(expectedDetail, notifications.get(4).getDetails().get(NOTIFICATION_DETAILS_UNREFRESHED_CERTS));
    expectedDetail = "service5;provider3;instanceID5;" + Timestamp.fromMillis(currentDate.getTime()) + ";;hostName5";
    assertEquals(expectedDetail, notifications.get(5).getDetails().get(NOTIFICATION_DETAILS_UNREFRESHED_CERTS));
    System.clearProperty(ZTS_PROP_NOTIFICATION_CERT_FAIL_PROVIDER_LIST);
}
Also used : ZTSTestUtils(com.yahoo.athenz.zts.ZTSTestUtils) InstanceCertManager(com.yahoo.athenz.zts.cert.InstanceCertManager) java.util(java.util) NotificationEmail(com.yahoo.athenz.common.server.notification.NotificationEmail) ArgumentMatchers(org.mockito.ArgumentMatchers) NotificationMetric(com.yahoo.athenz.common.server.notification.NotificationMetric) TagValueList(com.yahoo.athenz.zms.TagValueList) BeforeClass(org.testng.annotations.BeforeClass) DomainData(com.yahoo.athenz.zms.DomainData) Test(org.testng.annotations.Test) HostnameResolver(com.yahoo.athenz.common.server.dns.HostnameResolver) NotificationToEmailConverterCommon(com.yahoo.athenz.common.server.notification.NotificationToEmailConverterCommon) DataStore(com.yahoo.athenz.zts.store.DataStore) Notification(com.yahoo.athenz.common.server.notification.Notification) Mockito(org.mockito.Mockito) Timestamp(com.yahoo.rdl.Timestamp) Assert(org.testng.Assert) NotificationServiceConstants(com.yahoo.athenz.common.server.notification.NotificationServiceConstants) ZTS_PROP_NOTIFICATION_CERT_FAIL_IGNORED_SERVICES_LIST(com.yahoo.athenz.zts.ZTSConsts.ZTS_PROP_NOTIFICATION_CERT_FAIL_IGNORED_SERVICES_LIST) ZTS_PROP_NOTIFICATION_CERT_FAIL_PROVIDER_LIST(com.yahoo.athenz.zts.ZTSConsts.ZTS_PROP_NOTIFICATION_CERT_FAIL_PROVIDER_LIST) X509CertRecord(com.yahoo.athenz.common.server.cert.X509CertRecord) AssertJUnit.assertEquals(org.testng.AssertJUnit.assertEquals) MetricNotificationService(com.yahoo.athenz.common.server.notification.impl.MetricNotificationService) Assert.assertFalse(org.testng.Assert.assertFalse) X509CertRecord(com.yahoo.athenz.common.server.cert.X509CertRecord) Notification(com.yahoo.athenz.common.server.notification.Notification) Test(org.testng.annotations.Test)

Aggregations

Notification (com.yahoo.athenz.common.server.notification.Notification)30 Test (org.testng.annotations.Test)22 X509CertRecord (com.yahoo.athenz.common.server.cert.X509CertRecord)10 Timestamp (com.yahoo.rdl.Timestamp)9 NotificationToEmailConverterCommon (com.yahoo.athenz.common.server.notification.NotificationToEmailConverterCommon)8 NotificationEmail (com.yahoo.athenz.common.server.notification.NotificationEmail)6 NotificationMetric (com.yahoo.athenz.common.server.notification.NotificationMetric)4 NotificationServiceConstants (com.yahoo.athenz.common.server.notification.NotificationServiceConstants)4 GroupMemberExpiryNotificationTask (com.yahoo.athenz.zms.notification.GroupMemberExpiryNotificationTask)4 ZTSClientNotification (com.yahoo.athenz.zts.ZTSClientNotification)4 java.util (java.util)4 Mockito (org.mockito.Mockito)4 AssertJUnit.assertEquals (org.testng.AssertJUnit.assertEquals)4 USER_DOMAIN_PREFIX (com.yahoo.athenz.common.ServerCommonConsts.USER_DOMAIN_PREFIX)3 com.yahoo.athenz.zms (com.yahoo.athenz.zms)3 DomainData (com.yahoo.athenz.zms.DomainData)3 TagValueList (com.yahoo.athenz.zms.TagValueList)3 DataStore (com.yahoo.athenz.zts.store.DataStore)3 ArgumentMatchers.eq (org.mockito.ArgumentMatchers.eq)3 AssertJUnit.assertTrue (org.testng.AssertJUnit.assertTrue)3