@Test
public void testParse() throws IOException {

    final File wal = File.createTempFile("wal", "");
    wal.deleteOnExit();
    final File walArchive = File.createTempFile("wal_archive", "");
    walArchive.deleteOnExit();
    final File binaryMetadataDir = new File(System.getProperty("java.io.tmpdir"));
    final File marshallerDir = binaryMetadataDir;
    final String[] args = {
        "--wal-dir", wal.getAbsolutePath(),
        "--wal-archive-dir", walArchive.getAbsolutePath(),
        "--page-size", "2048",
        "--binary-metadata-dir", binaryMetadataDir.getAbsolutePath(),
        "--marshaller-mapping-dir", marshallerDir.getAbsolutePath(),
        "--unwrap-binary",
        "--record-types", "DATA_RECORD,TX_RECORD",
        "--wal-time-from-millis", "1575158400000",
        "--wal-time-to-millis", "1577836740999",
        "--has-text", "search string",
        "--include-sensitive", "HASH",
        "--print-stat",
        "--skip-crc"};
    final IgniteWalConverterArguments parseArgs = IgniteWalConverterArguments.parse(System.out, args);
    Assert.assertEquals(wal, parseArgs.getWalDir());
    Assert.assertEquals(walArchive, parseArgs.getWalArchiveDir());
    Assert.assertEquals(2048, parseArgs.getPageSize());
    Assert.assertEquals(binaryMetadataDir, parseArgs.getBinaryMetadataDir());
    Assert.assertEquals(marshallerDir, parseArgs.getMarshallerMappingDir());
    Assert.assertTrue(parseArgs.isUnwrapBinary());
    Assert.assertTrue(parseArgs.getRecordTypes().contains(WALRecord.RecordType.DATA_RECORD));
    Assert.assertTrue(parseArgs.getRecordTypes().contains(WALRecord.RecordType.TX_RECORD));
    Assert.assertEquals(1575158400000L, (long)parseArgs.getFromTime());
    Assert.assertEquals(1577836740999L, (long)parseArgs.getToTime());
    Assert.assertEquals("search string", parseArgs.hasText());
    Assert.assertEquals(ProcessSensitiveData.HASH, parseArgs.includeSensitive());
    Assert.assertTrue(parseArgs.isPrintStat());
    Assert.assertTrue(parseArgs.isSkipCrc());
}