/**
   * Test of synchronouslySendNotificationMessage method, of class PushManager.
   *
   * @throws Exception If an error occurs
   */
  public void testSynchronouslySendNotificationMessage() throws Exception {

    final MockHelperNotificationEngine mockNotificationEngine =
        new MockHelperNotificationEngine() {
          @Override
          public void sendNotificationMessage(
              String username, String deviceId, Alert[] alerts, int uimode)
              throws NotificationNotSentException, NotificationException {
            incrementMessagesSent();
          }

          public void validate() {
            assertEquals(1, totalMessageSent);
          }
        };

    PushManager instance =
        new PushManager() {
          @Override
          protected NotificationEngine createNotificationEngine() {
            return mockNotificationEngine;
          }
        };

    String username = "******";
    String deviceId = "IMEI-1234567890";
    Alert[] alerts = new Alert[] {new Alert()};
    int uimode = 0;

    instance.synchronouslySendNotificationMessage(username, deviceId, alerts, uimode);

    mockNotificationEngine.validate();
  }