InputStream is = new ByteArrayInputStream("RFB 003.007\ntest".getBytes(RfbConstants.US_ASCII_CHARSET));
ByteArrayOutputStream initOS = new ByteArrayOutputStream();
ByteArrayOutputStream mainOS = new ByteArrayOutputStream();
InputStreamSource inputStreamSource = new InputStreamSource("source", is);
OutputStreamSink outputStreamSink = new OutputStreamSink("mainSink", mainOS);
Vnc_3_3_Hello hello = new Vnc_3_3_Hello("hello");
Pipeline pipeline = new PipelineImpl("test");
pipeline.addAndLink(inputStreamSource, hello, outputStreamSink);
pipeline.add(new OutputStreamSink("initSink", initOS));
pipeline.link("hello >" + OneTimeSwitch.OTOUT, "initSink");
pipeline.runMainLoop("source", STDOUT, false, false);