@Test( expected = IOException.class ) public void testSendMessageDirectly_messagingError() throws Exception { TestApplication app = new TestApplication(); ManagedApplication ma = new ManagedApplication( app ); Message msg = new MsgCmdRemoveInstance( "/" ); Mockito.doThrow( new IOException( "for test" )).when( this.msgClient ).sendMessageToAgent( Mockito.any( Application.class ), Mockito.any( Instance.class ), Mockito.any( Message.class )); Mockito.verifyZeroInteractions( this.msgClient ); this.mngr.sendMessageDirectly( ma, app.getMySqlVm(), msg ); }
@Override public void sendMessageDirectly( ManagedApplication ma, Instance scopedInstance, Message message ) throws IOException { this.messagingClient.sendMessageToAgent( ma.getApplication(), scopedInstance, message ); }
MessagingMngrImpl implements IMessagingMngr { @Override public void sendMessageDirectly( ManagedApplication ma, Instance scopedInstance, Message message ) throws IOException { this.messagingClient.sendMessageToAgent( ma.getApplication(), scopedInstance, message ); } }
MessagingMngrImpl implements IMessagingMngr { @Override public void sendMessageDirectly( ManagedApplication ma, Instance scopedInstance, Message message ) throws IOException { this.messagingClient.sendMessageToAgent( ma.getApplication(), scopedInstance, message ); }  }
MessagingMngrImpl implements IMessagingMngr { @Override public void sendMessageDirectly( ManagedApplication ma, Instance scopedInstance, Message message ) throws IOException { this.messagingClient.sendMessageToAgent( ma.getApplication(), scopedInstance, message ); }  void setMessagingClient( RCDm messagingClient ); @Override void sendMessageSafely( ManagedApplication ma, Instance instance, Message message ); @Override void sendMessageDirectly( ManagedApplication ma, Instance scopedInstance, Message message ); @Override void sendStoredMessages( ManagedApplication ma, Instance instance ); @Override void sendMessageToTheDm( Message message ); @Override IDmClient getMessagingClient(); @Override void checkMessagingConfiguration(); }
MessagingMngrImpl implements IMessagingMngr { @Override public void sendMessageDirectly( ManagedApplication ma, Instance scopedInstance, Message message ) throws IOException { this.messagingClient.sendMessageToAgent( ma.getApplication(), scopedInstance, message ); }  void setMessagingClient( RCDm messagingClient ); @Override void sendMessageSafely( ManagedApplication ma, Instance instance, Message message ); @Override void sendMessageDirectly( ManagedApplication ma, Instance scopedInstance, Message message ); @Override void sendStoredMessages( ManagedApplication ma, Instance instance ); @Override void sendMessageToTheDm( Message message ); @Override IDmClient getMessagingClient(); @Override void checkMessagingConfiguration();  }