@Test public void testSupportsUrgentData() throws Exception { when(delegate, "supportsUrgentData").thenReturn(true); boolean actual = sniffySocket.supportsUrgentData(); verifyPrivate(delegate).invoke("supportsUrgentData"); verifyNoMoreInteractions(delegate); assertEquals(true, actual); }
@Override protected boolean supportsUrgentData() { copyToDelegate(); long start = System.currentTimeMillis(); try { return (Boolean) method("supportsUrgentData").invoke(delegate); } catch (Exception e) { throw ExceptionUtil.processException(e); } finally { logSocket(System.currentTimeMillis() - start); copyFromDelegate(); } }
SnifferSocketImpl extends SocketImpl implements SniffySocket { @Override protected boolean supportsUrgentData() { copyToDelegate(); long start = System.currentTimeMillis(); try { return (Boolean) method("supportsUrgentData").invoke(delegate); } catch (Exception e) { throw ExceptionUtil.processException(e); } finally { logSocket(System.currentTimeMillis() - start); copyFromDelegate(); } } }
SnifferSocketImpl extends SocketImpl implements SniffySocket { @Override protected boolean supportsUrgentData() { copyToDelegate(); long start = System.currentTimeMillis(); try { return (Boolean) method("supportsUrgentData").invoke(delegate); } catch (Exception e) { throw ExceptionUtil.processException(e); } finally { logSocket(System.currentTimeMillis() - start); copyFromDelegate(); } } protected  SnifferSocketImpl(SocketImpl delegate); }
SnifferSocketImpl extends SocketImpl implements SniffySocket { @Override protected boolean supportsUrgentData() { copyToDelegate(); long start = System.currentTimeMillis(); try { return (Boolean) method("supportsUrgentData").invoke(delegate); } catch (Exception e) { throw ExceptionUtil.processException(e); } finally { logSocket(System.currentTimeMillis() - start); copyFromDelegate(); } } protected  SnifferSocketImpl(SocketImpl delegate); @Override void setConnectionStatus(Integer connectionStatus); @Override String toString(); @Override void setOption(int optID, Object value); @Override Object getOption(int optID); @Override InetSocketAddress getInetSocketAddress(); }
SnifferSocketImpl extends SocketImpl implements SniffySocket { @Override protected boolean supportsUrgentData() { copyToDelegate(); long start = System.currentTimeMillis(); try { return (Boolean) method("supportsUrgentData").invoke(delegate); } catch (Exception e) { throw ExceptionUtil.processException(e); } finally { logSocket(System.currentTimeMillis() - start); copyFromDelegate(); } } protected  SnifferSocketImpl(SocketImpl delegate); @Override void setConnectionStatus(Integer connectionStatus); @Override String toString(); @Override void setOption(int optID, Object value); @Override Object getOption(int optID); @Override InetSocketAddress getInetSocketAddress();  }