@Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        return StringUtils.equals(filePath, ((FlatMessageFile) obj).filePath);
    }
@Test
    public void testEquals() {
        String topic = "EqualsTest";
        FlatMessageFile flatFile1 = new FlatMessageFile(flatFileFactory, topic, 0);
        FlatMessageFile flatFile2 = new FlatMessageFile(flatFileFactory, topic, 0);
        FlatMessageFile flatFile3 = new FlatMessageFile(flatFileFactory, topic, 1);
        Assert.assertEquals(flatFile1, flatFile2);
        Assert.assertEquals(flatFile1.hashCode(), flatFile2.hashCode());
        Assert.assertNotEquals(flatFile1, flatFile3);

        flatFile1.shutdown();
        flatFile2.shutdown();
        flatFile3.shutdown();

        flatFile1.destroy();
        flatFile2.destroy();
        flatFile3.destroy();
    }