### Question:
WXUtils { public static char getContactChar(IContact contact) { if (contact instanceof Contact) { Contact c = (Contact)contact; char ch = 'F'; if (c.isPublic()) { ch = 'P'; } else if (c.isGroup()) { ch = 'G'; } else if (c.is3rdApp() || c.isSpecial()) { ch = 'S'; } return ch; } return 0; }  static char getContactChar(IContact contact); static String decodeEmoji(String src); static String getPureName(String name); static String formatHtmlOutgoing(String name, String msg, boolean encode); static String formatHtmlIncoming(WechatMessage m, AbstractFrom from);  }### Answer:
@Test public void testGetContactChar() { Contact contact = new Contact(); contact.UserName = "@J"; char c = WXUtils.getContactChar(contact); assertEquals(c, 'F'); }