public void measureAccountEnvelopeUuidMismatches(final Account account,
      final MessageProtos.Envelope envelope) {
    if (envelope.hasDestinationUuid()) {
      try {
        measureAccountDestinationUuidMismatches(account, ServiceIdentifier.valueOf(envelope.getDestinationUuid()));
      } catch (final IllegalArgumentException ignored) {
        logger.warn("Envelope had invalid destination UUID: {}", envelope.getDestinationUuid());
      }
    }
  }
@Test
  void measureAccountEnvelopeUuidMismatches() {
    final MessageProtos.Envelope envelopeToAci = createEnvelope(new AciServiceIdentifier(aci));
    messageMetrics.measureAccountEnvelopeUuidMismatches(account, envelopeToAci);

    Optional<Counter> counter = findCounter(simpleMeterRegistry);

    assertTrue(counter.isEmpty());

    final MessageProtos.Envelope envelopeToPni = createEnvelope(new PniServiceIdentifier(pni));
    messageMetrics.measureAccountEnvelopeUuidMismatches(account, envelopeToPni);
    counter = findCounter(simpleMeterRegistry);

    assertTrue(counter.isEmpty());

    final MessageProtos.Envelope envelopeToOtherUuid = createEnvelope(new AciServiceIdentifier(otherUuid));
    messageMetrics.measureAccountEnvelopeUuidMismatches(account, envelopeToOtherUuid);
    counter = findCounter(simpleMeterRegistry);

    assertEquals(1.0, counter.map(Counter::count).orElse(0.0));

    final MessageProtos.Envelope envelopeToNull = createEnvelope(null);
    messageMetrics.measureAccountEnvelopeUuidMismatches(account, envelopeToNull);
    counter = findCounter(simpleMeterRegistry);

    assertEquals(1.0, counter.map(Counter::count).orElse(0.0));
  }