@Test public void testDestroy() throws Exception { when(mockChannel.isConnected()).thenReturn(true); messagingService.destroy(); verify(mockChannel).close(); }
@Override public void destroy() { if (channel.isConnected()) { LOGGER.info("Closing channel connection..."); channel.close(); LOGGER.info("Channel closed"); } }
JGroupsMessagingServiceImpl implements MessagingService<Message> { @Override public void destroy() { if (channel.isConnected()) { LOGGER.info("Closing channel connection..."); channel.close(); LOGGER.info("Channel closed"); } } }
JGroupsMessagingServiceImpl implements MessagingService<Message> { @Override public void destroy() { if (channel.isConnected()) { LOGGER.info("Closing channel connection..."); channel.close(); LOGGER.info("Channel closed"); } } JGroupsMessagingServiceImpl(final JChannel channel, final String clusterName); }
JGroupsMessagingServiceImpl implements MessagingService<Message> { @Override public void destroy() { if (channel.isConnected()) { LOGGER.info("Closing channel connection..."); channel.close(); LOGGER.info("Channel closed"); } } JGroupsMessagingServiceImpl(final JChannel channel, final String clusterName); @Override void init(); @Override void send(final Message msg); @Override void destroy(); JChannel getChannel(); @Override String toString(); }
JGroupsMessagingServiceImpl implements MessagingService<Message> { @Override public void destroy() { if (channel.isConnected()) { LOGGER.info("Closing channel connection..."); channel.close(); LOGGER.info("Channel closed"); } } JGroupsMessagingServiceImpl(final JChannel channel, final String clusterName); @Override void init(); @Override void send(final Message msg); @Override void destroy(); JChannel getChannel(); @Override String toString();  }