Added factory methods for Batch Command and tests