tst/com/amazon/kinesis/streaming/agent/tailing/testing/CopyFileRotator.java [42:57]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        super(dir, prefix);
    }

    @Override
    protected Path rotateOrCreateNewFile() throws IOException {
        // if there are old files, rotate their names
        if(activeFiles.size() > 1) {
            rotateFileName(1);
        }
        if(!activeFiles.isEmpty() && Files.exists(getFile(0))) {
            // if there's an existing file, copy/truncate it
            Path currentPath = getFile(0);
            Path rotatedPath = getFilePathAfterRotation(0);
            logger.debug("Copying contents of {} to {}", currentPath, rotatedPath);
            Files.copy(currentPath, rotatedPath);
            activeFiles.set(0, rotatedPath);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



tst/com/amazon/kinesis/streaming/agent/tailing/testing/TruncateFileRotator.java [30:45]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        super(dir, prefix);
    }

    @Override
    protected Path rotateOrCreateNewFile() throws IOException {
        // if there are old files, rotate their names
        if(activeFiles.size() > 1) {
            rotateFileName(1);
        }
        if(!activeFiles.isEmpty() && Files.exists(getFile(0))) {
            // if there's an existing file, copy/truncate it
            Path currentPath = getFile(0);
            Path rotatedPath = getFilePathAfterRotation(0);
            logger.debug("Copying contents of {} to {}", currentPath, rotatedPath);
            Files.copy(currentPath, rotatedPath);
            activeFiles.set(0, rotatedPath);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



