@Test
public void testAllocateMultipleDevices()
    throws ResourceHandlerException, IOException {

  setupTestDirectoryWithScript();
  plugin = new NECVEPlugin(envProvider, defaultSearchDirs, udevUtil);
  Set<Device> available = new HashSet<>();
  Device device0 = getTestDevice(0);
  Device device1 = getTestDevice(1);
  available.add(device0);
  available.add(device1);
  Set<Device> allocated = plugin.allocateDevices(available, 2, env);
  assertEquals("No. of devices", 2, allocated.size());
  assertTrue("Device missing", allocated.contains(device0));
  assertTrue("Device missing", allocated.contains(device1));
}