@Test
  public void testMissingScriptConfiguration() throws Exception {
    m_configuration.setProperty(AlertScriptDispatcher.SCRIPT_CONFIG_DEFAULT_KEY, null);

    DispatchCallback callback = EasyMock.createNiceMock(DispatchCallback.class);
    AlertNotification notification = new AlertNotification();
    notification.Callback = callback;
    notification.CallbackIds = Collections.singletonList(UUID.randomUUID().toString());

    callback.onFailure(notification.CallbackIds);
    EasyMock.expectLastCall().once();

    EasyMock.replay(callback);

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

    EasyMock.verify(callback);
  }
Tests that a missing script property results in a callback failure.
ambari-server/src/test/java/org/apache/ambari/server/notifications/dispatchers/AlertScriptDispatcherTest.java