@Override
  public Set<Device> allocateDevices(Set<Device> availableDevices, int count,
      Map<String, String> env) {
    // Can consider topology, utilization.etc
    Set<Device> allocated = new HashSet<>();
    int number = 0;
    for (Device d : availableDevices) {
      allocated.add(d);
      number++;
      if (number == count) {
        break;
      }
    }
    return allocated;
  }
@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));
  }