@Test
public void testGetCommitMetadata() throws JsonSyntaxException, IOException {

  ClassLoader classLoader = getClass().getClassLoader();
  String path = classLoader.getResource("commitDir1").getPath();
  Commit commit = Metadata.getCommitMetadata(path);
  assertEquals("master", commit.getBranch());
  assertEquals("b2b8f4adc557e4ef1ee2fe5e0ab46866c06ec55b", commit.getCommitId());
  assertEquals("1447974481000", commit.getTimestamp());
  assertEquals("https://github.com/apache/commons-collections", commit.getRepoUrl());
  assertEquals(path, commit.getDirectory());
}