@Test public void testIsEncryptedFileFalse() throws Exception { File tempDirectory = TestFileUtil.createTempDirectoryInSystemTemp(); File testFile = new File(tempDirectory + "/somefile"); FileUtil.writeToFile(new byte[] {1, 2, 3}, testFile); assertFalse(CipherUtil.isEncrypted(testFile)); TestFileUtil.deleteDirectory(tempDirectory); }
public static void writeToFile(byte[] bytes, File file) throws IOException { writeToFile(new ByteArrayInputStream(bytes), file); }