@Test
    public void testFilenameCreation() throws IOException {
        File tmpDir = temporaryFolder.newFolder();
        try {
            ArchiverHandler a = new ArchiverHandler(tmpDir.getAbsolutePath(),
                                                    1024, "gzip");
            LogMessage msg1 = LogMessage.parseNativeFormat("1139322725\thost\t1/1\tservice\tcomponent\tinfo\tpayload");
            LogMessage msg2 = LogMessage.parseNativeFormat("1161172200\thost\t1/1\tservice\tcomponent\tinfo\tpayload");
            assertEquals(tmpDir.getAbsolutePath() + "/2006/02/07/14", a.getPrefix(msg1));
            assertEquals(tmpDir.getAbsolutePath() + "/2006/10/18/11", a.getPrefix(msg2));
            assertEquals(a.getPrefix(msg1).length(), a.getPrefix(msg2).length());
            a.close();
        } catch (InvalidLogFormatException e) {
            fail(e.toString());
        }
    }
Test that the ArchiverHandler creates correct filenames.
logserver/src/test/java/com/yahoo/logserver/handlers/archive/ArchiverHandlerTestCase.java