@Test public void testGetCopyrightHeader() throws IOException { String path = "src/test/resources/CopyrightHeader.txt"; File testRsc = new File(path); FileInputStream in = new FileInputStream(testRsc); File testFile = new File("target/TestHeader.txt"); FileOutputStream out = new FileOutputStream(testFile); out.write(COPYRIGHTS_FIRST_LINE.getBytes()); int c = 0; while ((c = in.read()) != -1) { out.write(c); } String licenseHeader = getCopyrightHeader(); File test = new File("target/TestCopyrightHeader.txt"); FileWriter writer = new FileWriter(test); writer.write(licenseHeader); writer.close(); out.close(); out.flush(); in.close(); assertThat(true, is(contentEquals(test, testFile))); test.delete(); testFile.delete(); }
public static String getCopyrightHeader() throws IOException { if (copyrightHeader == null) { parseCopyrightHeader(); } return copyrightHeader; }
CopyrightHeader { public static String getCopyrightHeader() throws IOException { if (copyrightHeader == null) { parseCopyrightHeader(); } return copyrightHeader; } }
CopyrightHeader { public static String getCopyrightHeader() throws IOException { if (copyrightHeader == null) { parseCopyrightHeader(); } return copyrightHeader; } private  CopyrightHeader(); }
CopyrightHeader { public static String getCopyrightHeader() throws IOException { if (copyrightHeader == null) { parseCopyrightHeader(); } return copyrightHeader; } private  CopyrightHeader(); static String getCopyrightHeader(); }
CopyrightHeader { public static String getCopyrightHeader() throws IOException { if (copyrightHeader == null) { parseCopyrightHeader(); } return copyrightHeader; } private  CopyrightHeader(); static String getCopyrightHeader();  }