@Test(expected = RuntimeException.class) public void testExceptionInOpeningIncomingStream() throws IOException { given(socket.getInputStream()).willThrow(new IOException()); tcpSocketRpcConnection.getIncomingStream(); }
@Override public InputStream getIncomingStream() { try { return socket.getInputStream(); } catch (IOException e) { log.error("Failed to get incoming stream", e); throw new RuntimeException(e); } }
TcpSocketRpcConnection implements RpcConnection { @Override public InputStream getIncomingStream() { try { return socket.getInputStream(); } catch (IOException e) { log.error("Failed to get incoming stream", e); throw new RuntimeException(e); } } }
TcpSocketRpcConnection implements RpcConnection { @Override public InputStream getIncomingStream() { try { return socket.getInputStream(); } catch (IOException e) { log.error("Failed to get incoming stream", e); throw new RuntimeException(e); } } TcpSocketRpcConnection(Socket socket); }
TcpSocketRpcConnection implements RpcConnection { @Override public InputStream getIncomingStream() { try { return socket.getInputStream(); } catch (IOException e) { log.error("Failed to get incoming stream", e); throw new RuntimeException(e); } } TcpSocketRpcConnection(Socket socket); @Override InputStream getIncomingStream(); @Override OutputStream getOutgoingStream(); @Override void close(); @Override String toString(); }
TcpSocketRpcConnection implements RpcConnection { @Override public InputStream getIncomingStream() { try { return socket.getInputStream(); } catch (IOException e) { log.error("Failed to get incoming stream", e); throw new RuntimeException(e); } } TcpSocketRpcConnection(Socket socket); @Override InputStream getIncomingStream(); @Override OutputStream getOutgoingStream(); @Override void close(); @Override String toString(); static final Logger log; }