@Before
public void setUp() throws JpegProcessingException, IOException
{
// use a known testing image
File jpegFile = new File("Tests/com/drew/metadata/jpeg/simple.jpg");
final byte[] data = new JpegSegmentReader(jpegFile).readSegment(JpegSegmentReader.SEGMENT_SOF0);
MetadataReader reader = new JpegReader();
Metadata metadata = new Metadata();
Assert.assertNotNull(data);
reader.extract(new ByteArrayReader(data), metadata);
Assert.assertTrue(metadata.containsDirectory(JpegDirectory.class));