}
@Test
public void testRunInstancesWithBlockDevices() throws Exception {
// TODO: maybe we should also test for spot instances
BlockDevice blockDevice = mock(BlockDevice.class);
when(blockDevice.getSize()).thenReturn(8); // TODO: understand why it doesn't work for smaller volumes
when(blockDevice.getName()).thenReturn("/dev/sda1");
BlockDevice blockDevice2 = mock(BlockDevice.class);
when(blockDevice2.getSize()).thenReturn(16);
when(blockDevice2.getName()).thenReturn("/dev/sda4");
when(hardware.getBlockDevices()).thenReturn(Lists.newArrayList(blockDevice, blockDevice2));
activity.execute(execution);
Uninterruptibles.sleepUninterruptibly(30, TimeUnit.SECONDS);