### Question:
Sink { public static void main(String[] args) throws IOException { SinkConfig.getInput(SinkConfig.getOutput()).run(); } private  Sink(); static void main(String[] args);  }### Answer:
@Test public void failsOnMissingInput() { environmentVariables.set("OUTPUT_TABLE", "dataset.table"); assertThrows(IllegalArgumentException.class, () -> Sink.main(null)); }
@Test public void canDeliverErrors() throws IOException { environmentVariables.set("INPUT_PIPE", "stdin"); environmentVariables.set("OUTPUT_PIPE", "stdout"); environmentVariables.set("OUTPUT_FORMAT", "payload"); environmentVariables.set("SCHEMAS_LOCATION", TestConstant.SCHEMAS_LOCATION); environmentVariables.set("ERROR_OUTPUT_PIPE", "stderr"); systemIn.provideLines("{}"); systemOut.enableLog(); systemOut.mute(); systemErr.enableLog(); systemErr.mute(); Sink.main(null); assertEquals("", systemOut.getLog()); assertEquals("{}\n", systemErr.getLog()); }