public void removeListener(final ProvisioningAddress address) {
    RedisOperation.unchecked(() -> circuitBreaker.executeRunnable(
        () -> subscriptionConnection.sync().unsubscribe(address.serialize().getBytes(StandardCharsets.UTF_8))));

    listenersByProvisioningAddress.remove(address);
  }
@Test
  void removeListener() {
    final ProvisioningAddress address = ProvisioningAddress.create("address");

    final byte[] content = TestRandomUtil.nextBytes(16);

    @SuppressWarnings("unchecked") final Consumer<PubSubProtos.PubSubMessage> subscribedConsumer = mock(Consumer.class);

    provisioningManager.addListener(address, subscribedConsumer);
    provisioningManager.removeListener(address);
    provisioningManager.sendProvisioningMessage(address, content);

    // Make sure that we give the message enough time to show up (if it was going to) before declaring victory
    verify(subscribedConsumer, after(PUBSUB_TIMEOUT_MILLIS).never()).accept(any());
  }