private void validateSenderDestroyed(String senderId, boolean isParallel) {
    GatewaySender sender = findGatewaySender(senderId, false);

    assertThat(sender)
        .isNull();

    String queueRegionNameSuffix =
        isParallel ? ParallelGatewaySenderQueue.QSTRING : "_SERIAL_GATEWAY_SENDER_QUEUE";

    for (InternalRegion region : getCache().getAllRegions()) {
      assertThat(region.getName())
          .doesNotContain(senderId + queueRegionNameSuffix);
    }
  }
Since the sender is attached to a region and in use, it can not be destroyed. Hence, exception
is thrown by the sender API.
geode-wan/src/distributedTest/java/org/apache/geode/internal/cache/wan/serial/SerialGatewaySenderOperationsDistributedTest.java