public function testGetThumbnails()
 {
     list($storage, $repo) = $this->getMocks();
     $instance = new ImageHandler($storage, $repo);
     $originId = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx';
     $id1 = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxy';
     $id2 = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxz';
     $mockMedia = m::mock('Xpressengine\\Media\\Spec\\Media');
     $mockFile = m::mock('Xpressengine\\Storage\\File');
     $mockMedia->shouldReceive('getFile')->andReturn($mockFile);
     $mockFile->shouldReceive('getId')->andReturn($originId);
     $mockMeta1 = m::mock('Xpressengine\\Media\\Meta');
     $mockMeta1->id = $id1;
     $mockMeta2 = m::mock('Xpressengine\\Media\\Meta');
     $mockMeta2->id = $id2;
     $repo->shouldReceive('fetch')->once()->with(['originId' => $originId, 'type' => 'letter'])->andReturn([$mockMeta1, $mockMeta2]);
     $mockThumbFile1 = m::mock('Xpressengine\\Storage\\File');
     $mockThumbFile1->shouldReceive('getId')->andReturn($id1);
     $mockThumbFile2 = m::mock('Xpressengine\\Storage\\File');
     $mockThumbFile2->shouldReceive('getId')->andReturn($id2);
     $storage->shouldReceive('children')->once()->with($mockFile)->andReturn([$mockThumbFile1, $mockThumbFile2]);
     $images = $instance->getThumbnails($mockMedia, 'letter');
     $this->assertEquals(2, count($images));
 }