Source:
<code>public void should_not_change_other_organizations() throws Exception { OrganizationDto organization1 = OrganizationTesting.newOrganizationDto(); <START> db.organizations().insert(organization1); <END> OrganizationDto organization2 = OrganizationTesting.newOrganizationDto(); db.organizations().insert(organization2); userSessionRule .logIn() .addPermission(ADMINISTER_QUALITY_PROFILES, organization1.getUuid()); QualityProfileDto profileOrg1Old = QualityProfileTesting.newQualityProfileDto() .setOrganizationUuid(organization1.getUuid()) .setLanguage(xoo1Key) .setDefault(true); QualityProfileDto profileOrg1New = QualityProfileTesting.newQualityProfileDto() .setOrganizationUuid(organization1.getUuid()) .setLanguage(xoo1Key) .setDefault(false); QualityProfileDto profileOrg2 = QualityProfileTesting.newQualityProfileDto() .setOrganizationUuid(organization2.getUuid()) .setLanguage(xoo1Key) .setDefault(true); db.qualityProfiles().insertQualityProfiles(profileOrg1Old, profileOrg1New, profileOrg2); checkDefaultProfile(organization1, xoo1Key, profileOrg1Old.getKey()); checkDefaultProfile(organization2, xoo1Key, profileOrg2.getKey()); TestResponse response = tester.newRequest().setMethod("POST") .setParam("language", profileOrg1New.getLanguage()) .setParam("profileName", profileOrg1New.getName()) .setParam("organization", organization1.getKey()) .execute(); assertThat(response.getInput()).isEmpty(); assertThat(response.getStatus()).isEqualTo(204); checkDefaultProfile(organization1, xoo1Key, profileOrg1New.getKey()); checkDefaultProfile(organization2, xoo1Key, profileOrg2.getKee()); }</code><technical_language>simply replaced by: OrganizationDto organization1 = db.organizations().insert();</technical_language>

Target:
public void should_not_change_other_organizations() throws Exception { OrganizationDto organization1 = db.organizations().insert(); OrganizationDto organization2 = db.organizations().insert(); userSessionRule .logIn() .addPermission(ADMINISTER_QUALITY_PROFILES, organization1.getUuid()); QualityProfileDto profileOrg1Old = QualityProfileTesting.newQualityProfileDto() .setOrganizationUuid(organization1.getUuid()) .setLanguage(xoo1Key) .setDefault(true); QualityProfileDto profileOrg1New = QualityProfileTesting.newQualityProfileDto() .setOrganizationUuid(organization1.getUuid()) .setLanguage(xoo1Key) .setDefault(false); QualityProfileDto profileOrg2 = QualityProfileTesting.newQualityProfileDto() .setOrganizationUuid(organization2.getUuid()) .setLanguage(xoo1Key) .setDefault(true); db.qualityProfiles().insertQualityProfiles(profileOrg1Old, profileOrg1New, profileOrg2); checkDefaultProfile(organization1, xoo1Key, profileOrg1Old.getKey()); checkDefaultProfile(organization2, xoo1Key, profileOrg2.getKey()); TestResponse response = tester.newRequest().setMethod("POST") .setParam("language", profileOrg1New.getLanguage()) .setParam("profileName", profileOrg1New.getName()) .setParam("organization", organization1.getKey()) .execute(); assertThat(response.getInput()).isEmpty(); assertThat(response.getStatus()).isEqualTo(204); checkDefaultProfile(organization1, xoo1Key, profileOrg1New.getKey()); checkDefaultProfile(organization2, xoo1Key, profileOrg2.getKee()); }