### Question:
PlanParser { public PerfPlan parseResource(Resource resource) { requireNonNull(resource); URI uri = resource.getUri(); String source = read(resource); ServiceLoader<cucumber.perf.salad.PlanParser> services =ServiceLoader.load(cucumber.perf.salad.PlanParser.class); Iterator<cucumber.perf.salad.PlanParser> iterator = services.iterator(); List<cucumber.perf.salad.PlanParser> parser = new ArrayList<>(); while (iterator.hasNext()) { parser.add(iterator.next()); } Comparator<cucumber.perf.salad.PlanParser> version = comparing(cucumber.perf.salad.PlanParser::version); return Collections.max(parser, version).parse(uri, source, idGenerator); } PlanParser(Supplier<UUID> idGenerator); PerfPlan parseResource(Resource resource);  }### Answer:
@Test public void testParseResource() { PlanParser p = new PlanParser(UUID::randomUUID); URI uri = URI.create("src/test/java/resources/test.plan"); Resource r = new UriResource(Paths.get(uri.getPath())); PerfPlan pp = p.parseResource(r); assertEquals("simulation 1", pp.getSaladPlan().getPlan().getChildren().get(0).getName()); }