DestinationHelper { public static void logWarningIfNotNull(boolean alreadyLogged, WarningLoggedCallback callback, Object d, String text, Object... args) { if (d != null) { LoggingHelper.logWarning(alreadyLogged, callback, text, args); } else { callback.warningLogged(); } }  static void mustHaveEither(String configured, ConsumeDestination legacy); static void mustHaveEither(String configured, ProduceDestination legacy); static String consumeDestination(final String configured,
      final ConsumeDestination legacy); static String filterExpression(final String configured,
      final ConsumeDestination legacy); static String threadName(final AdaptrisMessageListener listener, final ConsumeDestination legacy); static String threadName(final AdaptrisMessageListener listener,
      final ConsumeDestination legacy, String defaultName); static String resolveProduceDestination(String configured, ProduceDestination legacy,
      AdaptrisMessage msg); @Deprecated static void logConsumeDestinationWarning(boolean alreadyLogged,
      WarningLoggedCallback callback,
      ConsumeDestination d, String text,
      Object... args); static void logWarningIfNotNull(boolean alreadyLogged,
      WarningLoggedCallback callback, Object d, String text, Object... args);  }
@Test public void testLogWarningIfNotNull() { logWarningIfNotNull(false, () -> { }, new Object(), "{} warning", "this is a"); logWarningIfNotNull(false, () -> { }, null, "{} warning", "this is a"); }