### Question:
GitManager { public byte[] getPipelineFileContents(Pipeline pipeline, String version, String path) throws GitClientException { return this.getGitlabClientForPipeline(pipeline) .getFileContents(path, getRevisionName(version)); }  @PostConstruct void configure(); GitlabClient getGitlabClient(String gitHost, String gitToken, Long gitAdminId, String gitAdminName); GitCredentials getGitCredentials(Long id); GitCredentials getGitCredentials(Long id, boolean useEnvVars); GitCredentials getGitCredentials(Long id, boolean useEnvVars, boolean issueToken); GitCredentials getGitlabCredentials(Long duration); List<GitRepositoryEntry> getPipelineSources(Long id, String version, String path, boolean recursive); List<GitRepositoryEntry> getPipelineSources(Long id, String version); List<GitRepositoryEntry> getPipelineSources(Long id,
                                                       String version,
                                                       String path,
                                                       boolean appendConfigurationFileIfNeeded,
                                                       boolean recursive); String getRevisionName(String version); List<Revision> getPipelineRevisions(Pipeline pipeline); Revision createPipelineRevision(Pipeline pipeline,
                                           String revisionName,
                                           String commit,
                                           String message,
                                           String releaseDescription); List<GitCommitEntry> getCommits(Pipeline pipeline, String versionName); List<GitCommitEntry> getCommits(Pipeline pipeline, String versionName, Date since); GitCommitEntry createOrRenameFolder(Long id, PipelineSourceItemVO folderVO); GitCommitEntry removeFolder(Pipeline pipeline,
                                       String folder,
                                       String lastCommitId,
                                       String commitMessage); GitCommitEntry modifyFile(Pipeline pipeline,
                                     PipelineSourceItemVO sourceItemVO); GitCommitEntry updateFiles(Pipeline pipeline, PipelineSourceItemsVO sourceItemVOList); GitCommitEntry uploadFiles(Pipeline pipeline,
                                     String folder,
                                     List<UploadFileMetadata> files,
                                     String lastCommitId,
                                     String commitMessage); GitCommitEntry deleteFile(Pipeline pipeline,
                                     String filePath,
                                     String lastCommitId,
                                     String commitMessage); byte[] getPipelineFileContents(Pipeline pipeline, String version, String path); byte[] getTruncatedPipelineFileContent(final Pipeline pipeline, final String version,
                                                  final String path, int byteLimit); List<GitRepositoryEntry> getPipelineDocs(Long id, String version); File getConfigFile(Pipeline pipeline, String version); String getConfigFileContent(Pipeline pipeline, String version); GitProject createRepository(String templateId, String pipelineName, String description); boolean checkProjectExists(String name); GitProject createRepository(String templateId,
                                       String description,
                                       String repository,
                                       String token); void deletePipelineRepository(Pipeline pipeline); GitTagEntry loadRevision(Pipeline pipeline, String version); List<GitRepositoryEntry> getRepositoryContents(Long id, String version, String path); GitRepositoryEntry addHookToPipelineRepository(Long id); GitProject getRepository(String repository, String token); GitProject getRepository(String name); GitProject updateRepositoryName(final String projectIdOrName, final String newName); GitProject copyRepository(final String projectName, final String newProjectName, final String uuid); static final String GIT_MASTER_REPOSITORY; static final String DRAFT_PREFIX; }### Answer:
@Test public void shouldFetchPipelineSourceFile() throws GitClientException { final Pipeline pipeline = testingPipeline(); final String fileName = "src/test.py"; mockFileContentRequest(fileName, TEST_REVISION, FILE_CONTENT); final byte[] fileContents = gitManager.getPipelineFileContents(pipeline, TEST_REVISION, fileName); final String text = new String(fileContents); assertTrue(StringUtils.isNotBlank(text)); }