@Test
public void verifyMandatoryCheckFailsOnMandatoryDataElement()
{

    event.setProgramStage( "prgstg1" );
    DataElement de1 = addToDataElementMap( createDataElement( 'A' ) );
    DataElement de2 = addToDataElementMap( createDataElement( 'B' ) );
    DataElement de3 = addToDataElementMap( createDataElement( 'C' ) );
    programStageA.setProgramStageDataElements( Sets.newHashSet(
        createProgramStageDataElement( programStageA, de1, 1, true ),
        createProgramStageDataElement( programStageA, de2, 2, true ),
        createProgramStageDataElement( programStageA, de3, 3, true ) ) );
    addToDataValueMap( event.getUid(),
        createEventDataValue( de1.getUid(), "1" ),
        createEventDataValue( de2.getUid(), "2" ) );
    DataValue dv1 = createDataValue( de1.getUid(), "1" );
    DataValue dv2 = createDataValue( de2.getUid(), "2" );
    event.setDataValues( Sets.newHashSet( dv1, dv2 ) );
    final ImportSummary summary = rule.check( new ImmutableEvent( event ), this.workContext );
    assertHasError( summary, event, null );
    assertThat( summary.getConflicts(), hasSize( 1 ) );
    assertThat( summary.getConflicts().iterator().next().getValue(), is( "value_required_but_not_provided" ) );
    assertThat( summary.getConflicts().iterator().next().getObject(), is( de3.getUid() ) );
}