@Test(dataProvider = "inputBranchesImagesAndTags")
public void testFindImagesAndFix_KeepLinesIntact(String branch, String currentImage,
                                                 String searchImage, String currentTag,
                                                 String newTag, int modified) throws Exception {

    gitHubUtil = mock(GitHubUtil.class);
    BufferedReader reader = mock(BufferedReader.class);
    GHContent content = mock(GHContent.class);
    when(content.getPath()).thenReturn("path");
    when(content.update(anyString(), anyString(), eq(branch))).thenReturn(null);
    when(reader.readLine()).thenReturn("blahblahblah", "FROM " + currentImage + ":" + currentTag,
            "blahblahblah", null);
    dockerfileGitHubUtil = new DockerfileGitHubUtil(gitHubUtil);
    dockerfileGitHubUtil.findImagesAndFix(content, branch, searchImage, newTag, "", reader);
    verify(content, times(modified)).update(anyString(), anyString(), eq(branch));
}