private static void assertFiles(final File expected,
            final File actual) {
        String actualLine, expectedLine, trimmedLine;
        BufferedReader expectedR = null, actualR = null;
        try {
            expectedR = new BufferedReader(new FileReader(expected));
            actualR = new BufferedReader(new FileReader(actual));
            while ((expectedLine = expectedR.readLine()) != null) {
                actualLine = actualR.readLine();
                assertNotNull("Expected had more lines then the actual.", actualLine);

                trimmedLine = expectedLine.trim();
                if (!trimmedLine.startsWith("<Time>") && !trimmedLine.endsWith("ID>")) {
                    assertEquals(expectedLine.trim(), actualLine.trim());
                }
            }
            assertNull("Actual had more lines then the expected.", actualR.readLine());
        } catch (IOException ex) {
            fail("Could not access tested files - " + ex.getLocalizedMessage());
        } finally {
            if (expectedR != null) {
                try {
                    expectedR.close();
                } catch (IOException ex) {
                    Logger.getLogger(HistoryTest.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
            if (actualR != null) {
                try {
                    actualR.close();
                } catch (IOException ex) {
                    Logger.getLogger(HistoryTest.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
        }
    }