### Question:
ExternalResources { public static void copyExternalResource(File sourceFile, File destFile) throws IOException { if (!destFile.exists()) { destFile.createNewFile(); } try (FileInputStream source = new FileInputStream(sourceFile); FileOutputStream destination = new FileOutputStream(destFile)) { destination.getChannel().transferFrom(source.getChannel(), 0, source.getChannel().size()); } } private  ExternalResources(); static void copyExternalResource(File sourceFile, File destFile); static String getConfiguredTemplate(String templatePath, String templateProperty);  }### Answer:
@Test void testcopyExternalResource() { try { ExternalResources.copyExternalResource(sourceFile, destFile); } catch (IOException e) { } }
@Test void testcopyExternalResource_fileNotFound() { try { badFile = new File("/tmp/nofile.sql"); ExternalResources.copyExternalResource(badFile, destFile); } catch (IOException e) { assertTrue(e instanceof FileNotFoundException); } }
@Test void testcopyExternalResource_emptyStringAsFile() { try { badFile = new File(" "); ExternalResources.copyExternalResource(badFile, destFile); } catch (Exception e) { assertTrue(e instanceof FileNotFoundException); } }