 ===================================================================
 --- ports/classes/net/xp_framework/unittest/img/IptcDataTest.class.php	(revision 0)
 +++ ports/classes/net/xp_framework/unittest/img/IptcDataTest.class.php	(revision 0)
-@@ -0,0 +1,87 @@
+@@ -0,0 +1,78 @@
 +<?php
 +/* This class is part of the XP framework
 + *
 + * $Id$ 
 + */
 +
-+  uses(
-+    'unittest.TestCase',
-+    'io.streams.Streams',
-+    'io.streams.MemoryInputStream',
-+    'img.util.IptcData',
-+    'io.File'
-+  );
++  uses('net.xp_framework.unittest.img.MetaDataTest', 'img.util.IptcData');
 +
 +  /**
-+   * TestCase
++   * TestCase for IptcData class
 +   *
++   * @see      xp://net.xp_framework.unittest.img.MetaDataTest
 +   * @see      xp://img.util.IptcData
 +   * @purpose  Unittest
 +   */
-+  class IptcDataTest extends TestCase {
++  class IptcDataTest extends MetaDataTest {
++
++    /**
++     * Extract from file and return the instance
++     *
++     * @param   io.File f
++     * @return  lang.Generic the instance
++     */
++    protected function extractFromFile(File $f) {
++      return IptcData::fromFile($f);
++    }
++
++    /**
++     * Test default value is returned if no IPTC data is found
++     *
++     */
++    #[@test]
++    public function defaultValueIfNotFound() {
++      $this->assertNull(IptcData::fromFile($this->resourceAsFile('exif-only.jpg'), NULL));
++    }
++
++    /**
++     * Test empty IPTC data
++     *
++     */
++    #[@test]
++    public function emptyIptcData() {
++      $this->assertEquals('', IptcData::$EMPTY->getTitle());
++    }
 +  
-+    /**
-+     * Returns a file for a classloader resource
-+     *
-+     * @param   string name
-+     * @return  io.File
-+     */
-+    protected function resourceAsFile($name) {
-+      return Streams::readableFile(
-+        new MemoryInputStream($this->getClass()->getPackage()->getResource($name)), 
-+        FALSE
-+      );
-+    }
-+  
-+    /**
-+     * Test reading IPTC data from this file (which is definitely not an
-+     * image)
-+     *
-+     */
-+    #[@test, @expect('img.ImagingException')]
-+    public function fromNonImageFile() {
-+      IptcData::fromFile(new File(__FILE__));
-+    }
-+
-+    /**
-+     * Test reading IPTC data from an empty file
-+     *
-+     */
-+    #[@test, @expect('img.ImagingException')]
-+    public function fromEmptyFile() {
-+      IptcData::fromFile($this->resourceAsFile('empty.jpg'));
-+    }
-+
 +    /**
 +     * Test reading IPTC data from a file which contains exif-data
 +     * only

       
       // Parse creation date
       if (3 == sscanf($iptc['2#055'][0], '%4d%2d%d', $year, $month, $day)) {
@@ -65,25 +88,25 @@
       }
 
       with ($i= new self()); {

+     */
+    #[@test, @expect('lang.ElementNotFoundException')]
+    public function fromFileWithoutExif() {
+      $this->extractFromFile($this->resourceAsFile('iptc-only.jpg'));
+    }
+
+    /**
