@Test
public void verifyCheckUsingAttributeScheme()
{

    event.setOrgUnit( "blue" );
    // Prepare data
    Program program = createProgram( 'P' );
    // make sure that one of the generate Org Units, has the event's UID
    program.setOrganisationUnits(
        create( 3, CodeGenerator.generateUid(), IdScheme.UID ) );
    OrganisationUnit ou = createOrganisationUnit( RandomStringUtils.randomAlphabetic( 1 ) );
    Attribute attribute = new Attribute( "color", ValueType.TEXT );
    attribute.setUid( CodeGenerator.generateUid() );
    AttributeValue attributeValue = new AttributeValue( attribute, "blue" );
    ou.setAttributeValues( Collections.singleton( attributeValue ) );
    program.getOrganisationUnits().add( ou );
    ProgramInstance pi = new ProgramInstance();
    pi.setProgram( program );
    Map<String, ProgramInstance> programInstanceMap = new HashMap<>();
    programInstanceMap.put( event.getUid(), pi );
    when( workContext.getProgramInstanceMap() ).thenReturn( programInstanceMap );
    ImportOptions importOptions = ImportOptions.getDefaultImportOptions();
    importOptions.setOrgUnitIdScheme( IdScheme.ATTR_ID_SCHEME_PREFIX + attribute.getUid() );
    when( workContext.getImportOptions() ).thenReturn( importOptions );
    // method under test
    ImportSummary summary = rule.check( new ImmutableEvent( event ), workContext );
    assertNoError( summary );
}