@Test(expected = ActiveMQAMQPNotFoundException.class)
public void testAcceptsNullSourceAddressWhenInitialising() throws Exception {

   ProtonProtocolManager mock = mock(ProtonProtocolManager.class);
   when(mock.getServer()).thenReturn(mock(ActiveMQServer.class));
   Sender mockSender = mock(Sender.class);
   AMQPConnectionContext mockConnContext = mock(AMQPConnectionContext.class);
   when(mockConnContext.getProtocolManager()).thenReturn(mock);
   AMQPSessionCallback mockSessionCallback = mock(AMQPSessionCallback.class);
   AddressQueryResult queryResult = new AddressQueryResult(null, Collections.emptySet(), 0, false, false, false, false, 0);
   when(mockSessionCallback.addressQuery(any(), any(), anyBoolean())).thenReturn(queryResult);
   ProtonServerSenderContext sc = new ProtonServerSenderContext( mockConnContext, mockSender, null, mockSessionCallback);
   Source source = new Source();
   source.setAddress(null);
   when(mockSender.getRemoteSource()).thenReturn(source);
   sc.initialise();
}