### Question:
LoggingEvent implements ILoggingEvent { public String getFormattedMessage() { if (formattedMessage != null) { return formattedMessage; } if (argumentArray != null) { formattedMessage = MessageFormatter.arrayFormat(message, argumentArray) .getMessage(); } else { formattedMessage = message; } return formattedMessage; } LoggingEvent();  LoggingEvent(String fqcn, Logger logger, Level level, String message,
                      Throwable throwable, Object[] argArray); void setArgumentArray(Object[] argArray); Object[] getArgumentArray(); Level getLevel(); String getLoggerName(); void setLoggerName(String loggerName); String getThreadName(); void setThreadName(String threadName); IThrowableProxy getThrowableProxy(); void setThrowableProxy(ThrowableProxy tp); void prepareForDeferredProcessing(); LoggerContextVO getLoggerContextVO(); void setLoggerContextRemoteView(LoggerContextVO loggerContextVO); String getMessage(); void setMessage(String message); long getTimeStamp(); void setTimeStamp(long timeStamp); void setLevel(Level level); StackTraceElement[] getCallerData(); boolean hasCallerData(); void setCallerData(StackTraceElement[] callerDataArray); Marker getMarker(); void setMarker(Marker marker); long getContextBirthTime(); String getFormattedMessage(); Map<String, String> getMDCPropertyMap(); void setMDCPropertyMap(Map<String, String> map); Map<String, String> getMdc(); @Override String toString();  }### Answer:
@Test public void testFormattingOneArg() { String message = "x={}"; Throwable throwable = null; Object[] argArray = new Object[] {12}; LoggingEvent event = new LoggingEvent("", logger, Level.INFO, message, throwable, argArray); assertNull(event.formattedMessage); assertEquals("x=12", event.getFormattedMessage()); }
@Test public void testFormattingTwoArg() { String message = "{}-{}"; Throwable throwable = null; Object[] argArray = new Object[] {12, 13}; LoggingEvent event = new LoggingEvent("", logger, Level.INFO, message, throwable, argArray); assertNull(event.formattedMessage); assertEquals("12-13", event.getFormattedMessage()); }
@Test public void testNoFormattingWithArgs() { String message = "testNoFormatting"; Throwable throwable = null; Object[] argArray = new Object[] {12, 13}; LoggingEvent event = new LoggingEvent("", logger, Level.INFO, message, throwable, argArray); assertNull(event.formattedMessage); assertEquals(message, event.getFormattedMessage()); }
@Test public void testNoFormattingWithoutArgs() { String message = "testNoFormatting"; Throwable throwable = null; Object[] argArray = null; LoggingEvent event = new LoggingEvent("", logger, Level.INFO, message, throwable, argArray); assertNull(event.formattedMessage); assertEquals(message, event.getFormattedMessage()); }