@Test
public void properFailureIfNotAGitProject() throws IOException {

  File projectDir = temp.newFolder();
  javaUnzip(new File("test-repos/dummy-git.zip"), projectDir);
  JGitBlameCommand jGitBlameCommand = newJGitBlameCommand();
  File baseDir = new File(projectDir, "dummy-git");
  // Delete .git
  FileUtils.forceDelete(new File(baseDir, ".git"));
  DefaultFileSystem fs = new DefaultFileSystem(baseDir);
  when(input.fileSystem()).thenReturn(fs);
  DefaultInputFile inputFile = new TestInputFileBuilder("foo", DUMMY_JAVA).build();
  fs.add(inputFile);
  BlameOutput blameResult = mock(BlameOutput.class);
  when(input.filesToBlame()).thenReturn(Arrays.asList(inputFile));
  thrown.expect(MessageException.class);
  thrown.expectMessage("Not inside a Git work tree: ");
  jGitBlameCommand.blame(input, blameResult);
}