@Test
public void failWhenEventHasNoCompletedDateAndProgramHasExpiryDays()
{

    // Given
    // Prepare program
    Program program = createProgram( 'P' );
    program.setCompleteEventsExpiryDays( 3 );
    Map<String, Program> programMap = new HashMap<>();
    programMap.put( program.getUid(), program );
    when( workContext.getProgramsMap() ).thenReturn( programMap );
    // Prepare event
    event.setProgram( program.getUid() );
    event.setStatus( EventStatus.COMPLETED );
    // When
    ImportSummary importSummary = rule.check( new ImmutableEvent( event ), workContext );
    // Then
    assertHasError( importSummary, event, "Event needs to have completed date" );
}