### Question:
MessageFactory { public static Buffer createJoinFailedMessage (int cid) { return MessageUtils.createMsg(Protocol.MSG_TYPE_GS, Protocol.MSG_EXTENDED_TYPE_JOIN_FAILED, cid); } protected  MessageFactory(); static Buffer createJoinSuccessMessage(int cid); static Buffer createJoinFailedMessage(int cid);  }### Answer:
@Test public void testCreateJoinFailedMessage () { Buffer content = MessageFactory.createJoinFailedMessage(10); assertEquals(Protocol.MSG_TYPE_GS, content.getByte(0)); assertEquals(Protocol.MSG_EXTENDED_TYPE_JOIN_FAILED, content.getByte(1)); assertEquals(Protocol.MSG_PROTOCOL_VERSION, content.getShort(2)); assertEquals(10, content.getInt(4)); }