PatternFlattener implements Flattener, Flattener2 { static MessageFiller parseMessageParameter(String wrappedParameter, String trimmedParameter) { if (trimmedParameter.equals(PARAMETER_MESSAGE)) { return new MessageFiller(wrappedParameter, trimmedParameter); } return null; } PatternFlattener(String pattern); @Override CharSequence flatten(int logLevel, String tag, String message); @Override CharSequence flatten(long timeMillis, int logLevel, String tag, String message);  }
@Test public void testParseMessageParameter() { PatternFlattener.ParameterFiller parameterFiller = PatternFlattener.parseMessageParameter( "{m}", "m"); assertNoNullAndClass(parameterFiller, PatternFlattener.MessageFiller.class); parameterFiller = PatternFlattener.parseDateParameter("{M}", "M"); assertNull(parameterFiller); }