I have noticed that at the moment we don't have a solution for how to deal with server changes that need to happen before the deployment (e.g. adding a security domain).
At the moment this is hacked up by having the @Deployment method connect with a hard coded URL, and performing any setup it needs to do.
If you need to do any setup in your test class you simply annotate it @ServerSetup(MySetupClass.class) (where MySetupClass implements ServerSetupTask).
You can then do any server setup/cleanup necessary in your MySetupClass using the ManagementClient that is passed to the method.
At the moment the implementation is quite simple (only one action per test, superclasses are not examined etc) but if more functionality is required it should be fairly easy to implement.
Stuart