@Test
public void testFindImagesAndFix_doNotDeleteOtherLines() 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:tag",
            "this is a test", "", "", "", "world", null);
    dockerfileGitHubUtil = new DockerfileGitHubUtil(gitHubUtil);
    StringBuilder strB = new StringBuilder();
    dockerfileGitHubUtil.rewriteDockerfile("image", "newtag", reader, strB);
    assertEquals(strB.toString(), "hello\nFROM image:newtag\nthis is a test\n\n\n\nworld\n");
}