Added some tests for CommandResult.Apply
Added tests for CommandResult and handle resulting Principal