MessageFormatterFactory { public static MessageFormatter createConsoleFormatter() { return SINGLETON_CONSOLEMESSAGE; }  static MessageFormatter createConsoleFormatter(); static MessageFormatter createHtmlFormatter(); static MessageFormatter createDefaultFormatter();  }
@Test public void createConsoleFormatterTest() { assertSame(message1, message2); String str1 = message1.format("Hola"); String str2 = message2.format("Hola"); assertSame(str1, str2); }