@Test
public void testValidateWithErrorMandatoryFieldsForEvents()
    throws IOException
{

    TrackerBundleParams bundleParams = createBundleFromJson(
        "tracker/event_events_and_enrollment_with_null_data_element.json" );
    TrackerBundle trackerBundle = trackerBundleService.create( bundleParams );
    trackerBundle = trackerBundleService.runRuleEngine( trackerBundle );
    Map<String, List<String>> errors = implementerToTest.validateEvents( trackerBundle );
    assertFalse( errors.isEmpty() );
    errors.entrySet().stream()
        .filter( e -> !e.getKey().equals( "D9PbzJY8bJO" ) )
        .forEach( e -> assertTrue( e.getValue().isEmpty() ) );
    errors.entrySet().stream()
        .filter( e -> e.getKey().equals( "D9PbzJY8bJO" ) )
        .forEach( e -> assertTrue( e.getValue().size() == 1 ) );
}