public function testMaterialsInMultimediaObject()
 {
     $mm = new MultimediaObject();
     $material1 = new Material();
     $material2 = new Material();
     $material3 = new Material();
     $this->assertEquals(0, count($mm->getMaterials()));
     $mm->addMaterial($material1);
     $mm->addMaterial($material2);
     $mm->addMaterial($material3);
     $this->assertEquals(3, count($mm->getMaterials()));
     $materialsArray = array($material1, $material2, $material3);
     $this->assertEquals($materialsArray, $mm->getMaterials()->toArray());
     $mm->removeMaterial($material2);
     $this->assertEquals(2, count($mm->getMaterials()));
     $this->assertTrue($mm->containsMaterial($material1));
     $this->assertFalse($mm->containsMaterial($material2));
     $materialsArray = array(0 => $material1, 2 => $material3);
     $this->assertEquals($materialsArray, $mm->getMaterials()->toArray());
 }