@Override
    public final void checkout(File workDir, Revision revision) {
        try {
            if (workDir.exists()) {
                FileUtils.deleteQuietly(workDir);
            }
            setupWorkspace(workDir);
            LOGGER.debug("[TFS] Retrieving Files from Workspace {}, Working Folder {}, Revision {} ", workspace, workDir, revision);
            retrieveFiles(workDir, revision);
        } catch (Exception e) {
            String exceptionMessage = String.format("Failed while checking out into Working Folder: %s, Project Path: %s, Workspace: %s, Username: %s, Domain: %s, Root Cause: %s", workDir, projectPath,
                    workspace,
                    userName,
                    domain, e.getMessage());
            throw new RuntimeException(exceptionMessage, e);
        } finally {
            clearMapping(workDir);
        }
    }
@Test
    public void testCheckout() throws Exception {
        tfsCommand.checkout(workDir, revision);
        verify(tfsCommand, times(1)).retrieveFiles(workDir, revision);
        verifyMocks();
    }