// Path: java/client/src/main/java/jp/co/rakuten/rit/roma/client/ClientException.java
// public class ClientException extends Exception {
//   private static final long serialVersionUID = -7032182229500031385L;
// 
//   public ClientException() {
//     super();
//   }
// 
//   public ClientException(Throwable cause) {
//     super(cause);
//   }
// 
//   public ClientException(String reason) {
//     super(reason);
//   }
// 
//   public ClientException(String reason, Throwable cause) {
//     super(reason, cause);
//   }
// }
// 
// Path: java/client/src/main/java/jp/co/rakuten/rit/roma/client/commands/AbstractCommand.java
// public abstract class AbstractCommand implements Command, CommandID {
//   protected Command next;
// 
//   protected AbstractCommand() {
//     this(null);
//   }
// 
//   protected AbstractCommand(Command next) {
//     this.next = next;
//   }
// 
//   public boolean execute(CommandContext context) throws ClientException {
//     try {
//       StringBuilder sb = new StringBuilder();
//       context.put(CommandContext.STRING_DATA, sb);
//       create(context);
//       sendAndReceive(context);
//       return parseResult(context);
//     } catch (IOException e) {
//       throw new ClientException(e);
//     }
//   }
// 
//   protected abstract void create(CommandContext context) throws ClientException;
// 
//   protected abstract void sendAndReceive(CommandContext context)
//       throws IOException, ClientException;
// 
//   protected abstract boolean parseResult(CommandContext context)
//       throws ClientException;
// }


import java.io.IOException;
import jp.co.rakuten.rit.roma.client.ClientException;
import jp.co.rakuten.rit.roma.client.commands.AbstractCommand;
import junit.framework.TestCase;

package jp.co.rakuten.rit.roma.client.commands;




public class CommandFactoryImplTest extends TestCase {
  public void testDummy() {
    assertTrue(true);
  }

  public void XtestCreateCommand() throws Exception {
    TimeoutFilter.timeout = 10;
    CommandContext context = new CommandContext();
    context.put(CommandContext.CONNECTION_POOL, new MockConnectionPool());
    CommandFactoryImpl fact = new CommandFactoryImpl();
    fact.createCommand(1, new FailOverFilter(new TimeoutFilter(
        new TestCommand())));
    Command command = fact.getCommand(1);
    command.execute(context);
  }

  public static class TestCommand extends AbstractCommand {

    @Override

// Path: java/client/src/main/java/jp/co/rakuten/rit/roma/client/ClientException.java
// public class ClientException extends Exception {
//   private static final long serialVersionUID = -7032182229500031385L;
// 
//   public ClientException() {
//     super();
//   }
// 
//   public ClientException(Throwable cause) {
//     super(cause);
//   }
// 
//   public ClientException(String reason) {
//     super(reason);
//   }
// 
//   public ClientException(String reason, Throwable cause) {
//     super(reason, cause);
//   }
// }
// 
// Path: java/client/src/main/java/jp/co/rakuten/rit/roma/client/commands/AbstractCommand.java
// public abstract class AbstractCommand implements Command, CommandID {
//   protected Command next;
// 
//   protected AbstractCommand() {
//     this(null);
//   }
// 
//   protected AbstractCommand(Command next) {
//     this.next = next;
//   }
// 
//   public boolean execute(CommandContext context) throws ClientException {
//     try {
//       StringBuilder sb = new StringBuilder();
//       context.put(CommandContext.STRING_DATA, sb);
//       create(context);
//       sendAndReceive(context);
//       return parseResult(context);
//     } catch (IOException e) {
//       throw new ClientException(e);
//     }
//   }
// 
//   protected abstract void create(CommandContext context) throws ClientException;
// 
//   protected abstract void sendAndReceive(CommandContext context)
//       throws IOException, ClientException;
// 
//   protected abstract boolean parseResult(CommandContext context)
//       throws ClientException;
// }


// Path: java/client/src/test/java/jp/co/rakuten/rit/roma/client/commands/CommandFactoryImplTest.java
import java.io.IOException;
import jp.co.rakuten.rit.roma.client.ClientException;
import jp.co.rakuten.rit.roma.client.commands.AbstractCommand;
import junit.framework.TestCase;

package jp.co.rakuten.rit.roma.client.commands;




public class CommandFactoryImplTest extends TestCase {
  public void testDummy() {
    assertTrue(true);
  }

  public void XtestCreateCommand() throws Exception {
    TimeoutFilter.timeout = 10;
    CommandContext context = new CommandContext();
    context.put(CommandContext.CONNECTION_POOL, new MockConnectionPool());
    CommandFactoryImpl fact = new CommandFactoryImpl();
    fact.createCommand(1, new FailOverFilter(new TimeoutFilter(
        new TestCommand())));
    Command command = fact.getCommand(1);
    command.execute(context);
  }

  public static class TestCommand extends AbstractCommand {

    @Override

    public boolean execute(CommandContext context) throws ClientException {
