### Question:
ExecCmd extends AbstractIRODSPackingInstruction { public static final ExecCmd instanceWithCommandPriorTo25(final String commandToExecuteWithoutArguments, final String argumentsToPassWithCommand) throws JargonException { return new ExecCmd(STANDARD_EXEC_ENCAPSULATE_DATA_IN_RESPONSE_API_NBR, commandToExecuteWithoutArguments, argumentsToPassWithCommand, "", "", true, PathHandlingMode.NONE); } private  ExecCmd(final int apiNumber, final String commandToExecuteWithoutArguments,
			final String argumentsToPassWithCommand, final String executionHost,
			final String absolutePathOfIrodsFileThatWillBeUsedToFindHostToExecuteOn,
			final boolean useBackwardCompatableInstruction, final PathHandlingMode pathHandlingMode); @Override String toString(); static final ExecCmd instanceWithCommandPriorTo25(final String commandToExecuteWithoutArguments,
			final String argumentsToPassWithCommand); static final ExecCmd instanceWithCommandPost25(final String commandToExecuteWithoutArguments,
			final String argumentsToPassWithCommand); static final ExecCmd instanceWithCommandAllowingStreamingForLargeResultsPost25(
			final String commandToExecuteWithoutArguments, final String argumentsToPassWithCommand); static final ExecCmd instanceWithHostAndArgumentsToPassParametersPriorTo25(
			final String commandToExecuteWithoutArguments, final String argumentsToPassWithCommand,
			final String executionHost, final String absolutePathOfIrodsFileThatWillBeUsedToFindHostToExecuteOn,
			final PathHandlingMode pathHandlingMode); static final ExecCmd instanceWithHostAndArgumentsToPassParametersPost25(
			final String commandToExecuteWithoutArguments, final String argumentsToPassWithCommand,
			final String executionHost, final String absolutePathOfIrodsFileThatWillBeUsedToFindHostToExecuteOn,
			final PathHandlingMode pathHandlingMode); static final ExecCmd instanceWithHostAndArgumentsToPassParametersAllowingStreamingForLargeResultsPost25(
			final String commandToExecuteWithoutArguments, final String argumentsToPassWithCommand,
			final String executionHost, final String absolutePathOfIrodsFileThatWillBeUsedToFindHostToExecuteOn,
			final PathHandlingMode pathHandlingMode); @Override Tag getTagValue(); String getCommandToExecuteWithoutArguments(); String getArgumentsToPassWithCommand(); String getExecutionHost(); String getAbsolutePathOfIrodsFileThatWillBeUsedToFindHostToExecuteOn(); static final String PI_TAG; static final String PI_TAG_BACKWORD_COMPATABLE; static final int STANDARD_EXEC_ENCAPSULATE_DATA_IN_RESPONSE_API_NBR; static final int EXEC_AND_USE_ENHANCED_STREAM; static final String CMD; static final String CMD_ARGV; static final String EXEC_ADDR; static final String HINT_PATH; static final String ADD_PATH_TO_ARGV; static final String STREAM_STDOUT_KW; static final String DUMMY; static final int ADD_PATH_TO_ARGV_WHEN_USING_PATH_TO_ADD_ARGUMENT; static final int ADD_PATH_TO_ARGV_WHEN_USING_PATH_TO_RESOLVE_HOST; static final int ADD_PATH_TO_ARGV_DEFAULT; }### Answer:
@Test public void testInstance() throws Exception { String cmd = "hello"; String args = ""; ExecCmd execCmd = ExecCmd.instanceWithCommandPriorTo25(cmd, args); Assert.assertNotNull("basic check fails, null returned from PI initializer", execCmd); Assert.assertEquals("api number not set", ExecCmd.STANDARD_EXEC_ENCAPSULATE_DATA_IN_RESPONSE_API_NBR, execCmd.getApiNumber()); }
@Test(expected = IllegalArgumentException.class) public void testInstanceNullCommand() throws Exception { String cmd = null; String args = ""; ExecCmd.instanceWithCommandPriorTo25(cmd, args); }
@Test(expected = IllegalArgumentException.class) public void testInstanceNullArgs() throws Exception { String cmd = "hello"; String args = null; ExecCmd.instanceWithCommandPriorTo25(cmd, args); }