protected void handle(com.drew.metadata.Metadata metadataExtractor) throws MetadataException {
        handle(metadataExtractor.getDirectories().iterator());
    }
@Test
    public void testExifHandlerParseDateError() throws MetadataException {
        ExifIFD0Directory exif = Mockito.mock(ExifIFD0Directory.class);
        Mockito.when(exif.containsTag(ExifSubIFDDirectory.TAG_DATETIME_ORIGINAL)).thenReturn(true);
        Mockito.when(exif.getDate(ExifSubIFDDirectory.TAG_DATETIME_ORIGINAL)).thenReturn(null);
        Metadata metadata = new Metadata();

        new ImageMetadataExtractor.ExifHandler().handle(exif, metadata);
        assertNull(metadata.get(TikaCoreProperties.CREATED),
                "Parsing should proceed without date");
    }