### Question:
Loader { public Dataset<Row> loadDf(InputStream stream) throws IOException { return spark.sql(IOUtils.toString(stream, "UTF-8")); } Loader(Region region);  Loader(String app, String master, String warehouse); SparkSession getSparkSession(); void setConfiguration(Configuration configuration); void setDf(Dataset df); void loadSourceFiles(Mapping mapping); Dataset<Row> loadDf(InputStream stream); void teardown(String stack, Region region); void load(Configuration configuration); void write(String destination); void write(String destination, List<String> overflowColumns); void addMetadata(String destination); void materializeUUID(String prefix, String suffix);  }### Answer:
@Test public void testLoadDf() throws IOException { Mapping mapping = configuration.getMappings().get(0); loader.setConfiguration(configuration); loader.loadSourceFiles(mapping); assertEquals(4l, loader.loadDf(getClass().getResourceAsStream("count.sql")).first().get(0)); Dataset<Row> dataset = loader.loadDf(getClass().getResourceAsStream("sort.sql")); assertEquals("Doctor B", dataset.first().get(0)); assertEquals("4", dataset.first().get(1)); assertEquals("Clinic", dataset.first().get(2)); assertEquals("Patient 3", dataset.first().get(3)); }