### Question:
StringSockets { @VisibleForTesting static Func1<Socket, Observable<String>> socketObservableFactory(final Charset charset) { return Checked.f1( socket -> Strings.from(new InputStreamReader(socket.getInputStream(), charset))); }  static Observable<String> from(final String host, final int port, long quietTimeoutMs,
            long reconnectDelayMs, Charset charset, Scheduler scheduler); static Observable<String> from(Func0<Socket> socketCreator, long quietTimeoutMs,
            long reconnectDelayMs, Charset charset, Scheduler scheduler); static Builder from(String host); static Observable<String> strings(final String host, final int port, int quietTimeoutMs,
            final Charset charset); static Observable<String> strings(Func0<Socket> socketCreator, final Charset charset); static Observable<String> mergeLinesFrom(Observable<HostPort> hostPorts,
            Scheduler scheduler); static Observable<String> mergeLinesFrom(Observable<HostPort> hostPorts, int maxLineLength); static Observable<String> mergeLinesFrom(Observable<HostPort> hostPorts,
            Scheduler scheduler, int maxLineLength); static Observable<String> mergeLinesFrom(Observable<HostPort> hostPorts); static void main(String[] args);  }### Answer:
@Test(expected = RuntimeException.class) public void testSocketObservableFactoryOnException() throws IOException { Socket socket = mock(Socket.class); doThrow(new IOException("hi")).when(socket).getInputStream(); StringSockets.socketObservableFactory(StandardCharsets.UTF_8).call(socket); }