{
result = createInstance( dc, getDefaultInstanceName(),
MAIL_RESOURCE_HOST, MAIL_RESOURCE_USER, MAIL_RESOURCE_FROM, OPTIONS);
assert ! result.getEnabled();
final StandaloneServerConfig serverConfig = dc.getStandaloneServerConfigMap().get( "server" );
final Map<String,String> options = new HashMap<String,String>();
options.put( ResourceConfigKeys.ENABLED_KEY, "false" );
final ResourceRefConfig ref = serverConfig.createResourceRefConfig( result.getName(), options );
assert ! ref.getEnabled();
RefHelper.removeAllRefsTo( result, false );
}