code: public SerialMessage getMultiInstanceEncapMessage(SerialMessage serialMessage, int instance) {
  		logger.debug("Creating new message for application command MULTI_INSTANCE_ENCAP for node {} and instance {}", this.getNode().getNodeId(), instance);
  		
  		byte[] payload = serialMessage.getMessagePayload();
  		byte[] newPayload = new byte[payload.length + 3];
  		System.arraycopy(payload, 0, newPayload, 0, 2);
  		System.arraycopy(payload, 0, newPayload, 3, payload.length);
  		newPayload[1] += 3;
  		newPayload[2] = (byte) this.getCommandClass().getKey();
  		newPayload[3] = MULTI_INSTANCE_ENCAP;
  		newPayload[4] = (byte)(instance);
  		
  		serialMessage.setMessagePayload(newPayload);
      	return serialMessage;		
  	}
docs: Gets a SerialMessage with the MULTI INSTANCE ENCAP command.
  Encapsulates a message for a specific instance.
  @param serialMessage the serial message to encapsulate
  @param instance the number of the instance to encapsulate the message for.
  @return the encapsulated serial message.