### Question:
TeamFoundationServerScm extends SCM { static String serializeCloakedPathCollectionToString(final Collection<String> cloakedPaths) { return cloakedPaths == null ? StringUtils.EMPTY : StringUtils.join(cloakedPaths, "\n"); } TeamFoundationServerScm(final String serverUrl, final String projectPath, final String workspaceName); @DataBoundConstructor  TeamFoundationServerScm(final String serverUrl, final String projectPath, final String workspaceName, final String userName, final Secret password); String getServerUrl(); String getWorkspaceName(); String getProjectPath(); String getLocalPath(); @DataBoundSetter void setLocalPath(final String localPath); String getVersionSpec(); @DataBoundSetter void setVersionSpec(final String versionSpec); boolean isUseUpdate(); @DataBoundSetter void setUseUpdate(final boolean useUpdate); boolean isUseOverwrite(); @DataBoundSetter void setUseOverwrite(final boolean useOverwrite); String getUserPassword(); Secret getPassword(); String getUserName(); CredentialsConfigurer getCredentialsConfigurer(); @DataBoundSetter void setCredentialsConfigurer(final CredentialsConfigurer credentialsConfigurer); String getCloakedPaths(); @DataBoundSetter void setCloakedPaths(final String cloakedPaths); String getServerUrl(final Run<?, ?> run); @Override void checkout(final Run<?, ?> build, final Launcher launcher, final FilePath workspaceFilePath, final TaskListener listener, final File changelogFile, final SCMRevisionState baseline); @Override boolean pollChanges(final AbstractProject hudsonProject, final Launcher launcher, final FilePath workspace, final TaskListener listener); @Override boolean processWorkspaceBeforeDeletion(final Job<?, ?> project, final FilePath workspace, final Node node); @Override boolean requiresWorkspaceForPolling(); @Override boolean supportsPolling(); @Override ChangeLogParser createChangeLogParser(); @Override FilePath getModuleRoot(final FilePath workspace); @Override TeamFoundationServerRepositoryBrowser getBrowser(); @Override @CheckForNull RepositoryBrowser<?> guessBrowser(); void setRepositoryBrowser(final TeamFoundationServerRepositoryBrowser repositoryBrowser); @Override void buildEnvVars(final AbstractBuild<?, ?> build, final Map<String, String> env); void buildEnvironment(final Run<?, ?> build, final Map<String, String> env); @Override DescriptorImpl getDescriptor(); @Override SCMRevisionState calcRevisionsFromBuild(final Run<?, ?> build,
            final FilePath workspace,
            final Launcher launcher, final TaskListener listener); @Override PollingResult compareRemoteRevisionWith(
            final Job<?, ?> project, final Launcher launcher,
            final FilePath workspace, final TaskListener listener, final SCMRevisionState baseline); static final String WORKSPACE_ENV_STR; static final String WORKFOLDER_ENV_STR; static final String PROJECTPATH_ENV_STR; static final String SERVERURL_ENV_STR; static final String USERNAME_ENV_STR; static final String WORKSPACE_CHANGESET_ENV_STR; }### Answer:
@Test public void serializeCloakedPathCollectionToString_one() { final List<String> cloakedPaths = Collections.singletonList("$/foo"); final String actual = TeamFoundationServerScm.serializeCloakedPathCollectionToString(cloakedPaths); Assert.assertEquals("$/foo", actual); }
@Test public void serializeCloakedPathCollectionToString_two() { final List<String> cloakedPaths = Arrays.asList("$/foo", "$/bar"); final String actual = TeamFoundationServerScm.serializeCloakedPathCollectionToString(cloakedPaths); Assert.assertEquals("$/foo\n$/bar", actual); }
@Test public void serializeCloakedPathCollectionToString_many() { final List<String> cloakedPaths = Arrays.asList("$/foo/", "$/bar/", "$/baz/"); final String actual = TeamFoundationServerScm.serializeCloakedPathCollectionToString(cloakedPaths); Assert.assertEquals("$/foo/\n$/bar/\n$/baz/", actual); }