### Question:
SensitiveDataConverter extends MessageConverter { @Override public String convert(ILoggingEvent event) { String requestLogMsg = event.getFormattedMessage(); return convertMsg(requestLogMsg); }  @Override String convert(ILoggingEvent event);  }### Answer:
@Test public void convert() { SensitiveDataConverter sensitiveDataConverter = new SensitiveDataConverter(); String result = sensitiveDataConverter.convert(new ILoggingEvent() { @Override public String getThreadName() { return null; } @Override public Level getLevel() { return Level.INFO; } @Override public String getMessage() { return null; } @Override public Object[] getArgumentArray() { return new Object[0]; } @Override public String getFormattedMessage() { return logMsg; } @Override public String getLoggerName() { return null; } @Override public LoggerContextVO getLoggerContextVO() { return null; } @Override public IThrowableProxy getThrowableProxy() { return null; } @Override public StackTraceElement[] getCallerData() { return new StackTraceElement[0]; } @Override public boolean hasCallerData() { return false; } @Override public Marker getMarker() { return null; } @Override public Map<String, String> getMDCPropertyMap() { return null; } @Override public Map<String, String> getMdc() { return null; } @Override public long getTimeStamp() { return 0; } @Override public void prepareForDeferredProcessing() { } }); Assert.assertEquals(maskLogMsg, passwordHandler(pwdPattern, logMsg)); }