### Question:
ExportsBuilder { void constructJdkExports(StringBuilder sb, String packageListPath) { InputStream in = null; try { in = ClassLoaderUtils.getResourceAsStream(packageListPath, ExportsBuilder.class); BufferedReader reader = new BufferedReader(new InputStreamReader(in)); String line; while ((line = reader.readLine()) != null) { line = line.trim(); if (line.length() > 0) { if (line.charAt(0) != '#') { if (sb.length() > 0) sb.append(','); sb.append(line); } } } } catch (IOException e) { IOUtils.closeQuietly(in); } }  String getExports(List<HostComponentRegistration> regs, PackageScannerConfiguration packageScannerConfig); @SuppressWarnings({"UnusedDeclaration"}) String determineExports(List<HostComponentRegistration> regs, PackageScannerConfiguration packageScannerConfig, File cacheDir);  }### Answer:
@Test public void testConstructJdkExports() { StringBuilder sb = new StringBuilder(); builder.constructJdkExports(sb, "jdk-packages.test.txt"); assertEquals("foo.bar,foo.baz", sb.toString()); sb = new StringBuilder(); builder.constructJdkExports(sb, ExportsBuilder.JDK_PACKAGES_PATH); assertTrue(sb.toString().contains("org.xml.sax")); }