class HistoryCommand extends AbstractCommand {

    private Database database;
    private final DateFormat dateFormat;
    private HistoryFormat format;
    private PrintStream outputStream = System.out;

    public HistoryCommand() {
        dateFormat = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT);
    }

    @Override
    public String getName() {
        return "history";
    }

    @Override
    public CommandValidationErrors validate() {
        return new CommandValidationErrors(this);
    }

    public Database getDatabase() {
        return database;
    }

    public void setDatabase(Database database) {
        this.database = database;
    }

    public PrintStream getOutputStream() {
        return outputStream;
    }

    public void setOutputStream(PrintStream outputStream) {
        this.outputStream = outputStream;
    }

    @Override
    public CommandResult run() throws Exception {<FILL_FUNCTION_BODY>}
}

        final CommandScope commandScope = new CommandScope("internalHistory");
        commandScope.setOutput(getOutputStream());

        commandScope.addArgumentValue(InternalHistoryCommandStep.DATABASE_ARG, this.getDatabase());
        commandScope.addArgumentValue(InternalHistoryCommandStep.DATE_FORMAT_ARG, this.dateFormat);
        commandScope.addArgumentValue(InternalHistoryCommandStep.FORMAT_ARG, this.format);

        commandScope.execute();

        return new CommandResult("OK");
    
<methods>public non-sealed void <init>() ,public SortedSet#RAW getArguments() ,public int getPriority(java.lang.String) <variables>