### Question:
NetworkService { public SocketClient getConnectionWithRetry(String ip, int port) { SocketClient client = new SocketClient(); int numRetries = 3; while (true) { try { client.startConnection(ip, port); } catch (IOException e) { log.info("retry connection...", e); numRetries--; if (numRetries < 0) { log.warn("Retry limit exceeded"); break; } try { TimeUnit.SECONDS.sleep(3); } catch (InterruptedException e1) { log.error("sleep error", e1); } } } return client; }  SocketClient startConnection(String ip, int port); SocketClient getConnectionWithRetry(String ip, int port); SocketClient getConnectionWithRetries(String ip, int port, int retries, long retrySleep);  }### Answer:
@Test public void getConnection_네트워크_연결_retry() { NetworkService networkService = new NetworkService(); networkService.getConnectionWithRetry("localhost", 123); }