Source:
public void testAddGroupWithImplicitDirectoryName ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( VdcQueryType.GetDomainList , org.ovirt.engine.core.common.queries.VdcQueryParametersBase.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , setUpDomains ( ) ) ; setUpGetEntityExpectations ( ( ( ( "ADGROUP@" + ( DOMAIN ) ) + ":: name=" ) + ( org.ovirt.engine.api.restapi.resource.aaa.BackendGroupsResourceTest.GROUP_NAMES_WITH_NO_DOMAIN [ 0 ] ) ) , SearchType.DirectoryGroup , getDirectoryGroup ( 0 ) ) ; setUpCreationExpectations ( VdcActionType.AddGroup , org.ovirt.engine.core.common.action.AddGroupParameters.class , new java.lang.String [ ] { "GroupToAdd" } , new java.lang.Object [ ] { new org.ovirt.engine.core.common.businessentities.aaa.DbGroup ( getDirectoryGroup ( 0 ) ) } , true , true , GUIDS [ 0 ] , VdcQueryType.GetDbGroupById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { GUIDS [ 0 ] } , getEntity ( 0 ) ) ; org.ovirt.engine.api.model.Group model = new org.ovirt.engine.api.model.Group ( ) ; model.setName ( org.ovirt.engine.api.restapi.resource.aaa.BackendGroupsResourceTest.GROUP_NAMES [ 0 ] ) ; javax.ws.rs.core.Response response = collection.add ( model ) ; assertEquals ( 201 , response.getStatus ( ) ) ; assertTrue ( ( ( response.getEntity ( ) ) instanceof org.ovirt.engine.api.model.Group ) ) ; verifyModel ( ( ( org.ovirt.engine.api.model.Group ) ( response.getEntity ( ) ) ) , 0 ) ; }

Target:
public void testAddGroupWithExplicitDirectoryName ( ) throws java.lang.Exception { setUriInfo ( setUpBasicUriExpectations ( ) ) ; setUpEntityQueryExpectations ( VdcQueryType.GetDomainList , org.ovirt.engine.core.common.queries.VdcQueryParametersBase.class , new java.lang.String [ ] { } , new java.lang.Object [ ] { } , setUpDomains ( ) ) ; setUpGetEntityExpectations ( ( ( ( "ADGROUP@" + ( DOMAIN ) ) + ":: name=" ) + ( org.ovirt.engine.api.restapi.resource.aaa.BackendGroupsResourceTest.GROUP_NAMES_WITH_NO_DOMAIN [ 0 ] ) ) , SearchType.DirectoryGroup , getDirectoryGroup ( 0 ) ) ; org.ovirt.engine.core.common.businessentities.aaa.DbGroup dbGroup = new org.ovirt.engine.core.common.businessentities.aaa.DbGroup ( getDirectoryGroup ( 0 ) ) ; setUpCreationExpectations ( VdcActionType.AddGroup , org.ovirt.engine.core.common.action.AddGroupParameters.class , new java.lang.String [ ] { "GroupToAdd" } , new java.lang.Object [ ] { dbGroup } , true , true , dbGroup.getId ( ) , VdcQueryType.GetDbGroupById , org.ovirt.engine.core.common.queries.IdQueryParameters.class , new java.lang.String [ ] { "Id" } , new java.lang.Object [ ] { dbGroup.getId ( ) } , getEntity ( 0 ) ) ; org.ovirt.engine.api.model.Domain domain = new org.ovirt.engine.api.model.Domain ( ) ; domain.setName ( org.ovirt.engine.api.restapi.resource.aaa.DOMAIN ) ; domain.setId ( org.ovirt.engine.api.restapi.utils.DirectoryEntryIdUtils.encode ( domain.getName ( ) ) ) ; org.ovirt.engine.api.model.Group model = new org.ovirt.engine.api.model.Group ( ) ; model.setName ( org.ovirt.engine.api.restapi.resource.aaa.BackendGroupsResourceTest.GROUP_NAMES_WITH_NO_DOMAIN [ 0 ] ) ; model.setDomain ( domain ) ; javax.ws.rs.core.Response response = collection.add ( model ) ; assertEquals ( 201 , response.getStatus ( ) ) ; assertTrue ( ( ( response.getEntity ( ) ) instanceof org.ovirt.engine.api.model.Group ) ) ; verifyModel ( ( ( org.ovirt.engine.api.model.Group ) ( response.getEntity ( ) ) ) , 0 ) ; }