// Path: dbpatch-core/src/test/java/org/jsoftware/dbpatch/command/AbstractDbCommandTest.java
// public static String executeToString(ExecuteToStringCallback callback) throws Exception {
//     ByteArrayOutputStream out = new ByteArrayOutputStream();
//     callback.call(new PrintStream(out));
//     out.close();
//     return new String(out.toByteArray());
// }


import org.hamcrest.CoreMatchers;
import org.junit.Assert;
import org.junit.Test;
import java.io.PrintStream;
import static org.jsoftware.dbpatch.command.AbstractDbCommandTest.executeToString;
package org.jsoftware.dbpatch.command;




public class HelpCommandTest {

    static class ExecuteToStringCallbackHelpCmd implements AbstractDbCommandTest.ExecuteToStringCallback {
        private final HelpCommand helpCommand;
        ExecuteToStringCallbackHelpCmd(HelpCommand helpCommand) {this.helpCommand = helpCommand;}
        @Override
        public void call(PrintStream printStream) throws Exception {
           helpCommand.execute(printStream);
        }
    }

    @Test
    public void testStandalone() throws Exception {
        HelpCommand helpCommand = HelpCommand.helpCommandStandalone();
// Path: dbpatch-core/src/test/java/org/jsoftware/dbpatch/command/AbstractDbCommandTest.java
// public static String executeToString(ExecuteToStringCallback callback) throws Exception {
//     ByteArrayOutputStream out = new ByteArrayOutputStream();
//     callback.call(new PrintStream(out));
//     out.close();
//     return new String(out.toByteArray());
// }


// Path: dbpatch-core/src/test/java/org/jsoftware/dbpatch/command/HelpCommandTest.java
import org.hamcrest.CoreMatchers;
import org.junit.Assert;
import org.junit.Test;
import java.io.PrintStream;
import static org.jsoftware.dbpatch.command.AbstractDbCommandTest.executeToString;

package org.jsoftware.dbpatch.command;




public class HelpCommandTest {

    static class ExecuteToStringCallbackHelpCmd implements AbstractDbCommandTest.ExecuteToStringCallback {
        private final HelpCommand helpCommand;
        ExecuteToStringCallbackHelpCmd(HelpCommand helpCommand) {this.helpCommand = helpCommand;}
        @Override
        public void call(PrintStream printStream) throws Exception {
           helpCommand.execute(printStream);
        }
    }

    @Test
    public void testStandalone() throws Exception {
        HelpCommand helpCommand = HelpCommand.helpCommandStandalone();
        String out = executeToString(new ExecuteToStringCallbackHelpCmd(helpCommand));