@Test
public void testAddMetadata() throws Exception {

    reader.addMetadata(product);
    final MetadataElement globalAttributes = product.getMetadataRoot().getElementAt(0);
    assertNotNull(globalAttributes);
    final MetadataAttribute[] attributes = globalAttributes.getAttributes();
    assertEquals(5, attributes.length);
    assertEquals("title", attributes[0].getName());
    assertEquals("Global Aerosol - Absorbing Aerosol Index", attributes[0].getData().getElemString());
    assertEquals("creation_date", attributes[3].getName());
    assertEquals("Tue May 17 10:32:00 2011", attributes[3].getData().getElemString());
}