@Test
public void testGenerateAndSendPostPutGroupMembershipNotificationInvalidType() {

    DBService dbsvc = Mockito.mock(DBService.class);
    Mockito.when(dbsvc.getPendingMembershipApproverRoles(1)).thenReturn(Collections.emptySet());
    NotificationService mockNotificationService =  Mockito.mock(NotificationService.class);
    NotificationServiceFactory testfact = () -> mockNotificationService;
    NotificationManager notificationManager = getNotificationManager(dbsvc, testfact);
    notificationManager.shutdown();
    Group notifyGroup = new Group().setAuditEnabled(false).setSelfServe(false);
    List<Notification> notifications = new PutGroupMembershipNotificationTask("testdomain1", "neworg",
            notifyGroup, null, dbsvc, USER_DOMAIN_PREFIX).getNotifications();
    notificationManager.sendNotifications(notifications);
    Mockito.verify(mockNotificationService, times(0)).notify(any());
}