rabbitmq-tests/src/test/java/com/datastax/oss/starlight/rabbitmqtests/javaclient/functional/BindingLifecycle.java
@Test
  @Ignore("Need to implement exchange delete ifUnused first")
  public void exchangeIfUnused() throws IOException {

    boolean durable = true;
    Binding binding = setupExchangeBindings(true);

    try {
      channel.exchangeDelete(binding.x, true);
    } catch (IOException e) {
      checkShutdownSignal(AMQP.PRECONDITION_FAILED, e);
      openChannel();
      deleteExchangeAndQueue(binding);
      return;
    }

    fail("Exchange delete should have failed");
  }
/**
   * This tests whether the server checks that an exchange is actually being used when you try to
   * delete it with the ifunused flag.
   *
   * <p>To test this, you try to delete an exchange with a queue still bound to it and expect the
   * delete operation to fail.
   */
This tests whether the server checks that an exchange is actually being used when you try to
delete it with the ifunused flag.

To test this, you try to delete an exchange with a queue still bound to it and expect the
delete operation to fail.
This tests whether the server checks that an exchange is actually being used when you try to delete it with the ifunused flag . To test this you try to delete an exchange with a queue still bound to it and expect the delete operation to fail .
@Test
  @Ignore("Need to implement exchange delete ifUnused first")
  public void exchangeIfUnused() throws IOException {
    boolean durable = true;
    Binding binding = setupExchangeBindings(true);
    try {
      channel.exchangeDelete(binding.x, true);
    } catch (IOException e) {
      checkShutdownSignal(AMQP.PRECONDITION_FAILED, e);
      openChannel();
      deleteExchangeAndQueue(binding);
      return;
    }
    fail("Exchange delete should have failed");
  }
@ Test @ Ignore ( "Need to implement exchange delete ifUnused first" ) public void exchangeIfUnused ( ) throws IOException { boolean durable = true ; Binding binding = setupExchangeBindings ( true ) ; try { channel . exchangeDelete ( binding . x , true ) ; } catch ( IOException e ) { checkShutdownSignal ( AMQP . PRECONDITION_FAILED , e ) ; openChannel ( ) ; deleteExchangeAndQueue ( binding ) ; return ; } fail ( "Exchange delete should have failed" ) ; }
This tests whether the server checks that an exchange is actually being used when you try to
 delete it with the ifunused flag.
This tests whether the server checks that an exchange is actually being used when you try to delete it with the ifunused flag .