'Mounting multiple devices to the same mountpoint.
Note that the blockdevices must be unmounted in reverse order,
otherwise the unmount operations will fail.'

def test_mount_multiple_blockdevices(self):

    blockdevices = list((self._get_free_blockdevice() for _ in xrange(4)))
    mountpoint = self._get_directory_for_mount()
    for blockdevice in blockdevices:
        self.manager_under_test.make_filesystem(blockdevice, 'ext4')
        self.manager_under_test.mount(blockdevice, mountpoint)
    mount_infos = list((MountInfo(blockdevice=blockdevice, mountpoint=mountpoint) for blockdevice in blockdevices))
    blockdevices.reverse()
    for blockdevice in blockdevices:
        self.assertSetEqual(set(mount_infos), set((m for m in self.manager_under_test.get_mounts() if (m.mountpoint == mountpoint))))
        self.manager_under_test.unmount(blockdevice)
        mount_infos = list((m for m in mount_infos if (m.blockdevice != blockdevice)))
    self.assertSetEqual(set(), set((m for m in self.manager_under_test.get_mounts() if (m.mountpoint == mountpoint))))
