ServerTCPNonBlockingTransportHandler extends TransportHandler { public void recheck() throws IOException { if (task != null) { if (task.isDone()) { try { clientSocket = task.get(); clientSocket.setSoTimeout(1); setStreams(new PushbackInputStream(clientSocket.getInputStream()), clientSocket.getOutputStream()); } catch (InterruptedException | ExecutionException ex) { LOGGER.warn("Could not retrieve clientSocket"); LOGGER.debug(ex); } } else { LOGGER.debug("TransportHandler not yet connected"); } } else { throw new IOException("Transporthandler is not initalized!"); } } ServerTCPNonBlockingTransportHandler(long timeout, int port); @Override void closeConnection(); @Override void initialize(); void recheck(); void recheck(long timeout); @Override boolean isClosed(); @Override void closeClientConnection(); int getPort();  }
@Test(expected = IOException.class) public void testRecheck() throws IOException { handler.recheck(); }