@Test
public void testJPEGTitleAndDescriptionXnviewmp() throws Exception {

    Metadata metadata = new Metadata();
    metadata.set(Metadata.CONTENT_TYPE, "image/jpeg");
    try (InputStream stream =
                 getClass().getResourceAsStream("/test-documents/testJPEG_commented_xnviewmp026.jpg")) {
        parser.parse(stream, new DefaultHandler(), metadata, new ParseContext());
    }
    // XnViewMp's default comment dialog has only comment, not headline.
    // Comment is embedded only if "Write comments in XMP" is enabled in settings
    assertEquals("Bird site in north eastern Sk\u00E5ne, Sweden.\n(new line)", metadata.get(TikaCoreProperties.DESCRIPTION));
    // xmp handles spaces in keywords, returns "bird watching, nature reserve, coast, grazelands"
    // but we have to replace them with underscore
    String[] subject = metadata.getValues(TikaCoreProperties.SUBJECT);
    List<String> keywords = Arrays.asList(subject);
    assertTrue("'coast'" + " not in " + keywords, keywords.contains("coast"));
    assertTrue("'nature reserve'" + " not in " + keywords, keywords.contains("nature reserve"));
}