@Test(expected = FormatException.class) public void testValidateWrongVersionValue() throws IOException { BdfList body = BdfList.of(transportId.getString(), -1, bdfDictionary); tpv.validateMessage(message, group, body); }
@Override protected BdfMessageContext validateMessage(Message m, Group g, BdfList body) throws FormatException { checkSize(body, 3); String transportId = body.getString(0); checkLength(transportId, 1, MAX_TRANSPORT_ID_LENGTH); long version = body.getLong(1); if (version < 0) throw new FormatException(); BdfDictionary dictionary = body.getDictionary(2); clientHelper.parseAndValidateTransportProperties(dictionary); BdfDictionary meta = new BdfDictionary(); meta.put("transportId", transportId); meta.put("version", version); meta.put("local", false); return new BdfMessageContext(meta); }
TransportPropertyValidator extends BdfMessageValidator { @Override protected BdfMessageContext validateMessage(Message m, Group g, BdfList body) throws FormatException { checkSize(body, 3); String transportId = body.getString(0); checkLength(transportId, 1, MAX_TRANSPORT_ID_LENGTH); long version = body.getLong(1); if (version < 0) throw new FormatException(); BdfDictionary dictionary = body.getDictionary(2); clientHelper.parseAndValidateTransportProperties(dictionary); BdfDictionary meta = new BdfDictionary(); meta.put("transportId", transportId); meta.put("version", version); meta.put("local", false); return new BdfMessageContext(meta); } }
TransportPropertyValidator extends BdfMessageValidator { @Override protected BdfMessageContext validateMessage(Message m, Group g, BdfList body) throws FormatException { checkSize(body, 3); String transportId = body.getString(0); checkLength(transportId, 1, MAX_TRANSPORT_ID_LENGTH); long version = body.getLong(1); if (version < 0) throw new FormatException(); BdfDictionary dictionary = body.getDictionary(2); clientHelper.parseAndValidateTransportProperties(dictionary); BdfDictionary meta = new BdfDictionary(); meta.put("transportId", transportId); meta.put("version", version); meta.put("local", false); return new BdfMessageContext(meta); } TransportPropertyValidator(ClientHelper clientHelper,
			MetadataEncoder metadataEncoder, Clock clock); }
TransportPropertyValidator extends BdfMessageValidator { @Override protected BdfMessageContext validateMessage(Message m, Group g, BdfList body) throws FormatException { checkSize(body, 3); String transportId = body.getString(0); checkLength(transportId, 1, MAX_TRANSPORT_ID_LENGTH); long version = body.getLong(1); if (version < 0) throw new FormatException(); BdfDictionary dictionary = body.getDictionary(2); clientHelper.parseAndValidateTransportProperties(dictionary); BdfDictionary meta = new BdfDictionary(); meta.put("transportId", transportId); meta.put("version", version); meta.put("local", false); return new BdfMessageContext(meta); } TransportPropertyValidator(ClientHelper clientHelper,
			MetadataEncoder metadataEncoder, Clock clock);  }
TransportPropertyValidator extends BdfMessageValidator { @Override protected BdfMessageContext validateMessage(Message m, Group g, BdfList body) throws FormatException { checkSize(body, 3); String transportId = body.getString(0); checkLength(transportId, 1, MAX_TRANSPORT_ID_LENGTH); long version = body.getLong(1); if (version < 0) throw new FormatException(); BdfDictionary dictionary = body.getDictionary(2); clientHelper.parseAndValidateTransportProperties(dictionary); BdfDictionary meta = new BdfDictionary(); meta.put("transportId", transportId); meta.put("version", version); meta.put("local", false); return new BdfMessageContext(meta); } TransportPropertyValidator(ClientHelper clientHelper,
			MetadataEncoder metadataEncoder, Clock clock);   }