### Question:
LoggingFacade { public String formatMessage(String msgId, Object... params) { if (params == null || params.length == 0) { return getResourceBundle().getString(msgId); } String msg = getResourceBundle().getString(msgId); MessageFormat formatter = new MessageFormat(msg); return formatter.format(params); } LoggingFacade(Logger logger); static Object convertArraysForLogging(Object value, boolean password); void config(String msg); void config(String msg, Object... params); void config(String msg, Throwable thrown); void entering(); void entering(Object... params); void exiting(); void exiting(Object result); void fine(String msg); void fine(String msg, Object... params); void fine(String msg, Throwable thrown); void finer(String msg); void finer(String msg, Object... params); void finer(String msg, Throwable thrown); void finest(String msg); void finest(String msg, Object... params); void finest(String msg, Throwable thrown); Level getLevel(); void setLevel(Level newLevel); String getName(); Logger getUnderlyingLogger(); void info(String msg); void info(String msg, Object... params); void info(LoggingFilter loggingFilter, String msg, Object... params); void info(String msg, Throwable thrown); boolean isConfigEnabled(); boolean isFineEnabled(); boolean isFinerEnabled(); boolean isFinestEnabled(); boolean isInfoEnabled(); boolean isLoggable(Level level); boolean isSevereEnabled(); boolean isWarningEnabled(); void log(Level level, String msg); void log(Level level, String msg, Object... params); void log(Level level, String msg, Throwable thrown); void severe(String msg); void severe(String msg, Object... params); void severe(LoggingFilter loggingFilter, String msg, Object... params); void severe(String msg, Throwable thrown); void severe(LoggingFilter loggingFilter, String msg, Throwable thrown); void throwing(Throwable pending); void warning(String msg); void warning(String msg, Object... params); void warning(LoggingFilter loggingFilter, String msg, Object... params); void warning(String msg, Throwable thrown); void trace(String msg); void trace(String msg, Object... args); ResourceBundle getResourceBundle(); String formatMessage(String msgId, Object... params); static final String TRACE; }### Answer:
@Test public void verifyGetFormattedMessage_withArgs_returnsFormattedMessage() { assertThat(loggingFacade.formatMessage(MessageKeys.CYCLING_SERVERS, "domain1", "list1"), is("Cycling of servers for Domain with UID domain1 in the list list1 now")); }
@Test public void verifyGetFormattedMessage_withNoArgs_returnsFormattedMessage() { assertThat(loggingFacade.formatMessage(MessageKeys.RESOURCE_BUNDLE_NOT_FOUND), is("Could not find the resource bundle")); }