@VisibleForTesting(otherwise = VisibleForTesting.PROTECTED)
    final void createAccessMessage(@NonNull final AccessMessage accessMessage) {
        final byte[] opCodes = getOpCode(accessMessage.getOpCode());
        final byte[] parameters = accessMessage.getParameters();
        final ByteBuffer accessMessageBuffer;
        if (parameters != null) {
            accessMessageBuffer = ByteBuffer.allocate(opCodes.length + parameters.length);
            accessMessageBuffer.put(opCodes).put(parameters);
        } else {
            accessMessageBuffer = ByteBuffer.allocate(opCodes.length);
            accessMessageBuffer.put(opCodes);
        }
        final byte[] accessPdu = accessMessageBuffer.array();

        MeshLogger.verbose(TAG, "Created Access PDU " + bytesToHex(accessPdu, false));
        accessMessage.setAccessPdu(accessMessageBuffer.array());
    }
Creates an access message

@param accessMessage Access message containing the required opcodes and parameters to create access message pdu.
mesh/src/main/java/no/nordicsemi/android/mesh/transport/AccessLayer.java