protected SCMManipulator createMockedScmManipulator()
      throws ComponentLookupException, PlexusContainerException {
    // Settling up scm context
    SCM mockedSCM = createSCMMock(true);
    ScmContext scmContext =
        new ScmContext(
            mockedSCM, getSCMRepositoryURL(), getSCMCommentPrefix(), getSCMCommentSuffix());
    SCMManipulator scmManipulator =
        new SCMManipulator(SCMManagerFactory.getInstance().createScmManager());
    boolean configSettledUp = scmManipulator.scmConfigurationSettledUp(scmContext, true);
    assert configSettledUp;

    return scmManipulator;
  }
  protected void verifyCurrentScmContentMatchesHierarchy(String hierarchyPath)
      throws ComponentLookupException, PlexusContainerException, IOException {
    SCMManipulator scmManipulator = createMockedScmManipulator();

    // Checkouting scm in temp directory
    File checkoutDirectoryForVerifications =
        createTmpDirectory(
            this.getClass().getSimpleName()
                + "_"
                + testName.getMethodName()
                + "__verifyCurrentScmContentMatchesHierarchy");
    scmManipulator.checkout(checkoutDirectoryForVerifications);
    boolean directoryContentsAreEqual =
        DirectoryUtils.directoryContentsAreEqual(
            checkoutDirectoryForVerifications,
            new ClassPathResource(hierarchyPath).getFile(),
            getSpecialSCMDirectoryExcludePattern(),
            true);

    FileUtils.deleteDirectory(checkoutDirectoryForVerifications);

    assert directoryContentsAreEqual;
  }