assertNull(_queueMBean.getAlternateExchange());
}
public void testSetAlternateExchange() throws Exception
{
Exchange mockExchange1 = mock(Exchange.class);
when(mockExchange1.getName()).thenReturn("exchange1");
Exchange mockExchange2 = mock(Exchange.class);
when(mockExchange2.getName()).thenReturn("exchange2");
Exchange mockExchange3 = mock(Exchange.class);
when(mockExchange3.getName()).thenReturn("exchange3");
VirtualHost mockVirtualHost = mock(VirtualHost.class);
when(mockVirtualHost.getExchanges()).thenReturn(Arrays.asList(new Exchange[] {mockExchange1, mockExchange2, mockExchange3}));
when(_mockQueue.getParent(VirtualHost.class)).thenReturn(mockVirtualHost);