@Bean("ScmChangedFiles")
  public ScmChangedFiles provide(ScmConfiguration scmConfiguration, BranchConfiguration branchConfiguration, DefaultInputProject project) {
    Path rootBaseDir = project.getBaseDir();
    Set<ChangedFile> changedFiles = loadChangedFilesIfNeeded(scmConfiguration, branchConfiguration, rootBaseDir);

    if (changedFiles != null) {
      validatePaths(getAbsoluteFilePaths(changedFiles));
    }

    return new ScmChangedFiles(changedFiles);
  }
@Test
  public void testFailIfRelativePath() {
    when(branchConfiguration.targetBranchName()).thenReturn("target");
    when(branchConfiguration.isPullRequest()).thenReturn(true);
    when(scmConfiguration.provider()).thenReturn(scmProvider);
    when(scmProvider.branchChangedFiles("target", rootBaseDir)).thenReturn(Collections.singleton(Paths.get("changedFile")));

    assertThatThrownBy(() -> provider.provide(scmConfiguration, branchConfiguration, project))
      .isInstanceOf(IllegalStateException.class)
      .hasMessageContaining("changed file with a relative path");
  }