final JsonObject author = Json.createObjectBuilder()
.add("name", "Scott").add("email", "Scott@gmail.com")
.add("date", "2008-07-09T16:13:30+12:00").build();
final JsonArray tree = Json.createArrayBuilder()
.add("xyzsha12").build();
final Commit newCommit = this.repo().git().commits().create(
Json.createObjectBuilder().add("message", "my commit message")
.add("sha", "12ahscba")
.add("tree", "abcsha12")
.add("parents", tree)
.add("author", author).build()
);
MatcherAssert.assertThat(
newCommit,
Matchers.notNullValue()
);
MatcherAssert.assertThat(
newCommit.sha(),
Matchers.equalTo("12ahscba")
);
}