@Test(expected = FormatException.class) public void testRejectsTooLongLeaveMessage() throws Exception { BdfList body = BdfList.of(LEAVE.getValue(), privateGroup.getId(), previousMessageId, ""); validator.validateMessage(message, group, body); }
@Override protected BdfMessageContext validateMessage(Message m, Group g, BdfList body) throws FormatException { MessageType type = MessageType.fromValue(body.getLong(0).intValue()); switch (type) { case INVITE: return validateInviteMessage(m, body); case JOIN: return validateJoinMessage(m, body); case LEAVE: return validateLeaveMessage(m, body); case ABORT: return validateAbortMessage(m, body); default: throw new FormatException(); } }
GroupInvitationValidator extends BdfMessageValidator { @Override protected BdfMessageContext validateMessage(Message m, Group g, BdfList body) throws FormatException { MessageType type = MessageType.fromValue(body.getLong(0).intValue()); switch (type) { case INVITE: return validateInviteMessage(m, body); case JOIN: return validateJoinMessage(m, body); case LEAVE: return validateLeaveMessage(m, body); case ABORT: return validateAbortMessage(m, body); default: throw new FormatException(); } } }
GroupInvitationValidator extends BdfMessageValidator { @Override protected BdfMessageContext validateMessage(Message m, Group g, BdfList body) throws FormatException { MessageType type = MessageType.fromValue(body.getLong(0).intValue()); switch (type) { case INVITE: return validateInviteMessage(m, body); case JOIN: return validateJoinMessage(m, body); case LEAVE: return validateLeaveMessage(m, body); case ABORT: return validateAbortMessage(m, body); default: throw new FormatException(); } } GroupInvitationValidator(ClientHelper clientHelper,
			MetadataEncoder metadataEncoder, Clock clock,
			PrivateGroupFactory privateGroupFactory,
			MessageEncoder messageEncoder); }
GroupInvitationValidator extends BdfMessageValidator { @Override protected BdfMessageContext validateMessage(Message m, Group g, BdfList body) throws FormatException { MessageType type = MessageType.fromValue(body.getLong(0).intValue()); switch (type) { case INVITE: return validateInviteMessage(m, body); case JOIN: return validateJoinMessage(m, body); case LEAVE: return validateLeaveMessage(m, body); case ABORT: return validateAbortMessage(m, body); default: throw new FormatException(); } } GroupInvitationValidator(ClientHelper clientHelper,
			MetadataEncoder metadataEncoder, Clock clock,
			PrivateGroupFactory privateGroupFactory,
			MessageEncoder messageEncoder);  }
GroupInvitationValidator extends BdfMessageValidator { @Override protected BdfMessageContext validateMessage(Message m, Group g, BdfList body) throws FormatException { MessageType type = MessageType.fromValue(body.getLong(0).intValue()); switch (type) { case INVITE: return validateInviteMessage(m, body); case JOIN: return validateJoinMessage(m, body); case LEAVE: return validateLeaveMessage(m, body); case ABORT: return validateAbortMessage(m, body); default: throw new FormatException(); } } GroupInvitationValidator(ClientHelper clientHelper,
			MetadataEncoder metadataEncoder, Clock clock,
			PrivateGroupFactory privateGroupFactory,
			MessageEncoder messageEncoder);   }