@Test public void testTestConnectionSuccessful() { when(wfClient.testConnection()).thenReturn(CONNECTION_SUCCESSFUL); TestConnectionResult result = wildflyClientService.testConnection(DUMMY_VALUE, DUMMY_INT_VALUE, DUMMY_INT_VALUE, DUMMY_VALUE, DUMMY_VALUE); assertFalse(result.getManagementConnectionError()); assertEquals(CONNECTION_SUCCESSFUL, result.getManagementConnectionMessage()); }
@Override public TestConnectionResult testConnection(final String host, final int port, final int managementPort, final String user, final String password) { final TestConnectionResult result = new TestConnectionResult(); try { final String testMessage = createWFClient(host, port, managementPort, user, password).testConnection(); result.setManagementConnectionError(false); result.setManagementConnectionMessage(testMessage); } catch (Exception e) { result.setManagementConnectionError(true); result.setManagementConnectionMessage(e.getMessage()); } return result; }
WildflyClientServiceImpl implements WildflyClientService { @Override public TestConnectionResult testConnection(final String host, final int port, final int managementPort, final String user, final String password) { final TestConnectionResult result = new TestConnectionResult(); try { final String testMessage = createWFClient(host, port, managementPort, user, password).testConnection(); result.setManagementConnectionError(false); result.setManagementConnectionMessage(testMessage); } catch (Exception e) { result.setManagementConnectionError(true); result.setManagementConnectionMessage(e.getMessage()); } return result; } }
WildflyClientServiceImpl implements WildflyClientService { @Override public TestConnectionResult testConnection(final String host, final int port, final int managementPort, final String user, final String password) { final TestConnectionResult result = new TestConnectionResult(); try { final String testMessage = createWFClient(host, port, managementPort, user, password).testConnection(); result.setManagementConnectionError(false); result.setManagementConnectionMessage(testMessage); } catch (Exception e) { result.setManagementConnectionError(true); result.setManagementConnectionMessage(e.getMessage()); } return result; }  }
WildflyClientServiceImpl implements WildflyClientService { @Override public TestConnectionResult testConnection(final String host, final int port, final int managementPort, final String user, final String password) { final TestConnectionResult result = new TestConnectionResult(); try { final String testMessage = createWFClient(host, port, managementPort, user, password).testConnection(); result.setManagementConnectionError(false); result.setManagementConnectionMessage(testMessage); } catch (Exception e) { result.setManagementConnectionError(true); result.setManagementConnectionMessage(e.getMessage()); } return result; }  @Override TestConnectionResult testConnection(final String host,
                                               final int port,
                                               final int managementPort,
                                               final String user,
                                               final String password); }
WildflyClientServiceImpl implements WildflyClientService { @Override public TestConnectionResult testConnection(final String host, final int port, final int managementPort, final String user, final String password) { final TestConnectionResult result = new TestConnectionResult(); try { final String testMessage = createWFClient(host, port, managementPort, user, password).testConnection(); result.setManagementConnectionError(false); result.setManagementConnectionMessage(testMessage); } catch (Exception e) { result.setManagementConnectionError(true); result.setManagementConnectionMessage(e.getMessage()); } return result; }  @Override TestConnectionResult testConnection(final String host,
                                               final int port,
                                               final int managementPort,
                                               final String user,
                                               final String password);  }