@Test
  public void testNoEmailPropeties() {
    Notification notification = new Notification();
    DispatchCallback callback = EasyMock.createMock(DispatchCallback.class);
    notification.Callback = callback;
    notification.Recipients = new ArrayList<>();

    Recipient recipient = new Recipient();
    recipient.Identifier = "foo";

    notification.Recipients.add(recipient);

    List<String> callbackIds = new ArrayList<>();
    callbackIds.add(UUID.randomUUID().toString());
    notification.CallbackIds = callbackIds;

    callback.onFailure(callbackIds);

    EasyMock.expectLastCall();
    EasyMock.replay(callback);

    NotificationDispatcher dispatcher = m_dispatchFactory.getDispatcher(TargetType.EMAIL.name());
    dispatcher.dispatch(notification);

    EasyMock.verify(callback);
  }
Tests that an email without properties causes a callback error.
ambari-server/src/test/java/org/apache/ambari/server/notifications/dispatchers/EmailDispatcherTest.java