private void validateExceptionOnSending(ClientProducer producer,ClientMessage message){
  ActiveMQException expected=null;
  try {
    producer.send(message);
  }
 catch (  ActiveMQException e) {
    expected=e;
  }
  assertNotNull(expected);
  assertEquals(ActiveMQExceptionType.ADDRESS_FULL,expected.getType());
}

private void validateExceptionOnSending ( ClientProducer producer , ClientMessage message ) { ActiveMQException expected = null ; try { producer . send ( message ) ; } catch ( ActiveMQException e ) { expected = e ; } assertNotNull ( expected ) ; assertEquals ( ActiveMQExceptionType . ADDRESS_FULL , expected . getType ( ) ) ; }
this method validates if sending a message will throw an exception
