@Test public void should_return_null_if_stub_mode_is_not_classpath() { StubDownloader stubDownloader = new ClasspathStubProvider() .build(new StubRunnerOptionsBuilder().withStubsMode(StubRunnerProperties.StubsMode.REMOTE).build()); then(stubDownloader).isNull(); }
@Override public StubDownloader build(final StubRunnerOptions stubRunnerOptions) { if (stubRunnerOptions.stubsMode != StubRunnerProperties.StubsMode.CLASSPATH) { return null; } log.info("Will download stubs from classpath"); return new ResourceResolvingStubDownloader(stubRunnerOptions, this::repoRoot, this::gavPattern); }
ClasspathStubProvider implements StubDownloaderBuilder { @Override public StubDownloader build(final StubRunnerOptions stubRunnerOptions) { if (stubRunnerOptions.stubsMode != StubRunnerProperties.StubsMode.CLASSPATH) { return null; } log.info("Will download stubs from classpath"); return new ResourceResolvingStubDownloader(stubRunnerOptions, this::repoRoot, this::gavPattern); } }
ClasspathStubProvider implements StubDownloaderBuilder { @Override public StubDownloader build(final StubRunnerOptions stubRunnerOptions) { if (stubRunnerOptions.stubsMode != StubRunnerProperties.StubsMode.CLASSPATH) { return null; } log.info("Will download stubs from classpath"); return new ResourceResolvingStubDownloader(stubRunnerOptions, this::repoRoot, this::gavPattern); }  }
ClasspathStubProvider implements StubDownloaderBuilder { @Override public StubDownloader build(final StubRunnerOptions stubRunnerOptions) { if (stubRunnerOptions.stubsMode != StubRunnerProperties.StubsMode.CLASSPATH) { return null; } log.info("Will download stubs from classpath"); return new ResourceResolvingStubDownloader(stubRunnerOptions, this::repoRoot, this::gavPattern); }  @Override StubDownloader build(final StubRunnerOptions stubRunnerOptions); }
ClasspathStubProvider implements StubDownloaderBuilder { @Override public StubDownloader build(final StubRunnerOptions stubRunnerOptions) { if (stubRunnerOptions.stubsMode != StubRunnerProperties.StubsMode.CLASSPATH) { return null; } log.info("Will download stubs from classpath"); return new ResourceResolvingStubDownloader(stubRunnerOptions, this::repoRoot, this::gavPattern); }  @Override StubDownloader build(final StubRunnerOptions stubRunnerOptions);  }