@Test(dataProvider = "postTagData")
public void testFindImagesAndFix_doNotDeletePostTagData(String postTagData, String updatedTag,
                                                        String expectedReplacedData) 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(), anyString())).thenReturn(null);
    when(reader.readLine()).thenReturn("hello", "FROM image" + postTagData,
            "this is a test", null);
    dockerfileGitHubUtil = new DockerfileGitHubUtil(gitHubUtil);
    StringBuilder strB = new StringBuilder();
    boolean modified = dockerfileGitHubUtil.rewriteDockerfile("image", updatedTag, reader, strB);
    assertTrue(modified, "Expect the dockerfile to have been modified");
    assertEquals(strB.toString(), String.format("hello\n%s\nthis is a test\n", expectedReplacedData));
}