public Set<Device> getDevicesFromPath(String path) throws IOException {
    MutableInt counter = new MutableInt(0);
    try (Stream<Path> stream = Files.walk(Paths.get(path), 1)) {
      return stream.filter(p -> p.toFile().getName().startsWith("veslot"))
            .map(p -> toDevice(p, counter))
            .collect(Collectors.toSet());
    }
  }
@Test
  public void testNonBlockOrCharFilesAreRejected() throws IOException {
    expected.expect(IllegalArgumentException.class);
    expected.expectMessage("File is neither a char nor block device");
    createVeSlotFile(0);
    when(mockCommandExecutor.getOutput()).thenReturn(
        "0:0:regular file");

    discoverer.getDevicesFromPath(testFolder);
  }