Element sink = new MockSink("sink", new ByteBuffer[] {});
Pipeline pipeline = new PipelineImpl("test");
pipeline.add(source, router, clip_cap, sink);
pipeline.link("source", "router >clipboard_capabilities", "clip_cap", "sink");
pipeline.runMainLoop("source", STDOUT, false, false);
// Check state
if (!state.serverUseLongFormatNames || !state.serverStreamFileClipEnabled || !state.serverFileClipNoFilePaths || state.serverCanLockClipdata)
throw new RuntimeException("Server clipboard capabilities packet parsed incorrectly.");