* Tests serializing commands.
*
* @throws Exception
*/
public void testSerializeCommands() throws Exception {
GenericCommand gc = new GenericCommand();
ParameterDefinition def = new ParameterDefinition("hello", String.class.getName(),
new ParameterRenderingInformation("a", "b"));
gc.setCommandType(new CommandType("foo", 3));
gc.setParameterDefinitions(new ParameterDefinition[] { def });
gc.setParameterValue("hello", "world");
gc.getConfiguration().put("config1", "config1value");
gc.getConfiguration().put("config2", "config2value");
gc = (GenericCommand) serializeDeserialize(gc);
assert gc.getCommandType().equals(new CommandType("foo", 3));
assert gc.getParameterDefinition("hello").getType().equals(String.class.getName());
assert gc.getParameterDefinition("hello").getRenderingInfo().getLabelKey().equals("a");
assert gc.getParameterDefinition("hello").getRenderingInfo().getDescriptionKey().equals("b");
assert gc.getParameterValue("hello").equals("world");
assert gc.getConfiguration().getProperty("config1").equals("config1value");
assert gc.getConfiguration().getProperty("config2").equals("config2value");
return;
}