/**
* Test create command.
*/
public void testCreateCommand() {
AbstractBaseMojo testMojo = createTestMojo();
ClownfishHelperImpl clownfishHelper = new ClownfishHelperImpl();
CommandFactoryImpl commandFactory = new CommandFactoryImpl();
commandFactory.setClownfishHelper(clownfishHelper);
Command command = commandFactory.createCommand(testMojo);
assertNotNull(command);
assertEquals("artifact", command.getArtifact());
assertEquals("deploymentFactoryManagerClassName",
command.getDeploymentFactoryManagerClassName());
assertEquals("deploymentManagerUri", command.getDeploymentManagerURI());
assertEquals("password", command.getPassword());
assertEquals("username", command.getUsername());
assertTrue(command.isVerbose());
assertEquals(3, command.getTargetList().size());
assertEquals("server1", command.getTargetList().get(0));
assertEquals("server2", command.getTargetList().get(1));
assertEquals("server3", command.getTargetList().get(2));
assertEquals("ear", command.getModuleType());
// test null module type
testMojo.setModuleType(null);
command = commandFactory.createCommand(testMojo);
assertNull(command.getModuleType());
// test empty module type
testMojo.setModuleType("");
command = commandFactory.createCommand(testMojo);
assertNull(command.getModuleType());
}