Tap status = platform.makeTap(platform.makeBinaryScheme(StatusDatum.FIELDS), statusPath, SinkMode.REPLACE);
// Finally we can run it.
FlowConnector flowConnector = platform.makeFlowConnector();
Flow flow = flowConnector.connect(in, status, fetchPipe.getStatusTailPipe());
TestWebServer webServer = null;
try {
final int numBytes = 10000;
// Pick a time way longer than the FetcherPolicy.getRequestTimeout().
final long numMilliseconds = 100 * 1000L;
webServer = new TestWebServer(new NoRobotsResponseHandler(numBytes, numMilliseconds), port);
flow.complete();
} finally {
webServer.stop();
}
Tap validate = platform.makeTap(platform.makeBinaryScheme(StatusDatum.FIELDS), statusPath);
TupleEntryIterator tupleEntryIterator = validate.openForRead(platform.makeFlowProcess());
int totalEntries = 0;